diff --git a/addons/account/account.py b/addons/account/account.py index 210ae5b3157..14e5bb26e34 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1199,6 +1199,7 @@ class account_move(osv.osv): # # Validate a balanced move. If it is a centralised journal, create a move. # + def validate(self, cr, uid, ids, context={}): if context and ('__last_update' in context): del context['__last_update'] @@ -1283,11 +1284,11 @@ class account_move(osv.osv): 'state': 'draft' }, context, check=False) ok = False - if ok: - list_ids = [] - for tmp in move.line_id: - list_ids.append(tmp.id) - self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context) + if ok: + list_ids = [] + for tmp in move.line_id: + list_ids.append(tmp.id) + self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context) return ok account_move() diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index fc10c58cc8f..7394fc54b7e 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -205,7 +205,7 @@