From cc1d78a80b518bd5eaec7eb70d7bc14ec4c31275 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 13 May 2019 17:29:24 +0000 Subject: [IMP] *: correctly read/write website_published The `website_published` field from the website's mixins is basically a readonly from `is_published` field. On read, this field will simply read `is_published` and check if the record's website_id is accessible (only for the multi mixin). On write, it will always write on `is_published`. This commit improves a few things: - A lot of code was writting on website_published which was just then writting on is_published. Writting directly on is_published makes more sense. - Some backend fields would still reference `website_published` instead of `is_published` which would just go through the related for no reason. Plus, using `is_published` will make the field tooltip more accurate as we are not in a website context ('Visible on current website' to 'Is Published') - Filter and search on tree view were still using the `website_published` related field, which is just a readonly when we are not in a frontend context. - Some create and write function would have security check on `website_published` value but that was wrong as the user could bypass that by simply writting on `is_published`. For the write method, check `is_published` is more accurate as it will cover both case since `website_published` will then call the write method on `is_published` --- addons/website_slides/data/gamification_data.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addons/website_slides/data/gamification_data.xml') diff --git a/addons/website_slides/data/gamification_data.xml b/addons/website_slides/data/gamification_data.xml index 08606251fad..4cb9ce47af7 100644 --- a/addons/website_slides/data/gamification_data.xml +++ b/addons/website_slides/data/gamification_data.xml @@ -6,7 +6,7 @@ Get started Register to the platform - + bronze nobody @@ -47,7 +47,7 @@ Know yourself Complete your profile - + bronze nobody @@ -89,7 +89,7 @@ Power User Complete a course - + silver nobody @@ -129,7 +129,7 @@ Certified Knowledge Get a certification - + gold nobody @@ -170,7 +170,7 @@ Community hero Reach 2000 XP - + gold nobody -- cgit v1.2.3