This question has been flagged
1 Reply
2740 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



Avatar
Discard
Best Answer

Hi simon,


Did you got solution for your problem

Avatar
Discard