summaryrefslogtreecommitdiff
path: root/addons/website_customer/views
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2018-08-16 17:57:53 +0200
committerJeremy Kersten <jke@odoo.com>2018-08-31 16:37:45 +0200
commit47b00c5d533d8ab5e5f259a1e6b62b44343b49f4 (patch)
tree89ad0f1c8bc3965694e1c2c2c78b615c4f16c854 /addons/website_customer/views
parent9b1d1d57286c044129cfb7a004c5e6c1ae345077 (diff)
[FIX] base,website,web_editor: handle key field on ir.ui.view for multi website
With multi-websites, we expect qweb views to have a key set as it is the key that is used to find duplicates (two views with same keys are duplicate, the one with a website_id set is more specific than the one without a website_id) Thus, 5ff87e803967 sort on key in order to find the most suitable one. It would crash if a qweb view is created without a key (False) as it can't sort `bool` and `str`. This commit: - Adds a generated key to scss views - Adds an SQL constraint to avoid QWeb views without a `key` - Generates a random key when creating a QWeb view without a `key` - Handle False key in `filter_duplicate()` by extracting views with False key before sorting, and then adding these views to the recordset Note: We also want the key to be editable as it is now an important field with multiwebsite. Thus, we removed the readonly on this field. + fix python tests as we now force key on qweb views with sql constraint + pep8
Diffstat (limited to 'addons/website_customer/views')
0 files changed, 0 insertions, 0 deletions