Odoo Help


field does not store value in DB

on 4/21/15, 5:01 PM 814 views

The field "credit_limit" in res.partner object does not save its value in DB after i set it !!!

any ideas about this please!

On 4/22/15, 3:45 AM

it's a field of type float.

'credit_limit': fields.float('Credit limit'),

Solved: The field was declared twice in the the same xml form. it has to be unique per record to store values in DB

on 4/25/15, 1:50 PM
Jerome Guerriat
On 1/19/17, 9:09 AM

I just had the same problem and lost an hour trying to figure it out.

You should NOT use twice the same field in the same form. We wanted to move a field from one page of a notebook to another. To avoid potential xpath errors it was not replaced from its original place, but only made invisible. And we added it on the page we wanted..

It means that the invisible field was correctly set, but not rendered. When editing the second field, it looked like it was working (field was set, even after clicking on save), but when reloading the page, it disappeared.

Not hard to fix, but a bit confusing to understand why that single field couldnt be edited :)    

Marvin Haß
On 4/22/15, 3:15 AM

in odoo v8 the problem sould be resolved with (if credit_limit is an computed field):

credit_limit = fields.xxx(store=True)

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

1 follower(s)


Asked: 4/21/15, 5:01 PM
Seen: 814 times
Last updated: 1/19/17, 9:09 AM