Odoo Help

Welcome!

This community 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.

0

How to replace duplicate button in Openerp 7

By
supreeth
on 12/24/15, 2:48 AM 462 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.

0
supreeth
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.guard_active(this.on_button_create));
        this.$buttons.on('click', '.oe_form_button_edit',
                         this.guard_active(this.on_button_edit));
        ***this.$buttons.on('click', '.oe_form_button_duplicate',
                         this.guard_active(this.on_button_duplicate));***
        this.$buttons.on('click', '.oe_form_button_save',
                         this.guard_active(this.on_button_save));
        this.$buttons.on('click', '.oe_form_button_cancel',
                         this.guard_active(this.on_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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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