[FIX] small issue in xmo@openerp.com-20120116095337-ko0y6xha6oqx4vw1
[odoo/odoo.git] / addons / account_payment / account_move_line.py
index 4f70d98..24f9486 100644 (file)
@@ -50,7 +50,6 @@ class account_move_line(osv.osv):
     def _to_pay_search(self, cr, uid, obj, name, args, context=None):
         if not args:
             return []
-        if not context: context = {}
         line_obj = self.pool.get('account.move.line')
         query = line_obj._query_get(cr, uid, context={})
         where = ' and '.join(map(lambda x: '''(SELECT
@@ -89,7 +88,6 @@ class account_move_line(osv.osv):
         """
         payment_mode_obj = self.pool.get('payment.mode')
         line2bank = {}
-        if not context: context = {}
         if not ids:
             return {}
         bank_type = payment_mode_obj.suitable_bank_types(cr, uid, payment_type,
@@ -113,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),
     }