Community: Framework mailing list archives

expert-framework@mail.odoo.com

Set field attributes in views dynamically from python

by
Cristian Esposito
- 10/27/2016 05:46:16

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