- For Many2many, open the new form view and hide the "New" button,
The effect after hiding
Add the field in xml
<field name="production_line_ids"
options="{
'no_create': True}"/>
# options="{'no_create': True}"
Add options="{'no_create': True}" to hide it
- For One2many, open the new form view and hide the "Save and New" button. The
hidden effect
is added in the scss file
.modal-footer .btn-primary:nth-of-type(2) {
display: None;
}
Import scss file
<template id="production_front" name="production settings" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/scss" href="/production/static/src/scss/production_style.scss"/>
</xpath>
</template>
After adding, the One2many "Save and New" button of the entire system is hidden