Can we inherit and change noupdate = "1" in an ode?

Is it possible to inherit one xml and change it updated. I tried to inherit the "Check Action Rules" to change the "interval_number" from 4 to 1 hour. So that it works every hour. I do not think this might work due to noupdate = "1". Anyone got any about this?

+4
source share
1 answer

Yes, you can modify the noupdate file with hook. In the manifest file next to the data add'post_init_hook': 'post_init_hook',

create hooks.py file

def post_init_hook(cr, registry):
    env = api.Environment(cr, SUPERUSER_ID, {})
    orginalxml=env.ref('module.external id')
    orginalxml.write({'field_name_to_inherit':value,
    })
+3
source

Source: https://habr.com/ru/post/1667750/


All Articles