[FIX] Add the key 'from_parent_object' in context when creating move from invoice.

This commit is contained in:
Joel Grand-Guillaume
2013-01-21 15:34:47 +01:00
parent 09ec640e15
commit 117fa448dd

View File

@@ -143,6 +143,14 @@ class AccountInvoice(orm.Model):
context['from_parent_object'] = True
return super(AccountInvoice, self).action_cancel(cr, uid, ids, context=context)
def action_move_create(self, cr, uid, ids, context=None):
"""Override the method to add the key 'from_parent_object' in
the context."""
if context is None:
context = {}
context['from_parent_object'] = True
return super(AccountInvoice,self).action_move_create(cr, uid, ids, context=context)
class AccountBankStatement(orm.Model):
_inherit = "account.bank.statement"