From 2577edf340ac85a2b52bb208a3dc8098a2037d37 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 15 Sep 2010 15:15:09 +0530 Subject: [PATCH] [FIX]: fix a tax calculation problem in the journal voucher that was missed during the trunk merge bzr revid: mga@tinyerp.com-20100915094509-j3smpedxyn56wk62 --- addons/account_voucher/voucher.py | 8 ++++++-- addons/account_voucher/voucher_sales_purchase_view.xml | 4 +--- addons/account_voucher/voucher_view.xml | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 3a9855e35f3..b898adf68bf 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -254,7 +254,7 @@ class account_voucher(osv.osv): }) return {'value':default} - def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): + def onchange_journal_voucher(self, cr, uid, ids, line_ids=False, tax_id=False, price=0.0, partner_id=False, journal_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @@ -290,9 +290,13 @@ class account_voucher(osv.osv): default['value']['account_id'] = account_id default['value']['type'] = tr_type + + vals = self.onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context) + default['value'].update(vals.get('value')) + return default - def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): + def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context): """price Returns a dict that contains new values and context diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml index 9a55d5e4f83..f40e2088d63 100644 --- a/addons/account_voucher/voucher_sales_purchase_view.xml +++ b/addons/account_voucher/voucher_sales_purchase_view.xml @@ -40,7 +40,6 @@ - account.voucher.sale.select account.voucher @@ -80,7 +79,6 @@ - Sales Payment account.voucher @@ -216,7 +214,7 @@ - + diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 94f7f18c4a0..29008201992 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -28,8 +28,8 @@
- - + + @@ -37,7 +37,7 @@ - + @@ -59,7 +59,7 @@ -