summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-01-03 18:35:59 +0000
committerRomain Derie <rde@odoo.com>2019-01-10 16:19:35 +0000
commitb5fe23055d808026272fa0806c46cead49612c84 (patch)
treeeb02c0f96d7c631d254dbc22dc80619230e3b70e /addons/web/static/src/js/views/basic/basic_controller.js
parent20e9d77be824c87b1d8e045bcc8f7c15c34a7836 (diff)
[FIX] website: handle COW'd views during module install/update
Since multi-website, we COW (copy on write) views when editing a view on a website. This is causing 2 issues related to module install/update: 1. During a module install, when creating an inherited view, it will create that view as expected on the generic tree. But that generic tree may not be used on website(s). Indeed, if the view was edited, we are now using a copy of the view instead of the original XML view (with an xml_id). That copied view won't get the new inherited view in its view tree. Now, we correctly copy the new view under every specific view tree (if exists). 2. During a module update, when updating a view, it will only update the view having the xml_id, so the generic one. But most of the time, the generic view is not used as it was usually COW'd and the specific view now replace the generic one. Now, we also apply the update on the COW'd view. Note that only unmodified field will be updated, this behavior basically mimic the noupdate behavior on view's ir.model.data. Step to reproduce for bug 1: - Install website_sale module - Go to a product page and then enter edit mode - Make a modification to trigger COW, eg edit the information area under the price "30-day money-back guarantee". - Now install website_sale_comparison module - The product page won't have the comparison button as the comparison view inheriting the product view was created on the generic tree and not copied on the specific tree (COW'd before the comparison module install). Step to reproduce for bug 2: - Repeat first 3 steps of bug 1 - Now make a modification in a view from the XML file in website_sale_comparison module and update the module - Only the view with the xml_id is updated, not it's COW'd views. This mean that only the generic view is updated and not the specific one(s) really used on the website. task-1920487 closes odoo/odoo#29956
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions