Skip to Content
Menu
This question has been flagged
1 Reply
88 Views

I have created a custom form in my custom module. The form does not have any required fields, and I also added a Submit button.

The issue is: whenever I type or select anything in the form, due to Odoo’s auto-save functionality, a record is created in the database without clicking the Submit button.

I want to avoid this auto-save behavior so that a record is only created when I click on the Submit button.

How can I achieve this without using a wizard or setting edit="false" / create="false"? Based on my logic, I cannot use those approaches.

Avatar
Discard
Best Answer

Hello navedhusain,

In Odoo, a <form> view is always tied to a record.

When you type in a new form, Odoo must create() a record so it has an id to track changes and run onchange. That’s why auto-save happens.

👉 Therefore, you cannot disable auto-save in a standard form view unless you:

  1. Use a TransientModel (temporary model).
  2. Override JS controllers (FormController / FormRenderer).
  3. Set edit="false" / create="false".

⚠️ There’s no XML option to turn off auto-save.

✅ Odoo-native solution:

  • Use a TransientModel for your form (it doesn’t have to be a popup wizard).
  • On Submit, explicitly create the real record in your main model.

👉 Short answer:

Without a TransientModel or JS override, it’s impossible to avoid auto-save in Odoo forms.

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 25
198
0
Aug 25
124
1
Aug 25
302
3
Aug 25
300
1
Aug 25
463