[IMP] util.update_record_from_xml
Set the xml_filename argument of the xml_import records.
upgradeci retry with always only hr
After some tests, it doesn't work as expected in all cases.
ir.ui.view: works correctly due to thearchfield being computed with aninversefunctiontheme.ir.ui.view: just read in thedefaultfunction, so not updated duringwritetemplate.reset.mixin({mail,sms}.template): set in thecreateoverwrite only.
Maybe all those usages should be standardized in a common mixin which also handle the update.
After some tests, it doesn't work as expected in all cases.
* `ir.ui.view`: works correctly due to the `arch` field being computed with an `inverse` function * `theme.ir.ui.view`: just read in the `default` function, so not updated during `write` * `template.reset.mixin` (`{mail,sms}.template`): set in the `create` overwrite only.
theme.ir.ui.view: can't we just add@api.depends('arch')here https://github.com/odoo/odoo/blob/07626050bd0104fecd8799b56d30245d00da3f27/addons/website/models/theme_models.py#L56 ?template.reset.mixin: we can do inwritethe same as increate, https://github.com/odoo/odoo/blob/07626050bd0104fecd8799b56d30245d00da3f27/addons/mail/models/template_reset_mixin.py#L30-L36 (in master it could be extracted to a local private method...)
Maybe all those usages should be standardized in a common mixin which also handle the update.
I think this could be an option if this becomes more widely use. For current cases it looks very localized and (if I'm not mistaked) with a simple solution. The mixin may add extra complexity that we don't need for these few cases.
theme.ir.ui.view: can't we just add@api.depends('arch')here https://github.com/odoo/odoo/blob/07626050bd0104fecd8799b56d30245d00da3f27/addons/website/models/theme_models.py#L56 ?
No, it's not enough. It should be set in create and write, like for other models.
theme.ir.ui.view: can't we just add@api.depends('arch')here https://github.com/odoo/odoo/blob/07626050bd0104fecd8799b56d30245d00da3f27/addons/website/models/theme_models.py#L56 ?No, it's not enough. It should be set in
createandwrite, like for other models.
What I had in mind was that the field should be a computed stored field, with "depends". I missed that it was just default=...
