Comment 2 for bug 1075070

Revision history for this message
dana ilinca (dilinca) wrote :

Hi,

The solution is to replace in account_view.xml the line <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
with this : <page string="Cash Transactions" name="statement_lines" attrs="{'invisible': [('state','=','draft')]}">.
And in account_bank_statement_view.xml add the state

 <!-- add state to bank statement line -->
    <record id="view_bank_statement_form2_add_fields" model="ir.ui.view">
       <field name="name">view.bank.statement.form2.add.fields</field>
       <field name="model">account.bank.statement</field>
       <field name="inherit_id" ref="account.view_bank_statement_form2"/>
      <field name="type">form</field>
      <field name="arch" type="xml">
        <data>
          <xpath expr="/form/notebook/page[@name='statement_lines']/field[@name='line_ids']/tree/field[@name='date']" position="after">
            <field name="state" invisible="1"/>
          </xpath>
          <xpath expr="/form/notebook/page[@name='statement_lines']/field[@name='line_ids']/form/field[@name='date']" position="after">
            <field name="state" invisible="1"/>
          </xpath>
        </data>
      </field>
    </record>

Dana