Reputation: 11
I have a Many2one field of the res.country.state model and when I try to create a new record it always shows me a popup with the form view, Is there any way to prevent this and just create the new record
Code in the view
<field name="state_id" context="{'default_country_id': country_id}"
options="{'no_open': True}"/>
Code in the model
state_id = fields.Many2one('res.country.state', 'Issued Place', domain="[('country_id', '=?', country_id)]")
Upvotes: 1
Views: 93