class account_move_line(osv.osv):
_inherit = "account.move.line"
- def amount_to_pay(self, cr, uid, ids, name, arg={}, context={}):
+ def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None):
""" Return the amount still to pay regarding all the payemnt orders
(excepting cancelled orders)"""
if not ids:
r = dict(cr.fetchall())
return r
- def _to_pay_search(self, cr, uid, obj, name, args, context):
+ def _to_pay_search(self, cr, uid, obj, name, args, context=None):
if not args:
return []
line_obj = self.pool.get('account.move.line')
return line2bank
_columns = {
- 'amount_to_pay': fields.function(amount_to_pay, method=True,
+ 'amount_to_pay': fields.function(amount_to_pay,
type='float', string='Amount to pay', fnct_search=_to_pay_search),
}