Odoo Help

2

override one2many field save method

By
Eric
on 3/19/14, 5:52 PM 1,973 views

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

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

0 follower(s)

Stats

Asked: 3/19/14, 5:52 PM
Seen: 1973 times
Last updated: 9/20/16, 10:15 AM