Hi, i am using Odoo 10. an with this code
treatment_id = medical_teeth_treatment_obj.create(vals);
when i load french language i get this error.
ValueError: Wrong value for medical.teeth.treatment.state: 'termin\xe3\xa9
Can you help me?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi, i am using Odoo 10. an with this code
treatment_id = medical_teeth_treatment_obj.create(vals);
when i load french language i get this error.
ValueError: Wrong value for medical.teeth.treatment.state: 'termin\xe3\xa9
Can you help me?
Thanks
"State" is most likely a selection field.
On a selection field, you have a list of key - value pairs:
fields.Selection([('approved', 'Approved'),
('to_approve', 'Needs approval'),
('none', 'Not required')],
string='MOE approval')
You should always use the 'key' when writing on that field. In the exemple i just gave you, you should set the state to "approved", "to_approve" or "none", and NOT on "Needs approval" for example.
Looking at your error message, it looks like you try to give if the string "terminé", which is most likely the value and not the key ;)
Also, key should avoid special characters such as 'é'
Yes of course i try to use string "terminé". i change it . In my case every string diffent of "completed" raise error when i try to validate my operation. Why? I beleive i am changing the key instead of the value af the field selection. Thanks. I will try to find the value and translate it.
if you don't have access to the source code, go in debug mode (web?... ==> web?debug) and put your mouse pointer on the field. Stay there for about one second and the different possible values will appear
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jul 23
|
2334 | ||
|
1
Dec 19
|
6015 | ||
|
1
Mar 16
|
4118 | ||
|
4
Mar 24
|
1604 | ||
|
0
Feb 24
|
1095 |
Can you add more of the Python code please? How do you create the object? Does any of the values contain a special character (for example é or ë)?
@Koffi can you able to find this solution??