Odoo Help


Adding a button to a row in one2many_list widget

Simon Lee
on 3/19/16, 8:29 AM 774 views

Hi All,

I am trying to find a way to implement a way to split a line of an incoming shipment by adding a button to a row of the one2many_list widget.

Here's the scenario.

1) I create a PO0001 with just one item in it

    Ice Cream     20 pcs     $10/pc            $200

2) When I receive the shipment, the goods have 2 different expiry dates, 20160730 and 20160830

    The odoo9 incoming shipment form will show one row:

    Ice Cream    20 pcs      blank-to-be-fill-with-expiry-date

    I want to add a button to each row of the one2many_list widget as followed:

    Ice Cream    20 pcs      blank-to-be-fill-with-expiry-date    Split-Button-Icon

    When the "Split-Button-Icon" of the row is pressed, it will duplicate the line so it will look like this:

    Ice Cream    10 pcs      blank-to-be-fill-with-expiry-date    Split-Button-Icon

    Ice Cream    10 pcs      blank-to-be-fill-with-expiry-date    Split-Button-Icon

    Now I can enter the expiry date and the quantity accordingly as followed and confirm the receipt.

    Ice Cream    10 pcs      20160730    Split-Button-Icon

    Ice Cream    10 pcs      20160830    Split-Button-Icon

My question is to have an example of adding an icon-button to the odoo9 one2many_list widget. Also, when clicking on the button, how to write an action to duplicate and insert the current row right after the current row in the one2many_list widget. Your kind advise is much appreciated.

Simon Lee

Chandran N Nepolean
On 5/18/17, 10:25 AM

Hi simon,

Did you got solution for your problem

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: 3/19/16, 8:29 AM
Seen: 774 times
Last updated: 5/18/17, 10:25 AM