From 60b9004486a00bca9c815ae57342e42024d331d6 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 30 Dec 2011 17:18:27 +0100 Subject: [PATCH] [IMP] purchase tax rate depends on sale for generic chart of account bzr revid: fp@tinyerp.com-20111230161827-c18kz0rwa52q59kf --- addons/account/account.py | 3 +++ addons/account/account_view.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 700164d7479..a300aa46b07 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2955,6 +2955,9 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'purchase_tax_rate': fields.float('Purchase Tax(%)'), 'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sales and purchase rates or use the usual m2o fields. This last choice assumes that the set of tax defined for the chosen template is complete'), } + def onchange_tax_rate(self, cr, uid, ids, rate=False, context=None): + return {'value': {'purchase_tax_rate': rate or False}} + def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None): res = {} tax_templ_obj = self.pool.get('account.tax.template') diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 6742132d88c..9b33c1ed364 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2452,7 +2452,7 @@ - +