[IMP]: account: l10n fullness and inheritancy: Changed field name tracking to complete_tax

optimize the code for inconsistent use of quotes in dict

bzr revid: ron@tinyerp.com-20110801100440-bjcjzvz47b7o63mp
This commit is contained in:
ron@tinyerp.com 2011-08-01 15:34:40 +05:30
parent 997528cc9a
commit 14aceeae6b
2 changed files with 8 additions and 11 deletions

View File

@ -2638,17 +2638,14 @@ class wizard_multi_charts_accounts(osv.osv_memory):
"purchase_tax": fields.many2one("account.tax.template", "Default Purchase Tax"),
'sale_tax_rate': fields.float('Sale Tax(%)'),
'purchase_tax_rate': fields.float('Purchase Tax(%)'),
'tracking': fields.boolean('Tracking'),
'complete_tax': fields.boolean('Complete Tax'),
}
def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None):
res = {}
res['value'] = {}
res['value']["tracking"] = False
res['value']["sale_tax"] = False
res['value']["purchase_tax"] = False
res['value'] = {'complete_tax': False, 'sale_tax': False, 'purchase_tax': False}
for template in self.pool.get('account.chart.template').browse(cr, uid, [chart_template_id], context=context):
if template.set_tax_complete:
res['value']["tracking"] = True
res['value']["complete_tax"] = True
if chart_template_id:
# default tax is given by the lowesst sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
sale_tax_ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id"

View File

@ -2400,11 +2400,11 @@
<field name ="code_digits" groups="base.group_extended"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
<field name ="seq_journal" groups="base.group_extended"/>
<field name="sale_tax" attrs="{'invisible': [('tracking', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" attrs="{'invisible': [('tracking', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<field name ="sale_tax_rate" attrs="{'invisible': [('tracking', '=', True)]}"/>
<field name ="purchase_tax_rate" attrs="{'invisible': [('tracking', '=', True)]}"/>
<field name ="tracking" invisible="1"/>
<field name="sale_tax" attrs="{'invisible': [('complete_tax', '!=', 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', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<field name ="sale_tax_rate" attrs="{'invisible': [('complete_tax', '=', True)]}"/>
<field name ="purchase_tax_rate" attrs="{'invisible': [('complete_tax', '=', True)]}"/>
<field name ="complete_tax" invisible="1"/>
<newline/> <!-- extended view because the web UI is not good for one2many -->
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="base.group_extended">
<form string="Bank Information">