Wednesday, July 3, 2024
2 changes · saas-17.1
Resolved issues and error corrections
This fixes an automated test for Belgian salary contract signatures that could fail depending on the time of day it ran. The test now uses a consistent daytime setting, making validation more reliable without changing user-facing behavior.
This fixes an error that could occur in Studio when users tried to open a newly created listing page from the website menu. The “View in Website” option now appears only where it is relevant and opens correctly, reducing disruption while configuring website content.
Original PR description
Steps to reproduce ================== - Install website_studio - Open any app - Open studio - Click on the website tab - Create a new listing type and confirm - Click on the three dots - View in…
Steps to reproduce ================== - Install website_studio - Open any app - Open studio - Click on the website tab - Create a new listing type and confirm - Click on the three dots - View in website => TypeError: Cannot read properties of undefined (reading 'action') Cause of the issue ================== Before https://github.com/odoo/enterprise/pull/49809/commits/7980155915f25128e7cb8d5a0af91ffe45bb44c7 ```xml <t t-set="onItemClicked" t-value="page.page_type === 'listing' ? this.openPageUrl.bind(this, page) : this.onConfigurePage.bind(this, page)" /> <t t-set="openPageUrl" t-value="page.page_type === 'listing' ? onItemClicked : null" /> <DropdownItem t-if="openPageUrl" onSelected="openPageUrl" href="'#'">View in website</DropdownItem> ``` in the new version, `t-if="openPageUrl"` was always true because `openPageUrl` refers to the function and not the template variable. The function was also not bound to `this`. Solution ======== - The "View in Website" button should only be displayed for pages of listing type. - We add the this to the function call opw-3987521