[IMP] make sure all _constraints methods can receive a context arg.

bzr revid: vmt@openerp.com-20110606105826-cq1epnpfnzm3yofa
This commit is contained in:
Vo Minh Thu 2011-06-06 12:58:26 +02:00
parent 8011b649ee
commit 4b88138b59
2 changed files with 5 additions and 5 deletions

View File

@ -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 = [

View File

@ -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: