Wednesday, June 19, 2024
23 changes · saas-17.1
Miscellaneous changes
This commit addresses the same issue as in https://github.com/odoo/odoo/pull/137214 which is overflowing of search bar menu items when their name is too long while also adapting some width values and make it apply to the website name column. It also adds a height value to the containers so that the bottom is no longer squished when the content overflows and finally adds tooltips for long item names which will most likely be truncated. opw-3963754 Forward-Port-Of: odoo/odoo#169958 Forward-Po
Original PR description
This commit addresses the same issue as in https://github.com/odoo/odoo/pull/137214 which is overflowing of search bar menu items when their name is too long while also adapting some width values and make it apply to the website name column. It also adds a height value to the containers so that the bottom is no longer squished when the content overflows and finally adds tooltips for long item names which will most likely be truncated. opw-3963754 Forward-Port-Of: odoo/odoo#169958 Forward-Port-Of: odoo/odoo#169655
Problem --------- When the OCR was deactivated, the attachments from the mail would get deleted. Solution --------- By default, when requesting a decoder, return a function that returns False. That way, we always have a 'decoder' and attachments create an invoice. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169861
Original PR description
Problem --------- When the OCR was deactivated, the attachments from the mail would get deleted. Solution --------- By default, when requesting a decoder, return a function that returns False. That way, we always have a 'decoder' and attachments create an invoice. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169861
**Steps to reproduce:** - Install Sale and Project modules - Create a project with 1 or 2 stages - Create more than 1 task in this project - Assign those tasks to a Sale order - Go to this sale order and click on tasks smart button **Current behavior before PR:** When clicking on the task smart button in a sale order you will see lots of stages that are not associated with the shown tasks' project. This is happening because the value assigned to default_project_id in the context is
Original PR description
**Steps to reproduce:** - Install Sale and Project modules - Create a project with 1 or 2 stages - Create more than 1 task in this project - Assign those tasks to a Sale order - Go to this sale order and click on tasks smart button **Current behavior before PR:** When clicking on the task smart button in a sale order you will see lots of stages that are not associated with the shown tasks' project. This is happening because the value assigned to default_project_id in the context is False. https://github.com/odoo/odoo/blob/saas-16.4/addons/sale_project/models/sale_order.py#L166 **Desired behavior after PR is merged:** We are now just showing the stages associated with the shown tasks' project by assigning those tasks' project id to the default_project_id value in context. opw-3929012 Forward-Port-Of: odoo/odoo#169684 Forward-Port-Of: odoo/odoo#168035
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes 'o_bottom_fixed_element' and 'o_bottom_fixed_element_move_up' This commit reintroduce this auto move up behavior by default within the OWL component by listening to the scroll event of the document and identifying whenever we reach the end of the document. It is useful so we ensure the users can click all l
Original PR description
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes…
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes 'o_bottom_fixed_element' and 'o_bottom_fixed_element_move_up' This commit reintroduce this auto move up behavior by default within the OWL component by listening to the scroll event of the document and identifying whenever we reach the end of the document. It is useful so we ensure the users can click all links potentially present in the footer. If the icon is dragged and moved elsewhere, we prevent this smart behavior from happening until next refresh of the state. Commit introducing the drag & drop feature : https://github.com/odoo/odoo/commit/d9f07235484 Commit of the OWL refactoring : https://github.com/odoo/odoo/commit/20c1772d Steps to reproduce : - Install LiveChat - Toggle Mobile display - Scroll down to the bottom of page -> The livechat floating icon doesn't go up as it was before task-3946855 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169383
## Issue: - When purchasing consecutive appointments on the website using eWallet, an error occurs: "It is forbidden to modify a sales order which is not in draft status." ## Steps To Reproduce: - Create an eWallet program and generate a coupon for the test user. - On the eCommerce site, navigate to the "Appointments" tab. - Select a paid appointment and pay using eWallet credit. - After completing the payment, return to the "Appointments" tab. - Repeat the same steps to purchase anothe
Original PR description
## Issue: - When purchasing consecutive appointments on the website using eWallet, an error occurs: "It is forbidden to modify a sales order which is not in draft status." ## Steps To Reproduce: - Create an eWallet program and generate a coupon for the test user. - On the eCommerce site, navigate to the "Appointments" tab. - Select a paid appointment and pay using eWallet credit. - After completing the payment, return to the "Appointments" tab. - Repeat the same steps to purchase another appointment. - Encounter the error: "It is forbidden to modify a sales order which is not in draft status." ## Solution: - In `shop_payment_validate`, when an order is fully paid using a discount or eWallet, the eCommerce website context are not cleared. - To fix this, call the `sale_reset` method before redirecting to the SO page. opw-3885533 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167133
Before this PR: When loggin into a company, it would simply add the new company in the list of the currently selected/active companies, this made it harder to use or stay in single-company mode. After this PR: Logging into a company will now switch companies if we are in single-company mode, essentially making the user stay in single-company mode. The user can still toggle companies to enter multi-company mode. *This behaviour got lost when adding the branches system in the company s
Original PR description
Before this PR: When loggin into a company, it would simply add the new company in the list of the currently selected/active companies, this made it harder to use or stay in single-company mode. After this PR: Logging into a company will now switch companies if we are in single-company mode, essentially making the user stay in single-company mode. The user can still toggle companies to enter multi-company mode. *This behaviour got lost when adding the branches system in the company service.* Task ID: 3927141 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#168759 Forward-Port-Of: odoo/odoo#165227
In Point of Sale > Configuration > Settings enable 'Global Discounts' Create a tax [TAX A] included in price Create a tax [TAX G] as group of taxes, including only [TAX A] Configure a product [PROD] with [TAX G] Open POS session Add [PROD], hit 'Discount' button, add 50% discount Issue: Tax will not be included in the discount This occurs because the system does not take into account the tax group opw-3576452 Forward-Port-Of: odoo/odoo#169669 Forward-Port-Of: odoo/odoo#146337
Original PR description
In Point of Sale > Configuration > Settings enable 'Global Discounts' Create a tax [TAX A] included in price Create a tax [TAX G] as group of taxes, including only [TAX A] Configure a product [PROD] with [TAX G] Open POS session Add [PROD], hit 'Discount' button, add 50% discount Issue: Tax will not be included in the discount This occurs because the system does not take into account the tax group opw-3576452 Forward-Port-Of: odoo/odoo#169669 Forward-Port-Of: odoo/odoo#146337
Add an option to restrict users from creating language on mobile self-order & kiosk mode. task - 3980908 Forward-Port-Of: odoo/odoo#168804
Original PR description
Add an option to restrict users from creating language on mobile self-order & kiosk mode. task - 3980908 Forward-Port-Of: odoo/odoo#168804
[This commit] introduced a new module, but the module was not added to the tx config file. Because of this, the terms to translate were not pushed to Transifex and could not be translated. This commit adds the entry, so the terms will be available on Transifex. [This commit]: https://github.com/odoo/odoo/commit/e5097a183ab65ff3dd04f3f4dd16182acd329018 Forward-Port-Of: odoo/odoo#169935
Original PR description
[This commit] introduced a new module, but the module was not added to the tx config file. Because of this, the terms to translate were not pushed to Transifex and could not be translated. This commit adds the entry, so the terms will be available on Transifex. [This commit]: https://github.com/odoo/odoo/commit/e5097a183ab65ff3dd04f3f4dd16182acd329018 Forward-Port-Of: odoo/odoo#169935
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.2.10 https://github.com/odoo/owl/releases/tag/v2.2.11 These releases contain small improvements * v2.2.10 [IMP] runtime: allow using any class as a type in props validation Update reactivity.md [IMP] owl-vision: Better snippets [FIX] docs: code in example cannot run * v2.2.11 [FIX] compiler: better support for arrow function and function call [IMP] owl-vision: Autocomplete and added missing owl dir
Original PR description
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.2.10 https://github.com/odoo/owl/releases/tag/v2.2.11 These releases contain small improvements * v2.2.10 [IMP] runtime: allow using any class as a type in props validation Update reactivity.md [IMP] owl-vision: Better snippets [FIX] docs: code in example cannot run * v2.2.11 [FIX] compiler: better support for arrow function and function call [IMP] owl-vision: Autocomplete and added missing owl directives [IMP] index: export batched utility function [FIX] playground: correctly escape backslashes and interpolation sigils [FIX] compiler: correctly escape special characters in template literals [FIX] Typo docs [FIX] runtime: don't emit async hook warnings when cancelled/destroyed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169745
This commit adds 3 missing payment method logos: 7eleven, Cashalo and Cebuana. task-3994673 | Before | After | |--------|--------| |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forwa
Original PR description
This commit adds 3 missing payment method logos: 7eleven, Cashalo and Cebuana. task-3994673 | Before | After | |--------|--------| |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169647
### Steps to reproduce: - Create a storable product P with a BOM with two raw lines: - 1 unit x COMP 1 - 1 unit x COMP 2 - Create and confirm a manufacturing order for 1 unit of P - Click on the list icon of the stock move of COMP 1 and close the x2many dialog tab with cancel - Change the qty_producing of the MO to 1 and then click anywhere on the form of the MO to trigger the associated onchange ### Cause of the Issue: Clicking on the list icon of the stock.move will trigger the
Original PR description
### Steps to reproduce: - Create a storable product P with a BOM with two raw lines: - 1 unit x COMP 1 - 1 unit x COMP 2 - Create and confirm a manufacturing order for 1 unit of P - Click on the list…
### Steps to reproduce: - Create a storable product P with a BOM with two raw lines: - 1 unit x COMP 1 - 1 unit x COMP 2 - Create and confirm a manufacturing order for 1 unit of P - Click on the list icon of the stock move of COMP 1 and close the x2many dialog tab with cancel - Change the qty_producing of the MO to 1 and then click anywhere on the form of the MO to trigger the associated onchange ### Cause of the Issue: Clicking on the list icon of the stock.move will trigger the `extendRecord` method: https://github.com/odoo/odoo/blob/f8182fb625eb3e20c85388d4c342553af4fe7ab9/addons/web/static/src/model/relational_model/static_list.js#L195-L198 This trigger will then add the `move_line_ids` to the fields and active fields of the stock.move of COMP 1. Closing the x2many dialog and changing the `qty_producing` of the mo will then trigger this onchange call: https://github.com/odoo/odoo/blob/f8182fb625eb3e20c85388d4c342553af4fe7ab9/addons/mrp/models/mrp_production.py#L806-L807 This one will update the stock move values of both components. However, the stock move associated to COMP 2 was not extended and the `move_line_ids` field that record will be accessed to determine its invisible attribute: https://github.com/odoo/odoo/blob/f8182fb625eb3e20c85388d4c342553af4fe7ab9/addons/web/static/src/model/relational_model/static_list.js#L546-L547 Since the result is undefined a client error is thrown. opw-3923341 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167217
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date (`maturity_date`) is 2024-06-29 Cause: Use of `relativedelta` with the singular form of `month` -> absolute value It was set to 2 so it would always give 29 -> year-02-29 and so `days_next_month = relativedelta(days=min(int(self.days_next_month), (date_end_of_month + relativedelta(mont
Original PR description
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date…
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date (`maturity_date`) is 2024-06-29 Cause: Use of `relativedelta` with the singular form of `month` -> absolute value It was set to 2 so it would always give 29 -> year-02-29 and so `days_next_month = relativedelta(days=min(int(self.days_next_month), (date_end_of_month + relativedelta(month=2)).day))` would always return 29 since 29 <= (29, 30, 31) ``` >>> import datetime >>> from dateutil.relativedelta import relativedelta >>> date_end_of_month datetime.datetime(2024, 5, 31, 17, 4, 14, 791820) >>> (date_end_of_month + relativedelta(month=2)) datetime.datetime(2024, 2, 29, 17, 4, 14, 791820) >>> min(31, 30, (date_end_of_month + relativedelta(month=2)).day) 29 ``` Solution: use the relative form of `relativedelta`; that is, the plural form `months` ``` >>> (date_end_of_month + relativedelta(months=1)) datetime.datetime(2024, 6, 30, 17, 4, 14, 791820) ``` source: https://dateutil.readthedocs.io/en/stable/relativedelta.html Note: Had to change the existing test on the overlapping year since ``` >>> december_date datetime.datetime(2023, 12, 12, 0, 0) >>> december_date + datetime.timedelta(days=30) datetime.datetime(2024, 1, 11, 0, 0) ``` and from date the maturity date would be 31st of January opw-3916451 Forward-Port-Of: odoo/odoo#166560
Currently, a traceback occurs when the user changes the type of a product. Steps to reproduce:- 1) Install sale, POS 2) Create a confirmed sale order with a product 2) Now change the product type for the above created `SO` product Error:- ``` TypeError: 'NoneType' object does not support item assignment ``` In the [1] commit there is no return type, So it by default returns None. Because of no return type, the value of `res` would be `None` at [2]. It leads to a traceback wh
Original PR description
Currently, a traceback occurs when the user changes the type of a product. Steps to reproduce:- 1) Install sale, POS 2) Create a confirmed sale order with a product 2) Now change the product type for the above created `SO` product Error:- ``` TypeError: 'NoneType' object does not support item assignment ``` In the [1] commit there is no return type, So it by default returns None. Because of no return type, the value of `res` would be `None` at [2]. It leads to a traceback when assigning a value to `res`, which is a `NoneType` at [3]. [1] https://github.com/odoo/odoo/commit/d9c5d163f251f59829b00decae94044941ee44e4 [2] https://github.com/odoo/odoo/blob/a142a51faa8ab8cce9c9ae4a14e15646c2118f5e/addons/sale/models/product_template.py#L95 [3] https://github.com/odoo/odoo/blob/a142a51faa8ab8cce9c9ae4a14e15646c2118f5e/addons/sale/models/product_template.py#L97 sentry-5488262774 Forward-Port-Of: odoo/odoo#169376
[IMP] documents_account: Add selection of journal in Document Action 'import bank statement' Backport of: https://github.com/odoo/enterprise/pull/46482/commits/d2a95d7ffa3ef2976172ed17eaf93056ea0f8c6c For now we didn't chose the bank journal because we assume that only coda file where push like this, and in the coda file we can find in which journal to send it. But Coda is limited to BE and lot of user import CSV file for bank. Add the selection of the journal (not mandatory) for Docume
Original PR description
[IMP] documents_account: Add selection of journal in Document Action 'import bank statement' Backport of: https://github.com/odoo/enterprise/pull/46482/commits/d2a95d7ffa3ef2976172ed17eaf93056ea0f8c6c For now we didn't chose the bank journal because we assume that only coda file where push like this, and in the coda file we can find in which journal to send it. But Coda is limited to BE and lot of user import CSV file for bank. Add the selection of the journal (not mandatory) for Document action, and inject CSV in the journal selected. If no journal selected inject the CSV in the first one of the list. If it's a coda file, keep as now and don't take care of the journal selected. Task-3932055 Forward-Port-Of: odoo/enterprise#62752
- When clicking on an account that hasn't been mapped, the help message shown in the tree view contained HTML code (tags explicitly shown). - We fix that by directly executing the action returned by the server, which then gets the proper markup and properly interprets the returned HTML code. task: 3715833 Forward-Port-Of: odoo/enterprise#64927 Forward-Port-Of: odoo/enterprise#63376
Original PR description
- When clicking on an account that hasn't been mapped, the help message shown in the tree view contained HTML code (tags explicitly shown). - We fix that by directly executing the action returned by the server, which then gets the proper markup and properly interprets the returned HTML code. task: 3715833 Forward-Port-Of: odoo/enterprise#64927 Forward-Port-Of: odoo/enterprise#63376
Issue: ====== Sign items are in english in sign Steps to reproduce the issue: ============================= - Create a user with Finnish language (or any other) - Create a sign request and add a date sign item - Send it to the Finnish customer - Open the link - The date doesn't fill automatically and the placeholders are all in english Origin of the issue: ==================== We don't use the language of the partner when fetching the sign items. The date field doesn't fill autom
Original PR description
Issue:
======
Sign items are in english in sign
Steps to reproduce the issue:
=============================
- Create a user with Finnish language (or any other)
- Create a sign request and add a date sign item
- Send it to the Finnish customer
- Open the link
- The date doesn't fill automatically and the placeholders are all in english
Origin of the issue:
====================
We don't use the language of the partner when fetching the sign items. The date field doesn't fill automatically is a consequence of this because we check `type.name === _t("Date")` but we have `type.name` in english and not the lang of the partner so we don't go into the condition to add the automatic fill for the date field here [1].
[1]: https://github.com/odoo/enterprise/blob/15.0/sign/static/src/js/sign_common.js#L1646
opw-3871779
Forward-Port-Of: odoo/enterprise#64824
Forward-Port-Of: odoo/enterprise#61744Before this commit, when recurring plan allow customer to renew or add product then customer can create upsell or renew subscription from portal and they can add or remove product which are added as optional product in subscription and in upsell or renew quotation optional products from parent subscription are copied in new quotation. optional product tab is getting hidden from user when subscription is confirmed so user will not able to edit optional product value anymore. after this commit
Original PR description
Before this commit, when recurring plan allow customer to renew or add product then customer can create upsell or renew subscription from portal and they can add or remove product which are added as optional product in subscription and in upsell or renew quotation optional products from parent subscription are copied in new quotation. optional product tab is getting hidden from user when subscription is confirmed so user will not able to edit optional product value anymore. after this commit, make optional product tab visible to user when subscription is 'in progress', 'paused' or 'churned' state and recurring plan allow customer to renew or add product so user will able to edit optional products for subscription. task-3858850 Forward-Port-Of: odoo/enterprise#61913
Before this commit: An IoT box would always listen to the iot.channel of the first company as it did not take into account the IoT-box company field. As such, setting an IoT box on a company C2 setting a printer and report to print on this IoT and restarting it. Report will never print as the IoT listen to C1 channel After this commit: If the IoT box company is set and the IoT is restarted. It will received the correct IoT channel. So, to print IoT reports opw-3991810 Forward-Port-Of:
Original PR description
Before this commit: An IoT box would always listen to the iot.channel of the first company as it did not take into account the IoT-box company field. As such, setting an IoT box on a company C2 setting a printer and report to print on this IoT and restarting it. Report will never print as the IoT listen to C1 channel After this commit: If the IoT box company is set and the IoT is restarted. It will received the correct IoT channel. So, to print IoT reports opw-3991810 Forward-Port-Of: odoo/enterprise#64859
Task-3610647 Forward-Port-Of: odoo/enterprise#64832 Forward-Port-Of: odoo/enterprise#64267
Original PR description
Task-3610647 Forward-Port-Of: odoo/enterprise#64832 Forward-Port-Of: odoo/enterprise#64267
The aim of this commit is giving a fallback value when we need digits' currency and that we don't have this currency loaded in the js session. This commit is almost a backport of what we have done in this commit [1], the main difference is that we put a default value instead of dealing with the undefined value. task-3959277 [1]: https://github.com/odoo/enterprise/commit/6a3623c168f3bdf32b9530071e21c014dd19ea07 Forward-Port-Of: odoo/enterprise#63913
Original PR description
The aim of this commit is giving a fallback value when we need digits' currency and that we don't have this currency loaded in the js session. This commit is almost a backport of what we have done in this commit [1], the main difference is that we put a default value instead of dealing with the undefined value. task-3959277 [1]: https://github.com/odoo/enterprise/commit/6a3623c168f3bdf32b9530071e21c014dd19ea07 Forward-Port-Of: odoo/enterprise#63913
Since the introduction of the new model/record, the `record` props of fields can be updated to another `resId` without triggering `onWillUpdateProps`. Instead a new hook called `useRecordObserver` was introduced. This PR introduces multiple technical corrections related to the new model/record. * `openArticle` can use the `Record.save` with `nextId` this will avoid re-loading the current record's data just before switching to another record. * Behaviors in an article body can be destroyed
Original PR description
Since the introduction of the new model/record, the `record` props of fields can be updated to another `resId` without triggering `onWillUpdateProps`. Instead a new hook called `useRecordObserver` was introduced. This PR introduces multiple technical corrections related to the new model/record. * `openArticle` can use the `Record.save` with `nextId` this will avoid re-loading the current record's data just before switching to another record. * Behaviors in an article body can be destroyed sooner using `useRecordObserver`. * Topbar, Sidebar, Comments and Cover are adjusted to properly interact with the `Record` they handle * Ensure that a title is extracted from the body at the right timings if applicable (`beforeLeave` and `openArticle`) * Reduce flickering when switching article task-3875521 Forward-Port-Of: odoo/enterprise#60960
Purpose ======= Fix the modal buttons which were badly displayed on mobile. Happening on the appointment type "Share" modal and the appointment type on-boarding step 2 "Preview" button modal. Specification ============= Usual modal buttons are direct children of the footer tag. However in these 2 cases, we're using a custom widget to add a modal button. The widgets are encapsulated into a "o_widget" div which messes up the button display. Restoring a good display for these widgets button
Original PR description
Purpose ======= Fix the modal buttons which were badly displayed on mobile. Happening on the appointment type "Share" modal and the appointment type on-boarding step 2 "Preview" button modal. Specification ============= Usual modal buttons are direct children of the footer tag. However in these 2 cases, we're using a custom widget to add a modal button. The widgets are encapsulated into a "o_widget" div which messes up the button display. Restoring a good display for these widgets buttons by making them take all the available space on mobile view and only the necessary space on higher screen sizes. Task-3981072 Forward-Port-Of: odoo/enterprise#64848 Forward-Port-Of: odoo/enterprise#64235