Odoo Help

0

can i change field's attr in view from on_change?

By
Voathnak Lim
on 9/23/13, 1:46 AM 1,803 views

Hello, I have a requirement to change the property required and visible depend on comparing the value that user have just enter with the value from database. so can i change the required=True to False from on_change function? Thanks

0
DNTQ
On 9/23/13, 2:35 AM

Onchange in OpenERP on_change in OpenERP has 3 possible values returned finally in a dictionary or a {} .

1: The value dictionary i.e {field1:value1,field2:value2}

2: The domain dictionary i.e {field1:domain1}

3: The warning please check answer of Mr. Naresh Soni http://help.openerp.com/question/13900/how-to-return-a-domain-on-field-on-onchange-action/

Hello DNT, what i want is to hide the field or make the field require. but why you show me the domain. is using domain can hide the field?

Voathnak Lim
on 9/23/13, 5:09 AM

You can using atrrs="{required:[(your condition)]"

DNTQ
on 9/23/13, 6:28 AM

Thank you DNT, but how can i set it from on_change function?

Voathnak Lim
on 9/23/13, 1:34 PM

Can you show me your context???

DNTQ
on 9/24/13, 4:27 AM

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.

Register

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

0 follower(s)

Stats

Asked: 9/23/13, 1:46 AM
Seen: 1803 times
Last updated: 3/16/15, 8:10 AM