I have a class:
class ReceiptNotes(models.Model):
_inherit = 'stock.picking'
is_finalized_receipt = fields.Boolean(string='Received')
finalized_receipt_date = fields.Datetime(string='Received Timestamp', readonly=True)
my view goes (sorry had to remove the because it wouldn't display)
xpath expr="//field[@name='backorder_id']" position="after"
field name="is_finalized_receipt" invisible="picking_type_code != 'incoming'"
field name="finalized_receipt_date" invisible="picking_type_code != 'incoming'"
I want to be able to change the value of finalized_receipt_date when the checkbox for is_finalized_receipt is checked and back to null if it is unchecked. how do i do this? do i need to bind an onchange function (how?) or will computing for the value of finalized_receipt_date is fine when form is saved?