Saturday, April 15, 2023
1 change · master
Miscellaneous changes
Amongst other changes, odoo/enterprise#20514 added the generation of tree and search views to the worksheet models. However it did not generate the corresponding XIDs (similar to the form view). This means when the host module is uninstalled `ir.model` generates a warning (from `_prepare_update`) that fields were force-deleted and views may be broken. By associating a xid with the view, the deletion of the module will cause the deletion of the view, and thus no view to be broken when the work
Original PR description
Amongst other changes, odoo/enterprise#20514 added the generation of tree and search views to the worksheet models. However it did not generate the corresponding XIDs (similar to the form view). This means when the host module is uninstalled `ir.model` generates a warning (from `_prepare_update`) that fields were force-deleted and views may be broken. By associating a xid with the view, the deletion of the module will cause the deletion of the view, and thus no view to be broken when the worksheet template model is deleted. While at it, extract a utility to record records to generate xids for, so future changes are easier to implement (the utility returns the records so it can be chained / wrapped around a create). Also: - move some validations higher in the method - bulk-create the views in a single call - do the same for ACL and record rules Forward-Port-Of: odoo/enterprise#39793 Forward-Port-Of: odoo/enterprise#39767