How to remove "save&new" button from popup in odoo?

I have a one2many field, and when I click to create a new record, I have 2 buttons.

I want to remove the "Save & New" button and keep the "Save & Close" button.


I hope you do not mind sleazy hacks.

In your form view you can try this. You may need to clear your cache before it works for you. This is only sensible if you do not want it to appear but its not really a security thing just for looks and process. You may need to ensure the class selector is correct for your version.

I tested this by placing it in the xml for the form view that appears, not in the xml for the form view that you are adding a new one2many record within. So to be clear this css needs to be in the form view that pops up and contains the "Save & New" button.

     .oe_abstractformpopup-form-save-new {
          display:none !important;

I know there's an option disable_multiple_selection that you can turn on/off to show/hide that button. I don't know if it's usable within a XML definition of a view/form/field but if this is not the case you could try to do it via JS.

This is the place

Try to give access of only write, remove access of create for the related form object.

Need Your Help

How to remove *.php, index.php, and trailing slash from ulrs, before #ancors, and ?queries in htaccess

apache .htaccess mod-rewrite

I am unable to find a satisfiable answer to my problem. It's been three days of surfing and finding nothing that actually works.

Why won't VS2010 RC use my existing types when I add a service reference?

wcf web-services visual-studio-2010

I have a huge problem getting services references in VS2010 RC to use existing assemblies.