summaryrefslogtreecommitdiff
path: root/addons/website_event/views
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2018-12-21 15:56:18 +0000
committerRomain Derie <rde@odoo.com>2019-01-04 15:50:45 +0000
commit30ed4c08ccf3586134757bf006fc76f814d964a7 (patch)
tree85c5122e16fa7ec38e4f4dbf993530111dfd5453 /addons/website_event/views
parent59cc261448b67c424051a623c5c8d76ddd20aa71 (diff)
[FIX] website_*: prevent record to be unpublished on website change
Before this commit, when changing the website field in a record form view, the is_published field would be force to false, ending unpublishing the record if it was published. That behavior was coming from the fact that is_published field is missing from the form view. Thus, onchange on website is triggering a recompute server side without is_published as the JS framework is not sending the field. The ORM is then fallbacking on default Boolean value (False) for is_published when sending back the onchange result. This would only appear on object with 'website.published.multi.mixin' and with website_id in the form view. Replacing website_published by is_published will fix the behavior and has more sense has website_published is the 'is_published' state in a website context. In the backend, we are not in a website context. task-1919689
Diffstat (limited to 'addons/website_event/views')
-rw-r--r--addons/website_event/views/event_views.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_event/views/event_views.xml b/addons/website_event/views/event_views.xml
index 7e4df97c36a..a5c25cc2611 100644
--- a/addons/website_event/views/event_views.xml
+++ b/addons/website_event/views/event_views.xml
@@ -39,7 +39,7 @@
type="object"
class="oe_stat_button"
icon="fa-globe">
- <field name="website_published" widget="website_button"/>
+ <field name="is_published" widget="website_button"/>
</button>
</button>
<label for="is_online" position="after">