This question has been flagged

Hello, 
I have custom module and i added one2many field and i add attrs readonly 

The Problem comes in when i edit multiple records from this view, and if i press enter and it jumps to the next one, if its an already existing line with filled out fields, certain fields disappears

<field name="Comment" attrs="{'readonly':[('submit','=',True)]}">

<tree editable="bottom">

<field name="submit"/>

when check on submit and field comment is readonly and add another row it disappears  

Avatar
Discard
Best Answer

Try Readonly Bypass,

>> First install Read Only ByPass Module(if not installed).

Like,

<!-- Override to set readonly by pass in context -->
<record id="" model="ir.actions.act_window"> <field name="context">{'readonly_by_pass': True}</field> </record>
Avatar
Discard