[FIX] account: fixed incorrect calls to _(..) function
bzr revid: odo@openerp.com-20101115184617-725dv33unrhw0hqm
This commit is contained in:
parent
211b349a07
commit
7a07db384d
|
@ -1389,7 +1389,7 @@ class account_move(osv.osv):
|
|||
|
||||
if line.account_id.currency_id and line.currency_id:
|
||||
if line.account_id.currency_id.id != line.currency_id.id and (line.account_id.currency_id.id != line.account_id.company_id.currency_id.id):
|
||||
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name)))
|
||||
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""") % (line.account_id.code, line.account_id.name))
|
||||
|
||||
if abs(amount) < 10 ** -4:
|
||||
# If the move is balanced
|
||||
|
@ -2082,8 +2082,8 @@ class account_model(osv.osv):
|
|||
date_maturity = time.strftime('%Y-%m-%d')
|
||||
if line.date_maturity == 'partner':
|
||||
if not line.partner_id:
|
||||
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term! \
|
||||
\nPlease define partner on it!"%(line.name, model.name)))
|
||||
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \
|
||||
"\nPlease define partner on it!")%(line.name, model.name))
|
||||
if line.partner_id.property_payment_term:
|
||||
payment_term_id = line.partner_id.property_payment_term.id
|
||||
pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_maturity)
|
||||
|
|
|
@ -51,7 +51,7 @@ class account_move_journal(osv.osv_memory):
|
|||
if context.get('journal_type', False):
|
||||
jids = journal_pool.search(cr, uid, [('type','=', context.get('journal_type'))])
|
||||
if not jids:
|
||||
raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.' % (context.get('journal_type'))))
|
||||
raise osv.except_osv(_('Configuration Error !'), _('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration/Financial Accounting/Accounts/Journals.') % context.get('journal_type'))
|
||||
journal_id = jids[0]
|
||||
|
||||
return journal_id
|
||||
|
|
|
@ -41,8 +41,8 @@ class account_use_model(osv.osv_memory):
|
|||
for line in model.lines_id:
|
||||
if line.date_maturity == 'partner':
|
||||
if not line.partner_id:
|
||||
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' is based on partner payment term! \
|
||||
\nPlease define partner on it!"%(line.name)))
|
||||
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' is based on partner payment term!"\
|
||||
"\nPlease define partner on it!")%line.name)
|
||||
pass
|
||||
|
||||
def create_entries(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue