Help

2

override one2many field save method

Avatar
Eric

Hello, I need to override the one2many field save method for the sale_order. Does anyone know how to do that?

I created an inherited view of the sale_order_line form, and added a "support" selection field to it. If a user selects one of the options from the selection field, then it should create 2 sale_order_lines when the red Save & Close button is clicked.

Right now, it just adds 1 line to the one2many list by caching the data in the web browser. Then the record is created on the sale_order_line table when the red Save button is clicked on the sale_order form.

So I would like to override the save method on the sale_order_line form so that I can add a second line if i need to.

sale_order_line view:

image description

This is what I would like to see on the sale_order form. The two lines added to the list once I click on the Save & Close button from the inherited sale_order_line view

sale_order view

image description

but Im only getting the one line item instead

image description

Avatar
Discard