问题
Is it possible to inherit from one xml and to change its updatable. I tried to inherit "Check Action Rules" to change the "interval_number" from 4 to 1 hours. To make it run every single hour. I don't think it may work because of noupdate="1". Anyone have any idea about this?
回答1:
Yes you can change the noupdate file by the help of hook. In the manifest file next to 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,
})
来源:https://stackoverflow.com/questions/41850027/can-we-able-to-inherit-and-change-the-noupdate-1-in-odoo