[IMP] account: improved usability of account.tax form view + [REF] removed tax_group field from account.tax
bzr revid: qdp-launchpad@tinyerp.com-20100929170356-zg3me832f6va2w3a
This commit is contained in:
parent
c6f9cd4f3e
commit
a97203120d
|
@ -1654,11 +1654,11 @@ class account_tax(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Tax Name', size=64, required=True, translate=True, help="This name will be displayed on reports"),
|
||||
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."),
|
||||
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
|
||||
'amount': fields.float('Amount', required=True, digits_compute=dp.get_precision('Account'), help="For taxes of type percentage, enter % ratio between 0-1."),
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the tax without removing it."),
|
||||
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'),('balance','Balance')], 'Tax Type', required=True,
|
||||
'type': fields.selection( [('percent','Percentage'), ('fixed','Fixed Amount'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True,
|
||||
help="The computation method for the tax amount."),
|
||||
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True,
|
||||
'applicable_type': fields.selection( [('true','Always'), ('code','Given by Python Code')], 'Applicability', required=True,
|
||||
help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
|
||||
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
|
||||
'account_collected_id':fields.many2one('account.account', 'Invoice Tax Account'),
|
||||
|
@ -1669,7 +1669,6 @@ class account_tax(osv.osv):
|
|||
'python_compute':fields.text('Python Code'),
|
||||
'python_compute_inv':fields.text('Python Code (reverse)'),
|
||||
'python_applicable':fields.text('Python Code'),
|
||||
'tax_group': fields.selection([('vat','VAT'),('other','Other')], 'Tax Group', help="If a default tax is given in the partner it only overrides taxes from accounts (or products) in the same group."),
|
||||
|
||||
#
|
||||
# Fields used for the VAT declaration
|
||||
|
@ -1762,7 +1761,6 @@ class account_tax(osv.osv):
|
|||
'active': 1,
|
||||
'type_tax_use': 'all',
|
||||
'sequence': 1,
|
||||
'tax_group': 'vat',
|
||||
'ref_tax_sign': 1,
|
||||
'ref_base_sign': 1,
|
||||
'tax_sign': 1,
|
||||
|
@ -2421,7 +2419,6 @@ class account_tax_template(osv.osv):
|
|||
'python_compute':fields.text('Python Code'),
|
||||
'python_compute_inv':fields.text('Python Code (reverse)'),
|
||||
'python_applicable':fields.text('Python Code'),
|
||||
'tax_group': fields.selection([('vat','VAT'),('other','Other')], 'Tax Group', help="If a default tax if given in the partner it only override taxes from account (or product) of the same group."),
|
||||
|
||||
#
|
||||
# Fields used for the VAT declaration
|
||||
|
@ -2464,7 +2461,6 @@ class account_tax_template(osv.osv):
|
|||
'type': 'percent',
|
||||
'amount': 0,
|
||||
'sequence': 1,
|
||||
'tax_group': 'vat',
|
||||
'ref_tax_sign': 1,
|
||||
'ref_base_sign': 1,
|
||||
'tax_sign': 1,
|
||||
|
@ -2609,7 +2605,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
'python_compute': tax.python_compute,
|
||||
'python_compute_inv': tax.python_compute_inv,
|
||||
'python_applicable': tax.python_applicable,
|
||||
'tax_group':tax.tax_group,
|
||||
'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False,
|
||||
'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False,
|
||||
'base_sign': tax.base_sign,
|
||||
|
|
|
@ -810,7 +810,6 @@
|
|||
<field name="name"/>
|
||||
<field name="price_include" groups="base.group_extended"/>
|
||||
<field name="description"/>
|
||||
<field name="tax_group" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -821,15 +820,12 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Taxes">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
|
||||
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Tax Group" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'tax_group'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -843,52 +839,47 @@
|
|||
<group colspan="4" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="description" select="1"/>
|
||||
<field name="tax_group" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="type_tax_use"/>
|
||||
<field name="price_include"/>
|
||||
<field name="active"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Tax Definition" >
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string=""/>
|
||||
<field name="applicable_type"/>
|
||||
<field name="type_tax_use"/>
|
||||
<field groups="base.group_extended" name="domain"/>
|
||||
<field groups="base.group_extended" name="sequence"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string=""/>
|
||||
<field name="amount" attrs="{'readonly':[('type','in',('none', 'code'))]}"/>
|
||||
<field groups="base.group_extended" name="child_depend"/>
|
||||
<field groups="base.group_extended" name="price_include"/>
|
||||
<field groups="base.group_extended" name="include_base_amount"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<field name="type"/>
|
||||
<field name="amount" attrs="{'readonly':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||
<separator colspan="4" string="Accounting Information"/>
|
||||
<field name="account_collected_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the income account"/>
|
||||
<field name="account_paid_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<label colspan="2" nolabel="1" string="Keep empty to use the expense account"/>
|
||||
<separator colspan="4" string="Child Taxes"/>
|
||||
<field colspan="4" groups="base.group_extended" name="child_ids" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Tax Declaration">
|
||||
<separator colspan="4" string="Invoices"/>
|
||||
<separator colspan="4" string="Tax Declaration: Invoices"/>
|
||||
<field name="base_code_id"/>
|
||||
<field name="base_sign"/>
|
||||
<field name="tax_code_id"/>
|
||||
<field name="tax_sign"/>
|
||||
|
||||
<separator colspan="4" string="Credit Notes"/>
|
||||
<separator colspan="4" string="Tax Declaration: Credit Notes"/>
|
||||
<field name="ref_base_code_id"/>
|
||||
<field name="ref_base_sign"/>
|
||||
<field name="ref_tax_code_id"/>
|
||||
<field name="ref_tax_sign"/>
|
||||
<separator groups="base.group_extended" colspan="4" string="Children Definition"/>
|
||||
<field groups="base.group_extended" name="child_depend"/>
|
||||
<field groups="base.group_extended" name="sequence"/>
|
||||
<field groups="base.group_extended" name="include_base_amount"/>
|
||||
<separator groups="base.group_extended" colspan="4" string="Child Taxes"/>
|
||||
<field groups="base.group_extended" colspan="4" name="child_ids" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page groups="base.group_extended" string="Special Computation">
|
||||
<separator colspan="4" string="Compute Code (if type=code)"/>
|
||||
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
<separator colspan="4" string="Applicability Options"/>
|
||||
<field name="applicable_type"/>
|
||||
<field name="domain"/>
|
||||
<separator colspan="4" string="Applicable Code (if type=code)"/>
|
||||
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
|
||||
<separator colspan="4" string="Compute Code (if type=code)"/>
|
||||
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
@ -2188,7 +2179,6 @@
|
|||
<field name="description"/>
|
||||
<newline/>
|
||||
<field name="chart_template_id"/>
|
||||
<field name="tax_group"/>
|
||||
<field name="type"/>
|
||||
<field name="type_tax_use"/>
|
||||
</group>
|
||||
|
@ -2252,8 +2242,6 @@
|
|||
<filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
|
||||
<filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
|
||||
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
|
|
|
@ -170,7 +170,6 @@ class account_installer(osv.osv_memory):
|
|||
'python_compute': tax.python_compute,
|
||||
'python_compute_inv': tax.python_compute_inv,
|
||||
'python_applicable': tax.python_applicable,
|
||||
'tax_group':tax.tax_group,
|
||||
'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False,
|
||||
'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False,
|
||||
'base_sign': tax.base_sign,
|
||||
|
|
|
@ -14,7 +14,6 @@ result = price_unit * 0.10"" name="python_compute_inv"/>
|
|||
<field eval="1.0" name="ref_tax_sign"/>
|
||||
<field eval=""percent"" name="type"/>
|
||||
<field eval="1.0" name="ref_base_sign"/>
|
||||
<field eval=""vat"" name="tax_group"/>
|
||||
<field eval=""1"" name="active"/>
|
||||
<field eval=""testing tax"" name="name"/>
|
||||
<field eval="0.069" name="amount"/>
|
||||
|
|
Loading…
Reference in New Issue