From b2d1d230ce9a36e50cf9263829f2b6de1ca74f9b Mon Sep 17 00:00:00 2001 From: mtr Date: Thu, 10 Feb 2011 11:30:26 +0530 Subject: [PATCH] [FIX] account_payment:added the missing argument 'date' in the onchange_partner_id of wizard (account.payment.populate.statement) and passed the correct date in the onchange_partner_id of wizard (account.statement.from.invoice.lines) lp bug: https://launchpad.net/bugs/715365 fixed bzr revid: mtr@mtr-20110210060026-waqyknss4283z004 --- .../wizard/account_payment_populate_statement.py | 2 +- addons/account_voucher/wizard/account_statement_from_invoice.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py index 340ab4bcb03..16d8dc5a7e4 100644 --- a/addons/account_payment/wizard/account_payment_populate_statement.py +++ b/addons/account_payment/wizard/account_payment_populate_statement.py @@ -76,7 +76,7 @@ class account_payment_populate_statement(osv.osv_memory): statement.currency.id, line.amount_currency, context=ctx) context.update({'move_line_ids': [line.move_line_id.id]}) - result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', context=context) + result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='payment', date=line.ml_maturity_date, context=context) if line.move_line_id: voucher_res = { diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index f3ce59f7b0b..e4d728c8867 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -75,7 +75,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): statement.currency.id, amount, context=ctx) context.update({'move_line_ids': [line.id]}) - result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=time.strftime('%Y-%m-%d'), context=context) + result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context) voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'), 'name': line.name, 'partner_id': line.partner_id.id,