[IMP] make sure all _constraints methods can receive a context arg.
bzr revid: vmt@openerp.com-20110606105826-cq1epnpfnzm3yofa
This commit is contained in:
parent
8011b649ee
commit
4b88138b59
|
@ -202,8 +202,8 @@ class account_analytic_account(osv.osv):
|
|||
'currency_id': _get_default_currency,
|
||||
}
|
||||
|
||||
def check_recursion(self, cr, uid, ids, parent=None):
|
||||
return super(account_analytic_account, self)._check_recursion(cr, uid, ids, parent=parent)
|
||||
def check_recursion(self, cr, uid, ids, context=None, parent=None):
|
||||
return super(account_analytic_account, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
|
||||
|
||||
_order = 'name asc'
|
||||
_constraints = [
|
||||
|
|
|
@ -84,7 +84,7 @@ class account_invoice(osv.osv):
|
|||
## @param user res.user.id that is currently loged
|
||||
## @parma ids invoices id
|
||||
## @return a boolean True if valid False if invalid
|
||||
def _check_bvr(self, cr, uid, ids):
|
||||
def _check_bvr(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Function to validate a bvr reference like :
|
||||
0100054150009>132000000000000000000000014+ 1300132412>
|
||||
|
@ -111,7 +111,7 @@ class account_invoice(osv.osv):
|
|||
## @param user res.user.id that is currently loged
|
||||
## @parma ids invoices id
|
||||
## @return a boolean True if valid False if invalid
|
||||
def _check_reference_type(self, cursor, user, ids):
|
||||
def _check_reference_type(self, cursor, user, ids, context=None):
|
||||
"""Check the customer invoice reference type depending
|
||||
on the BVR reference type and the invoice partner bank type"""
|
||||
for invoice in self.browse(cursor, user, ids):
|
||||
|
@ -196,4 +196,4 @@ class account_tax_code(osv.osv):
|
|||
|
||||
account_tax_code()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue