[FIX] lp:1266890, journal account can still be modified when the one

from the registered match is leading or when the move line has
	already been created.
This commit is contained in:
unknown
2014-03-01 15:49:57 +01:00
committed by Stefan Rijnhart

View File

@@ -95,7 +95,7 @@
action="action_account_banking_journals"
sequence="20"
/>
<!-- Create new view on imported statement files -->
<record model="ir.ui.view" id="view_account_banking_imported_file_form">
<field name="name">account.banking.imported.file.form</field>
@@ -221,7 +221,7 @@
</xpath>
<!-- Add invisible field for identification of import file
on bank statements
on bank statements
-->
<field name="balance_end_real" position="after">
<field name="banking_id" invisible="True"/>
@@ -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', '!=', '')]}</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', '!=', '')]}" 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"/>