[IMP]Account:Add parent_id field in Account.chart.template and Bank Account,Root Account ,Root Tax required when there is no parent

bzr revid: ron@tinyerp.com-20110722070741-dxfzs55wlhgoq4wz
This commit is contained in:
ron@tinyerp.com 2011-07-22 12:37:41 +05:30
parent 66d36a813b
commit a21478fde2
2 changed files with 5 additions and 3 deletions

View File

@ -2475,6 +2475,7 @@ class account_chart_template(osv.osv):
_columns={
'name': fields.char('Name', size=64, required=True),
'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)]),
'tax_code_root_id': fields.many2one('account.tax.code.template','Root Tax Code',required=True,domain=[('parent_id','=',False)]),
'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),

View File

@ -2141,9 +2141,10 @@
<form string="Chart of Accounts Template">
<group>
<field name="name"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
<field name="tax_code_root_id"/>
<field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
<field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
<field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
<field name="parent_id" />
</group>
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
<separator string="Properties" colspan="4"/>