How to remove the create option that appears in "search more" view.
I tried with no_create and few things, but did not help. Anyone have any idea on this?
many2one widget (default)
Options : Other possible options you can use with this widget.
Example:
<field name="field_name" options="{'no_quick_create': True, 'no_create_edit' : True}"/>
Many2many
widget (default)
Options
- no_create - remove the “Create” button.
Example
<field name="field_name" options="{'no_create': True}"/>
many2many_tags widget
Options
no_quick_create - remove the Create and edit... option.
no_create_edit - remove the Create "search_value" option.
no_create - no_quick_create and no_create_edit together.
Example
<field name="field_name" widget="many2many_tags" options="{'no_create_edit': True}"/>
In order to remove CREATE button from search popup, you need to remove it from ~/web/static/src/xml/base.xml file
there is code which add this button into that search wizard. This button is adding conditionally to the wizard but
no_create:True
is not working somehow. So if you want to remove it from every wizard then just remove it from file else think something how to hide that field conditionally.
<t t-name="SelectCreatePopup.search.buttons">
<t t-if="! widget.options.disable_multiple_selection">
<button type="button" class="oe_button oe_selectcreatepopup-search-select oe_highlight" disabled="disabled">Select</button>
</t>
<t t-if="!widget.options.no_create">
<button type="button" class="oe_button oe_selectcreatepopup-search-create">Create</button>
or </t><a class="oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a>
</t>