'amount': fields.float('Amount', required=True, digits=(14,4)),
'active': fields.boolean('Active'),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code')], 'Tax Type', required=True),
- 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True),
+ 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True,
+ help="If not applicable (computed through a Python code), the tax do not appears on the invoice."),
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developpers to create specific taxes in a custom domain."),
'account_collected_id':fields.many2one('account.account', 'Invoice Tax Account'),
'account_paid_id':fields.many2one('account.account', 'Refund Tax Account'),
<page string="General Information">
<field name="view_id"/>
<field name="sequence_id"/>
- <field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}"/>
- <field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}"/>
+ <field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
+ <field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
<field name="currency"/>
<field name="user_id" groups="base.group_extended"/>
<newline/>
<field colspan="4" domain="[('partner_id','=',context.get('partner_id', False)),('state','=','valid'),('account_id','=',context.get('account_id', False)),('reconcile_id', '=', False)]" name="line_ids" nolabel="1" view_mode="tree"/>
<field colspan="4" name="line_new_ids" nolabel="1">
<tree editable="bottom" string="Write-Off">
- <field name="account_id"/>
+ <field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
<field name="amount"/>
<field name="name"/>
</tree>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id"/>
- <field name="account_id"/>
+ <field name="account_id" domain="[('journal_id','=',journal_id)]"/>
<field name="journal_id"/>
<field name="debit" sum="Total debit"/>
<field name="credit" sum="Total credit"/>
<field name="date" select="1"/>
<field name="ref" select="2"/>
<field name="invoice" select="2"/>
- <field name="account_id" select="1"/>
+ <field name="account_id" select="1" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
<field name="partner_id" select="1" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<field name="debit" select="2"/>
<field name="date" select="2"/>
<field name="journal_id" readonly="False" select="1"/>
<field name="period_id" readonly="False" select="2"/>
- <field name="account_id" select="1"/>
+ <field name="account_id" select="1" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
<field name="partner_id" select="2" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
<newline/>
<field name="debit" select="2"/>
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
- <field name="account_id"/>
+ <field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="debit" select="1"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
- <field name="account_id"/>
+ <field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field colspan="4" name="name" select="1"/>
<field name="sequence"/>
<field name="ref" select="1"/>
- <field name="account_id"/>
+ <field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
<field name="partner_id"/>
<field name="debit" select="1"/>
<field name="credit" select="1"/>