summaryrefslogtreecommitdiff
path: root/addons/website/data/website_data.xml
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-05-31 08:24:49 +0000
committerNicolas Martinelli <nim@odoo.com>2019-06-04 08:30:08 +0000
commit16f9375dab793b802fb13467d6b70821373d3df2 (patch)
tree03547cb1df9a5b42eede880d1f86a2699488f75a /addons/website/data/website_data.xml
parent7ff8eb0c15dbdc7fe584b5bfd59a230a2e507d11 (diff)
[FIX] website: website-specific child views
On a eCommerce page were there was no SEO optimization change: - Customize > Activate "eCommerce categories" - Customize > Activate "Colapsible category list" - Promote > Optimize SEO > Change description > Save Nothing happens. Actually, an SQL error is raised because of the `ondelete='restrict'` set at: https://github.com/odoo/odoo/blob/897feb553e6ef75af9434cb77436b26abde3a761/odoo/addons/base/models/ir_ui_view.py#L212 In this case, we have the following structure: ``` View 1 | ---> View 2 (Website-specific) | ---> View 3 (Website-specific) ``` For example: ``` Products | ---> eCommerce Categories (Website-specific) | ---> Collapsible Category List (Website-specific) ``` Since the inherited view (View 2) is website-specific, we duplicate it and try to unlink it. However, this view has children, which raises the error. To solve the issue, we re-attach the children of the inherited view to its copy. In a realistic situation, the children of a website-specific view should also be website-specific, so there is no need to apply the 'copy or re-attach' logic recursively. We end up with: ``` View 1 (Website-specific, duplicated) | ---> View 2 (Website-specific, duplicated) | ---> View 3 (Website-specific) ``` opw-1997946 closes odoo/odoo#33787 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/website/data/website_data.xml')
0 files changed, 0 insertions, 0 deletions