Skip to Content
Menu
This question has been flagged
1057 Views


Hello.
I want to make a context of field of type reference

The field in module quality_control of oca (odoo 12)

The field is

( object_id = fields.Reference(string='Reference', selection=lambda self: self.object_selection_values(), readonly=True, states={'draft': [('readonly', False)]}, ondelete="set null"))


We tried with : <field name="context">{'default_object_id': 'mrp.production', active_id}</field> but we had an error.

If you have any comment on this it would be great.

Thank You.

Avatar
Discard