Hi,
I am a beginner in python programming,
please help me,
how to make the button state invisible after clicking, and this is my current code :
<header>
<button name="action_close" type="object" string="Sesi Berakhir" state_id="in" class="btn-primary" />
<field name="state_id" widget="statusbar" statusbar_visible="in,out"/>
</header>@api.multi
def action_close(self):
self.write({'state_id': 'out'})
self.write({'end_time':fields.Datetime.now(self)})
return self
this image : https://drive.google.com/file/d/1UIkZE6BcWr04lbNMYdtwT-IOSvkoBkfQ/view?usp=sharing
so when the status is "Sesi Berakhir" the "Sesi Berakhir" button is gone
Thanks before :D