Hi,
I need help to make one2many field be readonly when button clicked.
this my code ;
<form string="Sesi Parkir"> <header> <button name="action_close" type="object" string="Sesi Berakhir" states="in" class="btn-primary" /> <field name="state" widget="statusbar" statusbar_visible="in,out"/> </header>
parking_log_ids=fields.One2many('parking_log','parking_log_id',string='Log Parkir')
@api.multi def action_close(self): self.write({'state': 'out'}) self.write({'end_time':fields.Datetime.now(self)}) self.write({'parking_log_ids':'readonly=True'}) # i try like this but nothing happen :v
when I click the 'action_close' button, the one2many field becomes readonly and cannot add the record again
Thanks before :D