def _to_pay_search(self, cr, uid, obj, name, args, context=None):
if not args:
return []
- if context is None: context = {}
line_obj = self.pool.get('account.move.line')
query = line_obj._query_get(cr, uid, context={})
where = ' and '.join(map(lambda x: '''(SELECT
"""
payment_mode_obj = self.pool.get('payment.mode')
line2bank = {}
- if context is None: context = {}
if not ids:
return {}
bank_type = payment_mode_obj.suitable_bank_types(cr, uid, payment_type,
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),
}