[FIX] account: readonly bank statement line

Like in "view_bank_statement_form" when a line is linked to
a journal entry, this line must be in readonly.

opw:676344
This commit is contained in:
Goffin Simon 2016-05-17 13:28:07 +02:00
parent 393c14d31a
commit 0fc73a2067
2 changed files with 7 additions and 7 deletions

View File

@ -2377,13 +2377,14 @@
<notebook>
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
<field name="line_ids" context="{'date':date}">
<tree editable="bottom" string="Statement lines">
<tree editable="bottom" string="Statement lines" colors="grey:journal_entry_id!=False">
<field name="sequence" invisible="1"/>
<field name="date"/>
<field name="name"/>
<field name="ref"/>
<field name="partner_id"/>
<field name="amount"/>
<field name="journal_entry_id" invisible="1"/>
<field name="date" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
<field name="name" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
<field name="ref" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
<field name="partner_id" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
<field name="amount" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
</tree>
<form string="Statement lines">
<group col="4">

View File

@ -79,7 +79,6 @@
<attribute name="options">{'reload_on_button': true}</attribute>
</field>
<xpath expr="//field[@name='amount']" position="after">
<field name="journal_entry_id" invisible="1"/>
<button name="cancel" attrs="{'invisible': [('journal_entry_id', '=', False)]}" string="Cancel" type="object" icon="gtk-undo"/>
</xpath>
</field>