[FIX] account: improve translations and use of _()
bzr revid: odo@openerp.com-20120208000332-4j6jqital8f0558k
This commit is contained in:
parent
df0b4f8c35
commit
754c5a68f8
|
@ -661,7 +661,7 @@ class account_account(osv.osv):
|
||||||
# Allow the write if the value is the same
|
# Allow the write if the value is the same
|
||||||
for i in [i['company_id'][0] for i in self.read(cr,uid,ids,['company_id'])]:
|
for i in [i['company_id'][0] for i in self.read(cr,uid,ids,['company_id'])]:
|
||||||
if vals['company_id']!=i:
|
if vals['company_id']!=i:
|
||||||
raise osv.except_osv(_('Warning !'), _('You cannot modify the company as its related to existing journal items.'))
|
raise osv.except_osv(_('Warning !'), _('You cannot change the owner company of an account that already contains journal items.'))
|
||||||
if 'active' in vals and not vals['active']:
|
if 'active' in vals and not vals['active']:
|
||||||
self._check_moves(cr, uid, ids, "write", context=context)
|
self._check_moves(cr, uid, ids, "write", context=context)
|
||||||
if 'type' in vals.keys():
|
if 'type' in vals.keys():
|
||||||
|
@ -1341,7 +1341,8 @@ class account_move(osv.osv):
|
||||||
if not top_common:
|
if not top_common:
|
||||||
top_common = top_account
|
top_common = top_account
|
||||||
elif top_account.id != top_common.id:
|
elif top_account.id != top_common.id:
|
||||||
raise osv.except_osv(_('Error !'), _('You cannot validate a journal entry because account "%s" does not belong to chart of accounts "%s"!' % (account.name, top_common.name)))
|
raise osv.except_osv(_('Error !'),
|
||||||
|
_('You cannot validate this journal entry because account "%s" does not belong to chart of accounts "%s"!') % (account.name, top_common.name))
|
||||||
return self.post(cursor, user, ids, context=context)
|
return self.post(cursor, user, ids, context=context)
|
||||||
|
|
||||||
def button_cancel(self, cr, uid, ids, context=None):
|
def button_cancel(self, cr, uid, ids, context=None):
|
||||||
|
|
Loading…
Reference in New Issue