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

Many2one field not updating value on document save

By
Mircea
on 1/16/15, 8:44 AM 698 views

Hi, I created a custom field in database structure -> models for  the purchase.order, of type many2one, with relation to res.partner. I added that field on the form view for the purchase order, using  <field name="x_partner_contact" domain="[('parent_id','=',partner_id)]"/>.

It shows up poperly, the domain filter works accordingly, but when I save the purchase order, this field remains blank/unchanged. It only saves it the very first time I create a purchase order then if I try to edit it later it doesn't change when I save the order, it reverts to the first value I saved initially. The field is not readonly, and doesn't have any other atributes except the domain. Using oddo 7.

I don't understand why that happens, I've added many2one fields like this before and it worked normally. Even on the purchase order I've added other custom fields (text) and those are saved normally. Is there something else I must do/check? Can someone help me?

Thank you

0
Mircea
On 1/19/15, 8:29 AM

The problem was, that I set the translatable option on the field. I unchecked that on the model definition and the value displays correctly now.
 

Hi Mircea, you can follow Romanian adaptation of ODOO at https://github.com/odoo-romania/l10n-romania.

Fekete Mihai
on 1/27/15, 4:13 AM

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: 1/16/15, 8:44 AM
Seen: 698 times
Last updated: 3/16/15, 8:10 AM