Daily updates from Odoo
Wednesday, January 9, 2019
3 changes
Resolved issues and error corrections
Changing the assigned website on website-related records no longer accidentally unpublishes content that was already live. This protects published pages, products, events, jobs, and partner records from disappearing during routine back-office edits.
Original PR description
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
This fix prevents an error that could appear when users enabled settings or refreshed a page without a record ID. It improves reliability in the web interface by handling missing page information correctly.
Original PR description
- at the time of making datapoint currentId passed is "" (blank string). this is because currentId is "" in params. but after '_extractParamsFromAction' this method it becomes undefined which is…
- at the time of making datapoint currentId passed is "" (blank string). this is because currentId is "" in params. but after '_extractParamsFromAction' this method it becomes undefined which is correct but _.defaults set default value "" as it is undefined. - So, set currentId undefined if it is "" Related commit: https://github.com/odoo/odoo/commit/40dd121938552d3f88289d2e5fcd1d57a0dd01bb#diff-e4abcc1db44a1bf2e663576a3b0975deR92 Issue: 1916837 Description of the issue/feature this PR addresses: got a traceback when try to enable any setting. Current behavior before PR: got a traceback when try to enable any setting. Desired behavior after PR is merged: traceback resolved when enable setting or when a refresh of a page without id. Issue: https://www.odoo.com/web#id=1916837&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.916b21ffbf1d0db10b8ad88d15a0559b -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Changing the assigned website on certain website-related records no longer accidentally unpublishes content that was already live. This helps avoid unexpected visibility changes for appointments, helpdesk pages, and Twitter wall content when administrators update website settings.
Original PR description
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