[IMP] purchase tax rate depends on sale for generic chart of account
bzr revid: fp@tinyerp.com-20111230161827-c18kz0rwa52q59kf
This commit is contained in:
parent
ca693ecdc6
commit
60b9004486
|
@ -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')
|
||||
|
|
|
@ -2452,7 +2452,7 @@
|
|||
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
|
||||
<field name="purchase_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
|
||||
<newline/>
|
||||
<field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
|
||||
<field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
|
||||
<field name ="purchase_tax_rate" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
|
||||
<field name ="complete_tax_set" invisible="1"/>
|
||||
<newline/> <!-- extended view because the web UI is not good for one2many -->
|
||||
|
|
Loading…
Reference in New Issue