How it works...

In order to create a custom quick create option, we need to create a minimal form view. We did this in step 1. We added two required fields, because creating a record without these would generate an error.

In step 2, we added this new form view into the kanban view. Using the quick_create_view option, you can map the custom form view to the kanban view. We also added one extra option—on_create="quick_create". This option will display a quick create form in the first column when you click on the Create button in the control panel. Without this option, the Create button will open a form view in editable mode.

You can disable the quick create feature by adding quick_create="false" on the kanban tag.

The quick_create_view option was added in Odoo version 12. In previous versions, the quick create option only displayed the name field. If you have some other required fields, you need to override name_create() to set other values. You can set default values to the required field if you don't want to override the name_create() method.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset