Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5809 Visualizzazioni

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

Avatar
Abbandona
Autore Risposta migliore

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.
 

Avatar
Abbandona

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

Post correlati Risposte Visualizzazioni Attività
2
feb 25
5965
1
dic 24
1494
1
nov 22
16062
3
ago 22
13117
2
ago 22
4562