add attrs for account_id in transaction line

This commit is contained in:
Ruchir Shukla
2014-01-26 17:46:02 +05:30
parent 533f3d21d0
commit 412df15946

View File

@@ -248,7 +248,10 @@
position="after">
<field name="partner_bank_id"/>
</xpath>
<xpath expr="//field[@name='line_ids']/tree//field[@name='account_id']"
position="attributes">
<attribute name="attrs">{'readonly': [('state', '!=', 'draft'), ('match_type', 'in', ('move', 'payment'))]}</attribute>
</xpath>
<xpath expr="//field[@name='line_ids']/tree/field[@name='amount']"
position="after">
<field name="match_type"/>
@@ -336,7 +339,8 @@
<field name="partner_bank_id"/>
<field name="type" on_change="onchange_type(partner_id, type)"/>
<!-- TODO note the references to parent from the statement form view -->
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
<field domain="[('journal_id','=',parent.journal_id)]"
attrs="{'readonly': [('state', '!=', 'draft'), ('match_type', 'in', ('move', 'payment'))]}" name="account_id"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
<field name="amount"/>
<field name="match_type"/>