Monday, February 24, 2025
23 changes · saas-17.4
Resolved issues and error corrections
This fix restores a missing setting needed by the shortcuts footer in the user menu. It helps ensure the menu displays as intended and avoids a small interface issue for users.
Original PR description
This commit fills in the missing prop of the ShortcutsFooterComponent which was forgotten in https://github.com/odoo/odoo/commit/dd583fd670e0ee03b04711780bad2429b18a0788
This fixes a timing issue in restaurant point-of-sale split-bill tests where overlapping sync actions could make an order appear out of sync. The change helps keep automated test results stable and reduces false failures in quality checks.
Original PR description
Issue: ======== In `SplitBillScreenTour2`, navigating back and forth between **FloorScreen** and **ProductScreen** triggered a `SyncAllOrders` call. Immediately after, another `SyncAllOrders` call was sent from `createSplittedOrder`. Since the first request was still in progress, the second request sometimes sent only one order to the backend. This caused the original order to be filtered out from `syncingOrders`, leading to inconsistencies. Fix: ======= Step were added to check that the request is processed. **Runbot Error**: 114938
This fixes the Czech 2025 reporting module so it is included automatically when the related Czech reports package is installed. It prevents report generation checks from failing due to a missing dependency setup, improving reliability without changing business functionality.
Original PR description
Because of the countries flag set in the module manifest, the module was set to be auto-installed only when there was a company with country 'CZ' existing. Although this can't really be pointed as a mistake, it was causing an error in account_reports TestAllReportsGeneration.test_generate_all_export_files, as we'd be simply installing the module l10n_cz_reports and expect everything to be set and tested. runbot error: 114355
Miscellaneous changes
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next day (UTC date) instead of today. This causes problems validating invoices in ARCA (ex AFIP), since when generating the invoice with the next day's date, no more invoices could be generated with today's date. ### Current behavior before PR: 1. Make e-commerce sales after 9 PM local time AR in
Original PR description
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next…
### Description of the issue/feature this PR addresses: If someone creates an invoice after 9 pm Argentina time, if the invoice is created automatically, then it is created with the date of the next day (UTC date) instead of today. This causes problems validating invoices in ARCA (ex AFIP), since when generating the invoice with the next day's date, no more invoices could be generated with today's date. ### Current behavior before PR: 1. Make e-commerce sales after 9 PM local time AR in a website set as automatic invoicing = True (journal by default it is an electronic journal) 2. Try to generate another invoice after that day, A simple way to test it is to make an invoice and then validate it. 3. We will receive ARCA (ex-AFIP) error telling us that we can not generate the invoice with today's date, we can only validate invoices with a date equal to or greater than tomorrow. ### Desired behavior after PR is merged: 1. Make e-commerce sales after 9 PM local time AR in a website set as automatic invoicing = True (journal by default it is an electronic journal) 2. Try to generate another invoice after that day, A simple way to test it is to make an invoice and then validate it. 3. Manual invoice will be generated and validated in AFIP with today's date as the invoice date. NOTE: We took the same approach that was used in the [POS module](https://github.com/odoo/odoo/blob/16.0/addons/point_of_sale/models/pos_order.py#L615-L631) to set the date, in this case, always forcing the Argentina timezone --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192808
At some point, servers started to return `image/svg+xml; charset=utf-8` instead of `image/svg+xml` in the `content-type` header of SVG images. Because of this, dynamic SVGs were not properly handled anymore. This commit adapts the mimetype comparisons to cope for this extra `charset` info inside the mimetype. Steps to reproduce: - Drop an image block inside a website page. - Replace the image. - Search for e.g. "city". - Pick an undraw illustration. => The image was lost because its
Original PR description
At some point, servers started to return `image/svg+xml; charset=utf-8` instead of `image/svg+xml` in the `content-type` header of SVG images. Because of this, dynamic SVGs were not properly handled anymore. This commit adapts the mimetype comparisons to cope for this extra `charset` info inside the mimetype. Steps to reproduce: - Drop an image block inside a website page. - Replace the image. - Search for e.g. "city". - Pick an undraw illustration. => The image was lost because its `src` became `false`. Forward-Port-Of: odoo/odoo#198267
Before this commit, searching emoji required at least 2 chars. There is no reason to not allow 1 char, especially when searching some emoji that are best found with a single char, e.g. "9️⃣" with "9". Forward-Port-Of: odoo/odoo#198759
Original PR description
Before this commit, searching emoji required at least 2 chars. There is no reason to not allow 1 char, especially when searching some emoji that are best found with a single char, e.g. "9️⃣" with "9". Forward-Port-Of: odoo/odoo#198759
Current behavior before PR: - If a sequence_override_regex is set to a custom year regex, the default year_range regex is used instead if it matches the invoice name too. - Creating a new invoice fails if the custom sequence regex doesn't accept an empty or draft (i.e. '/') invoice name. Desired behavior after PR is merged: - If a sequence_override_regex is set, the default regexes are never used. - Creating a new invoice succeeds even if the custom sequence regex doesn't accept an e
Original PR description
Current behavior before PR: - If a sequence_override_regex is set to a custom year regex, the default year_range regex is used instead if it matches the invoice name too. - Creating a new invoice fails if the custom sequence regex doesn't accept an empty or draft (i.e. '/') invoice name. Desired behavior after PR is merged: - If a sequence_override_regex is set, the default regexes are never used. - Creating a new invoice succeeds even if the custom sequence regex doesn't accept an empty or draft (i.e. '/') invoice name. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198492 Forward-Port-Of: odoo/odoo#196106
Have an x2many list (non editable) or kanban, such that editing a record of the relation is done through the form view dialog. Have a default_order on the x2many view containing at least a field that isn't in the view. Before this commit, there were two issues occurring when the user clicked on "Save" (in the dialog footer) after editing a record in the dialog. 1) if the first field of the order wasn't in the view, e.g. `default_order="x"` but x wasn't in the view: there was a crash, because
Original PR description
Have an x2many list (non editable) or kanban, such that editing a record of the relation is done through the form view dialog. Have a default_order on the x2many view containing at least a field that…
Have an x2many list (non editable) or kanban, such that editing a record of the relation is done through the form view dialog. Have a default_order on the x2many view containing at least a field that isn't in the view. Before this commit, there were two issues occurring when the user clicked on "Save" (in the dialog footer) after editing a record in the dialog. 1) if the first field of the order wasn't in the view, e.g. `default_order="x"` but x wasn't in the view: there was a crash, because we tried to sort records on a field that is unknown. 2) if it wasn't the first field of the order, e.g. `default_order="x,y"` but y wasn't in the view: the changes done in the dialog were lost, so it was no possible to edit records. Both issues had the same root cause. After the edition, we tried to sort the relation (as the order might have changed). We do that since [1], but it wasn't the main purpose of this commit. It has been done because it looked like a quick win at the time, and we thought it was a good idea. However, functionally speaking, sorting the records after the edition isn't wanted. If I just clicked on a record, edited it, I expect the record to remain where it was after closing the dialog. So as sorting isn't necessarily wanted, and it even produces issues in some cases, this commit reverts that "feature". [1] https://github.com/odoo/odoo/commit/17e198153ecfd9c5c32b3b22f43e2f1b8100a1c3 Closes #197867 opw-4499150 (case (2)) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198757
Before this commit and since [1], when inserting a banner at the top of the editable, a zero-width space (ZWS) was inserted before the banner to circuvent a Chromium bug that prevents fully selecting the banner with the mouse [2]. This led to the undesirable behavior of having a text node (with a ZWS) as the first child of the editable, creating a line above the banner and allowing for text insertion at the editable's root. This commit replaces the ZWS insertion with an empty paragraph, wh
Original PR description
Before this commit and since [1], when inserting a banner at the top of the editable, a zero-width space (ZWS) was inserted before the banner to circuvent a Chromium bug that prevents fully selecting the banner with the mouse [2]. This led to the undesirable behavior of having a text node (with a ZWS) as the first child of the editable, creating a line above the banner and allowing for text insertion at the editable's root. This commit replaces the ZWS insertion with an empty paragraph, which can be later be moved around by the user. [1]: a0fcba6 [2]: https://issues.chromium.org/issues/40822311 Backport of PR #195027 Forward-Port-Of: odoo/odoo#198565
Add "(copy)" to the name of the duplicated payment term. task-4227445 Forward-Port-Of: odoo/odoo#197926 Forward-Port-Of: odoo/odoo#197605
Original PR description
Add "(copy)" to the name of the duplicated payment term. task-4227445 Forward-Port-Of: odoo/odoo#197926 Forward-Port-Of: odoo/odoo#197605
The Romanian SPV servers are slow. When sending a request to them, we previously set a hard timeout limit at 10 seconds and mark the request as failed if it exceeds it. However, recently we have found a critical issue where some users found that their invoice has been sent twice (or more) to the Romanian SPV. After investigating, we found that what's likely to happen is that the SPV takes more than 10 seconds to send the response back when we're making a request, and since in our side we c
Original PR description
The Romanian SPV servers are slow. When sending a request to them, we previously set a hard timeout limit at 10 seconds and mark the request as failed if it exceeds it. However, recently we have…
The Romanian SPV servers are slow. When sending a request to them, we previously set a hard timeout limit at 10 seconds and mark the request as failed if it exceeds it. However, recently we have found a critical issue where some users found that their invoice has been sent twice (or more) to the Romanian SPV. After investigating, we found that what's likely to happen is that the SPV takes more than 10 seconds to send the response back when we're making a request, and since in our side we consider the request as failed and requires the user to send a new request again, we make the user send a second request on the same invoice, where the SPV actually acknowledges all of the received invoices. After discussing with the PO, a temporary workaround for now is to increase the timeout limit to 60 seconds (1 full minute) to reduce the likelihood of this issue happening, and log error messages on the chatter if the request (either for send/fetch/download) failed, so that the user are aware when it is timeout and be more wary not to send another request right away, in case the new timeout limit are still not enough. Other small changes in this PR: - Handle response code 401, (which is a JSON object, invalid access token) - Remove the "Error when sending the document to the SPV:" template in error documents (because not all error documents are for sending, some are from fetch/download) opw-4571713 Forward-Port-Of: odoo/odoo#198604
Steps to Reproduce: 1. Drop a popup snippet on any page (e.g., Home page). 2. In the editor, set "Shown on" to "This Page." 3. Save the snippet for reuse. 4. Drop the same custom snippet on another page (e.g., Contact Us page). 5. Try to make the snippet visible on this page. Issue: The user has to click twice to make the popup visible. On the first click, a scroller appears, and the popup becomes visible only on the second click. The reason behind is that at the time of saving snippe
Original PR description
Steps to Reproduce: 1. Drop a popup snippet on any page (e.g., Home page). 2. In the editor, set "Shown on" to "This Page." 3. Save the snippet for reuse. 4. Drop the same custom snippet on another page (e.g., Contact Us page). 5. Try to make the snippet visible on this page. Issue: The user has to click twice to make the popup visible. On the first click, a scroller appears, and the popup becomes visible only on the second click. The reason behind is that at the time of saving snippet for later use, it clones it with `d-none` class. This commit resolves the issue by explicitly removing the `d-none` from the custom_popup_snippet, ensuring the custom popup appears immediately after being dragged and dropped. task-4088420 Forward-Port-Of: odoo/odoo#198151 Forward-Port-Of: odoo/odoo#184659
Before this commit: Steps 1) Install the Turkish localization modules (l10n_tr, l10n_tr_nilvera) 2) Switch to TR company 3) Create a user without administration access 4) Try to open accounting module using the created user => An OwlError is raised with the message `Caused by: TypeError: Cannot read properties of undefined (reading 'raw_value')`, This occurs because the `l10n_tr_nilvera_api_key` field is restricted to admin users. As a result, non-admin users experience a broken journal
Original PR description
Before this commit: Steps 1) Install the Turkish localization modules (l10n_tr, l10n_tr_nilvera) 2) Switch to TR company 3) Create a user without administration access 4) Try to open accounting module using the created user => An OwlError is raised with the message `Caused by: TypeError: Cannot read properties of undefined (reading 'raw_value')`, This occurs because the `l10n_tr_nilvera_api_key` field is restricted to admin users. As a result, non-admin users experience a broken journal dashboard view due to missing access After this commit: The Accounting module and journal dashboard view work correctly for non-admin users Reproducing the issue in Runbot: https://drive.google.com/file/d/1YIjvoXNDe6atVyzWC1dVU58rDFnoYH7x/view?usp=drive_link opw-4551932 Forward-Port-Of: odoo/odoo#197520
Description of the issue/feature this PR addresses: from [this commit](https://github.com/odoo/odoo/pull/129029/commits/4a070832), the docstring of `_xmlid_lookup` incorrectly states that the method returns `(id, res_model, res_id)`, while in reality, it only returns `(res_model, res_id)`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198719
Original PR description
Description of the issue/feature this PR addresses: from [this commit](https://github.com/odoo/odoo/pull/129029/commits/4a070832), the docstring of `_xmlid_lookup` incorrectly states that the method returns `(id, res_model, res_id)`, while in reality, it only returns `(res_model, res_id)`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198719
Forward-Port-Of: odoo/odoo#198651 Forward-Port-Of: odoo/odoo#198352
Original PR description
Forward-Port-Of: odoo/odoo#198651 Forward-Port-Of: odoo/odoo#198352
Problem Before this commit, if the customer deletes the rental location they would be blocked from creating a rental order as it is necessary for replenishment rules. The issue becomes critical because, once deleted, the rental location cannot be set to the company functionally given the field is not present in the view. Solution To fix this, this commit adds Rental Settings making the rental_loc_id field visible in the res_company view, allowing customers to select their desired rental
Original PR description
Problem Before this commit, if the customer deletes the rental location they would be blocked from creating a rental order as it is necessary for replenishment rules. The issue becomes critical because, once deleted, the rental location cannot be set to the company functionally given the field is not present in the view. Solution To fix this, this commit adds Rental Settings making the rental_loc_id field visible in the res_company view, allowing customers to select their desired rental location and resolve the issue independently. - opw-3973957 - opw-4488182 - opw-4545985 Forward-Port-Of: odoo/enterprise#79785
When confirming a vendor bill imported from an uploaded document and pressing the "Update SAT" button, the SAT state is not updated. This commit adds the missing EDI document state, `invoice_received`, in a validation that triggers the update of the SAT state for the current invoice. Steps to reproduce: <img width="1301" alt="Screenshot 2025-02-13 at 11 23 47 PM copy" src="https://github.com/user-attachments/assets/bad64936-bae1-4846-8cde-12f6d1748d46" /> <img width="1301" alt="Screenshot 2
Original PR description
When confirming a vendor bill imported from an uploaded document and pressing the "Update SAT" button, the SAT state is not updated. This commit adds the missing EDI document state,…
When confirming a vendor bill imported from an uploaded document and pressing the "Update SAT" button, the SAT state is not updated. This commit adds the missing EDI document state, `invoice_received`, in a validation that triggers the update of the SAT state for the current invoice. Steps to reproduce: <img width="1301" alt="Screenshot 2025-02-13 at 11 23 47 PM copy" src="https://github.com/user-attachments/assets/bad64936-bae1-4846-8cde-12f6d1748d46" /> <img width="1301" alt="Screenshot 2025-02-13 at 11 24 12 PM copy" src="https://github.com/user-attachments/assets/b4a839c2-a5ab-4638-b46d-3eb9ccf1b59d" /> <img width="1307" alt="Screenshot 2025-02-13 at 11 26 30 PM copy" src="https://github.com/user-attachments/assets/14645d48-5e90-405c-8a36-3ec7b0af50ef" /> <img width="1306" alt="Screenshot 2025-02-13 at 11 26 47 PM copy" src="https://github.com/user-attachments/assets/839349bf-be83-408a-bbd4-676d84a34493" /> <img width="1305" alt="Screenshot 2025-02-13 at 11 26 57 PM copy" src="https://github.com/user-attachments/assets/1e3773de-f3ab-47b4-9548-b5633c078943" /> Actual result: <img width="1306" alt="Screenshot 2025-02-13 at 11 27 08 PM copy" src="https://github.com/user-attachments/assets/a385847e-20cc-4410-8802-6d6b2c363633" /> Expected result: <img width="1307" alt="Screenshot 2025-02-13 at 11 27 49 PM copy" src="https://github.com/user-attachments/assets/8974cd49-13b6-40c0-8fa2-fd1fce45faf3" /> Forward-Port-Of: odoo/enterprise#79314
This commit will fix two errors: - for the value of average creditors days (A11) in B11 we used B18 for the calculation but it should be b15 - Error in naming for B34 and D34 (invert the two) task-4518430 Forward-Port-Of: odoo/enterprise#78013
Original PR description
This commit will fix two errors: - for the value of average creditors days (A11) in B11 we used B18 for the calculation but it should be b15 - Error in naming for B34 and D34 (invert the two) task-4518430 Forward-Port-Of: odoo/enterprise#78013
Steps to reproduce the bug: - Create a “quality.point”: - Operations: Manufacturing - Add a Work Order Operation - save - Update the operations to Receipt. Problem: The Work Order Operation field becomes invisible, but it is still filled so the quality point will still be applied. opw-4536136 Forward-Port-Of: odoo/enterprise#79929 Forward-Port-Of: odoo/enterprise#79868
Original PR description
Steps to reproduce the bug:
- Create a “quality.point”:
- Operations: Manufacturing
- Add a Work Order Operation
- save
- Update the operations to Receipt.
Problem:
The Work Order Operation field becomes invisible, but it is still filled so the quality point will still be applied.
opw-4536136
Forward-Port-Of: odoo/enterprise#79929
Forward-Port-Of: odoo/enterprise#79868This commit adds one flow test to `l10n_ec_edi` that mocks `zeep` when sending an invoice to the SRI. This complements the existing tests that check the generated XML. task-none Forward-Port-Of: odoo/enterprise#79863 Forward-Port-Of: odoo/enterprise#77578
Original PR description
This commit adds one flow test to `l10n_ec_edi` that mocks `zeep` when sending an invoice to the SRI. This complements the existing tests that check the generated XML. task-none Forward-Port-Of: odoo/enterprise#79863 Forward-Port-Of: odoo/enterprise#77578
In the expense app, a button enables to refund an expense directly in the payslip. This button is however not visible for payroll manager, while the action behind is. This commit solves the issue. task-4570975 Forward-Port-Of: odoo/enterprise#79570
Original PR description
In the expense app, a button enables to refund an expense directly in the payslip. This button is however not visible for payroll manager, while the action behind is. This commit solves the issue. task-4570975 Forward-Port-Of: odoo/enterprise#79570
Purpose ======= In the Facebook settings, a user can ask an application (eg Social) to remove his data. If the deletion is not implemented, it should be done manually for each user, and so we want to automate that process. Technical ========= The deletion process is done in that order: 1. The user go to his settings and ask Odoo to remove the data we have 2. Facebook will hit an endpoint in IAP, with a signature, and the Facebook user id 3. IAP will reach the database, (with a shar
Original PR description
Purpose ======= In the Facebook settings, a user can ask an application (eg Social) to remove his data. If the deletion is not implemented, it should be done manually for each user, and so we want to…
Purpose
=======
In the Facebook settings, a user can ask an application (eg Social) to remove his data.
If the deletion is not implemented, it should be done manually for each user, and so we want to automate that process.
Technical
=========
The deletion process is done in that order:
1. The user go to his settings and ask Odoo to remove the data we have
2. Facebook will hit an endpoint in IAP, with a signature, and the Facebook user id
3. IAP will reach the database, (with a shared secret to authenticate itself) and that endpoint will remove the social accounts, and also the social posts / templates if the account is selected
We do it that way, instead of having a CRON on the client database, because we are able to know if the user uninstalled social, or if he already removed the account.
If the database is not reachable from the internet, we will have it's dbuuid, and so, we will be able to take an action.
Authentication
==============
IAP needs to authenticate to the Odoo database,
so both need to share a secret.
That secret can not be the extended token,
because we don't store it on the Odoo side.
That secret is derived from the database secret, and sent when we ask the Facebook URL (in python, without a browser redirection), so the social user can not see it (otherwise, he will be able to bypass company access rules, and delete the social accounts of different company).
Setup
=====
1. Start Odoo and IAP instances
2. Start ngrok on the IAP port
3. In the Facebook settings ("Facebook Login For Business" -> Settings)
- Add <ngrok_url>/api/social/facebook/1/callback in the Facebook settings
- Add <ngrok_url>/api/social_facebook/1/deletion_callback in the Facebook settings
4. Add the Facebook credentials in the IAP settings
5. In the Odoo db, add the system parameter `social.social_iap_endpoint` with the ngrok url
6. In the IAP db, change the system parameter `web.base.url` with the ngrok url
7. In the IAP code, in `facebook_controller.py`, comment the dbuid check `_check_has_access`
8. Add your accounts
9. Go to `https://www.facebook.com/settings/?tab=business_tools`, and remove the app
10. Go to the "Removed" tab, then "View Details" and click on "Send Request"
Task-4350697
Forward-Port-Of: odoo/enterprise#74865This PR addresses a payslip-calculating issue where overtime records right outside the payslip's period were being included in the calculations, messing up normal hours. The way this is fixed in this PR is by delaying the timezone-stripping code until it is necessary. This allows the local timezone variables, `date_from` and `date_to`, to be used to query the associated overtime records, rather than their UTC versions. We need this behavior because the "overtime" query depends on the field `
Original PR description
This PR addresses a payslip-calculating issue where overtime records right outside the payslip's period were being included in the calculations, messing up normal hours. The way this is fixed in this…
This PR addresses a payslip-calculating issue where overtime records right outside the payslip's period were being included in the calculations, messing up normal hours.
The way this is fixed in this PR is by delaying the timezone-stripping code until it is necessary. This allows the local timezone variables, `date_from` and `date_to`, to be used to query the associated overtime records, rather than their UTC versions. We need this behavior because the "overtime" query depends on the field `HrAttendanceOvertime.date`, which is of type `fields.Date` and is timezone-agnostic.
This bug can be replicated in any variation of the following scenario (this one assumes the payslip period covers exactly one month of work):
- Create an attendance record for employee `A` that would cause them to have `h` hours of overtime at the end of month `X`, where `X` is a number in the set `{1, 2, ..., 12}`.
- Create an attendance record for `A` on the 1st of the next month, `Y := X mod 12 + 1`, with `h'` regular hours and `0` hours of overtime.
- Generate their payslip for the month `Y`.
- See that there is an overtime line with `h` hours and a regular hours line with `h' - h` hours. 🐛
opw-4371083
Forward-Port-Of: odoo/enterprise#78880