[FIX] Account: account.tax.template without prince_include field
lp bug: https://launchpad.net/bugs/539717 fixed bzr revid: mra@mra-laptop-20101116080018-0eo8k08qrub52ywn
This commit is contained in:
parent
b482c1e92b
commit
07eaa79f21
|
@ -2454,7 +2454,8 @@ class account_tax_template(osv.osv):
|
||||||
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
|
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
|
||||||
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
|
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
|
||||||
'description': fields.char('Internal Name', size=32),
|
'description': fields.char('Internal Name', size=32),
|
||||||
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,)
|
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,),
|
||||||
|
'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."),
|
||||||
}
|
}
|
||||||
|
|
||||||
def name_get(self, cr, uid, ids, context={}):
|
def name_get(self, cr, uid, ids, context={}):
|
||||||
|
@ -2485,6 +2486,7 @@ class account_tax_template(osv.osv):
|
||||||
'base_sign': 1,
|
'base_sign': 1,
|
||||||
'include_base_amount': False,
|
'include_base_amount': False,
|
||||||
'type_tax_use': 'all',
|
'type_tax_use': 'all',
|
||||||
|
'price_include': 0,
|
||||||
}
|
}
|
||||||
_order = 'sequence'
|
_order = 'sequence'
|
||||||
|
|
||||||
|
@ -2658,7 +2660,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||||
'include_base_amount': tax.include_base_amount,
|
'include_base_amount': tax.include_base_amount,
|
||||||
'description':tax.description,
|
'description':tax.description,
|
||||||
'company_id': company_id,
|
'company_id': company_id,
|
||||||
'type_tax_use': tax.type_tax_use
|
'type_tax_use': tax.type_tax_use,
|
||||||
|
'price_include': tax.price_include
|
||||||
}
|
}
|
||||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax)
|
new_tax = obj_acc_tax.create(cr, uid, vals_tax)
|
||||||
tax_template_to_tax[tax.id] = new_tax
|
tax_template_to_tax[tax.id] = new_tax
|
||||||
|
|
|
@ -2258,6 +2258,7 @@
|
||||||
<field name="chart_template_id"/>
|
<field name="chart_template_id"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="type_tax_use"/>
|
<field name="type_tax_use"/>
|
||||||
|
<field name="price_include"/>
|
||||||
</group>
|
</group>
|
||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
<page string="Tax Definition">
|
<page string="Tax Definition">
|
||||||
|
|
|
@ -188,7 +188,8 @@ class account_installer(osv.osv_memory):
|
||||||
'include_base_amount': tax.include_base_amount,
|
'include_base_amount': tax.include_base_amount,
|
||||||
'description': tax.description,
|
'description': tax.description,
|
||||||
'company_id': company_id.id,
|
'company_id': company_id.id,
|
||||||
'type_tax_use': tax.type_tax_use
|
'type_tax_use': tax.type_tax_use,
|
||||||
|
'price_include': tax.price_include
|
||||||
}
|
}
|
||||||
new_tax = obj_acc_tax.create(cr, uid, vals_tax, context=context)
|
new_tax = obj_acc_tax.create(cr, uid, vals_tax, context=context)
|
||||||
#as the accounts have not been created yet, we have to wait before filling these fields
|
#as the accounts have not been created yet, we have to wait before filling these fields
|
||||||
|
|
Loading…
Reference in New Issue