Odoo Help

0

How to replace duplicate button in Openerp 7

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

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.

Register

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)

Stats

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