Fix override of create in account.analytic.account
Must keep the same variable name for default variable bzr revid: ced-74d3e5a4f856d43c6e19af78482e8308cda33035
This commit is contained in:
parent
ce86d2905a
commit
d442092a8d
|
@ -176,11 +176,11 @@ class account_analytic_account(osv.osv):
|
|||
(check_recursion, 'Error! You can not create recursive account.', ['parent_id'])
|
||||
]
|
||||
|
||||
def create(self, cr, uid, vals, ctx={}):
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
parent_id = vals.get('parent_id', 0)
|
||||
if ('code' not in vals or not vals['code']) and not parent_id:
|
||||
vals['code'] = self.pool.get('ir.sequence').get(cr, uid, 'account.analytic.account')
|
||||
return super(account_analytic_account, self).create(cr, uid, vals, ctx)
|
||||
return super(account_analytic_account, self).create(cr, uid, vals, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context={}):
|
||||
if not default:
|
||||
|
|
Loading…
Reference in New Issue