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

Avoid storing one2many field on database openerpv7

By
Yassine TEIMI
on 12/12/14, 6:05 AM 644 views

I added a one2many field on a view, the purpose of this is to have a view of another object (stock.picking), and not to store data on this other object (stock.picking).

So I made an onchange method that displays data on this one2many field, but when actionning the save button it tries to save the data on the one2many field, is there any solution to override the orm create method, so as to don't save the one2many field data displayed by the onchange ? 

I made the one2many field on readonly=True, it no longer store the data diplayed, but I want to be able to edit this data and at the same time this data not to be stored on DB. 

If you could elaborate why you need it, maybe a better help can be provided. For now, it seems that you are trying to workaround for something and face a stumbling block. Maybe the workaround need to be changed.

Ivan
on 12/12/14, 7:10 AM
0
Tidy Way
On 12/12/14, 9:44 AM

Hello Yassine,

According to me you put a one button instead of onchange ,call one "small osv memory wizard" to display your one2many data via default_get.

No need to override the any orm methods.

Thanks

Rohan Nayani(www.tidyway.in)

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

2 follower(s)

Stats

Asked: 12/12/14, 6:05 AM
Seen: 644 times
Last updated: 3/16/15, 8:10 AM