[FIX] small issue in xmo@openerp.com-20120116095337-ko0y6xha6oqx4vw1
[odoo/odoo.git] / addons / account_payment / account_move_line.py
index 638b75d..24f9486 100644 (file)
@@ -26,7 +26,7 @@ from tools.translate import _
 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:
@@ -47,7 +47,7 @@ class account_move_line(osv.osv):
         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')
@@ -111,7 +111,7 @@ class account_move_line(osv.osv):
         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),
     }