Odoo Help

Welcome!

This community 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.

0

How to create two new records in sub view?

By
Eric
on 3/18/14, 2:52 PM 1,120 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?

Eric
on 3/19/14, 3:25 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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