Community: Framework mailing list archives

expert-framework@mail.odoo.com

Re: Set field attributes in views dynamically from python

by
Bogdan Lisnenko
- 10/27/2016 06:12:31
Maybe set condition in domain?

2016-10-27 12:52 GMT+03:00 Cristian Esposito <cristian.esposito@hotmail.com>:

Hi,


i need to set a domain on a standard field many2one, based on change of a custom value.

Example:

@api.one
@api.onchange('flag_riordino_products')
def onchange_flag_riordino_products(self):
if self.flag_riordino_products: # if this flag == True: need to set domain
# set domain
else:
# if the flag == False: no domain
Does someone have any idea?

Thanks a lot for your support

 

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe