Odoo Help


How to replace duplicate button in Openerp 7

on 12/24/15, 2:48 AM 575 views

I am trying to replace DUPLICATE button. I tried and add the button in base.xml

<button t-if="widget.is_action_enabled('duplicate')"
                type="button" class="oe_button on_button_duplicate oe_sidebar_action_a" target="_blank" >Duplicate</button>

But an i am unable to call the function. Where is the function located.

Remove DUPLICATE link from More dropdown and paste it next to EDIT or CREATE button.

On 12/24/15, 5:36 AM

I got solution

go to base.css file and and below line:

.openerp_ie .oe_view_manager_buttons button .oe_form_button_duplicate {
  padding-top: 0;
  padding-bottom: 0;

go to view_form.js and add below line: line number 180

this.$buttons.on('click', '.oe_form_button_create',
        this.$buttons.on('click', '.oe_form_button_edit',
        ***this.$buttons.on('click', '.oe_form_button_duplicate',
        this.$buttons.on('click', '.oe_form_button_save',
        this.$buttons.on('click', '.oe_form_button_cancel',

we will get that button.

go to base.xml and add below line:

<button t-if="widget.is_action_enabled('create')"
                type="button" class="oe_button oe_form_button_duplicate" >Duplicate</button>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/24/15, 2:48 AM
Seen: 575 times
Last updated: 12/24/15, 5:36 AM