Odoo Help


How to create two new records in sub view?

on 3/18/14, 2:52 PM 1,524 views

Hello, I am trying to create a second sale_order_line item if one of the options from the support field is selected from the sale_order_line sub view.

image description

When I click on the red Save & Close button then it creates a new line item for the product like it should, but I also want to create a second line item for the support if it was checked from the sub view

image description

I know that the sale order line isnt actually saved to the database until the red Save button is clicked on the main form. So how does the sale order line get updated on the list box, and how can I add the support line to it from the sub view

So I found out that the red Save & Close button does not create a record, but instead saves the data in the browsers cache. Then the data is displayed on the one2many list found in the main form. Once the red Save button is clicked then the create method is executed and writes the records in cache to the related table. Does anyone know how I can override the method that saves the data in cache, so that a second line appears if a support option is selected from the sub view?

on 3/19/14, 3:25 PM

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

0 follower(s)


Asked: 3/18/14, 2:52 PM
Seen: 1524 times
Last updated: 3/16/15, 8:10 AM