Daily updates from Odoo
Navigate
Branch
Friday, June 28, 2024
70 changes
29 changes
Enhancements to existing features
This update improves Odoo's internal HOOT testing framework and related web/mail test helpers. It makes automated tests easier to write and more accurate, reducing the risk of defects reaching users while keeping changes limited to the testing ecosystem.
Original PR description
## Pull Request HOOT (PRHOOT) - part 18 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 18 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Enterprise: https://github.com/odoo/enterprise/pull/65657 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Survey certifications now load their list of questions much faster. This reduces waiting time for users and improves performance for large or complex surveys.
Original PR description
Old code take ~5s of python, now less than 0.5s for a certification on our prod.
Resolved issues and error corrections
This change fixes an intermittent failure in an automated test for creating mail discussion channels. It improves the reliability of internal quality checks without changing how users experience the product.
Original PR description
Before this PR, the `can create a new channel` test was sometimes failing. This test asserts that the `/discuss/channel/messages` route is called using the step API. However, creating a new channel also sets the last seen message of the user. Most of the time, the test ended before this step but when it didn't, the test would fail as this step is not verified. This PR ignore this step as it is not relevant for the current test. runbot-68993
Sales orders now count only stock movements that truly reached the customer when calculating delivered quantities. This prevents returns made during multi-step delivery flows from incorrectly showing negative delivered quantities, helping teams keep order and inventory records accurate.
Original PR description
**Steps to reproduce the bug:** - Enable multi-step routes in the general settings. - Go to the warehouse settings: - Select 3 steps for Outgoing Shipments. - Create a storable product “P1”. - Create…
**Steps to reproduce the bug:**
- Enable multi-step routes in the general settings.
- Go to the warehouse settings:
- Select 3 steps for Outgoing Shipments.
- Create a storable product “P1”.
- Create a sales order with the following details:
- Customer: Azure Interior
- Product: 3 units of P1
- Confirm the sales order
- Go to the pick picking
- Set the quantity to 1 unit
- Validate the pick and create a backorder
- Go to the pack step and validate it
- Return to the pick backorder and validate it for 2 units
- Create a return from this backorder
- Validate the return
- Go back to the sales order
**Problem:**
The delivered quantity is set to -2 instead of 0. When the return is validated, the “_compute_qty_delivered” function is triggered, which uses both outgoing and incoming moves. The “_get_outgoing_incoming_moves” method is called to retrieve these moves. However, for return moves, we only check if the `location_dest` is not set to customer usage and if `move.to_refund` is not false, without verifying that the source location is from the customer.
opw-3962062This fixes an issue where opening a new view, such as a record from a kanban board, could use an outdated navigation state after a prior internal link click. Users should now be taken to the intended screen more reliably, reducing confusing navigation behavior.
Original PR description
Since [1], the global state was pushed before opening a new controller. For instance, when opening a record in a kanban view. An issue could happen, because the code didn't assure that the current state of the router, was the same as the state of the current controller, before pushing. The state of the router could be modified previously, for instance, clicking on an internal link, so the state of the router will be different as the state of the current controller. This commit, will ensure that the pushed global state is done to the correct state. [1] : https://github.com/odoo/odoo/commit/f26256f566840ff252886b7383f3685720da9a6e
This fix makes Odoo's web testing tools handle simulated clicks more like real user clicks. It helps prevent tests from failing or missing behavior when earlier pointer events are intentionally stopped, improving confidence in web interface testing.
Original PR description
Before this commit, when using HOOT pointer event helpers such as `click`, preventing the `pointerup`, `mouseup` or `touchend` event would prevent the final `click` event to be dispatched. Now, the `click` event can be dispatched regardless, as it would be during an actual user-triggered click. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix restores validation for user and partner timezone selections, helping prevent invalid timezone values from being saved. It matters because accurate timezone settings support correct scheduling, messaging, and date/time display across Odoo.
Original PR description
In odoo/odoo#154177 it was apparently decided that validating callable selections is unnecessary, leading to the lang and timezone fields not being validated anymore. Nothing to be done for the lang as it relies on the installed langs and thus the corresponding database, however the tz list has effectively been static / global since odoo/odoo#26496 (f11d143f00add145f1a05b51968108e46b96ca87). So initialise `tz` with the precomputed value instead of the function which returns the precomputed value. cherry-pick of ff8ac5d13cd6bb
Partner records with the same bank account can now be merged even when those accounts are linked to payments. This prevents merge failures and helps teams clean up duplicate customer or vendor records without disrupting accounting history.
Original PR description
Currently, you cannot merge partners if they have bank accounts linked to payments. ### Steps to reproduce * Install the `account` module. * Create two partners having the same bank account number. *…
Currently, you cannot merge partners if they have bank accounts linked to payments. ### Steps to reproduce * Install the `account` module. * Create two partners having the same bank account number. * Create and post payments for each of those partners. * Attempt to merge those partners. You should be met with the following message: ``` The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Journal Entry (account.move) Constraint: account_move_partner_bank_id_fkey ``` ### Cause When merging partners, the system attempts to update all foreign keys referencing the partners being merged. In certain circumstances, this update violates unicity constraints. In such cases, the system simply deletes the records that can't be updated. In our case, the `res_partner_bank` table has the following unicity constraint: `unique(sanitized_acc_number, partner_id)`. When we merge the two partners and the system attempts to update the `partner_id` field on `res_partner_bank`, the constraint is violated because both partners originally had the same account number. The system then tries to delete those bank accounts, but it fails because they are linked to payments (with an `ondelete restrict` clause). ### Fix Identify the bank accounts that are duplicated between the source and destination partners, and merge them before merging the partners. opw-3925952
This fixes an issue where the live chat chatbot could repeatedly redirect visitors when a page URL changed due to their selected website language. Visitors can now continue their chatbot flow normally after being sent to a translated page, improving support access on multilingual websites.
Original PR description
Before this PR, redirecting the user to a page that would then be rewritten according to the user's preferred language would make the chatbot loop. Steps to reproduce: - Install…
Before this PR, redirecting the user to a page that would then be rewritten according to the user's preferred language would make the chatbot loop. Steps to reproduce: - Install website_helpdesk_livechat - Install another language and translate the website - Modify the /contactus rule to use the helpdesk live chat - Create a question step that redirects the user to `/helpdesk/customer- care-1` - Navigate to the contactus page and change the website language to the newly installed language - Start the chatbot and proceed to the redirect step - The chatbot gets stuck in a loop This happens because the chatbot checks if the redirect link and the URL are the same to determine if the redirection was already done. However, since the URL is rewritten, it assumes it wasn't done and redirects once again. When a page is reloaded, the chatbot starts where it left off. However, it should check that the step was not already processed beforehand. This PR fixes this issue by skipping the already done step. opw-3987426
Users can now download all attachments from a chatter message without encountering an error. The fix corrects the download link so it works reliably from newer page URLs, reducing disruption when sharing or retrieving project-related files.
Original PR description
Steps to reproduce: ------------------- - Install `Project` module (for test purpose) - Open any project and create a task - Post a message with multiple attachments - Select "Download Files" in the message options Issue: ------ Traceback Cause: ------ Calling directly the route without starting with `/`. The issue started since the following commit [1] because we changed how the URLs are generated; Before: `localhost/web#id=55&...` After: `localhost/odoo/project/5/tasks/55` With these changes, since the download URL don't start with `/`, the browser will try to download the file from the current URL who, combined with the download URL, is not a real route. [1] https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f Solution: --------- Add `/` at the beginning of the download URL. opw-4009021
Miscellaneous changes
Steps to reproduce: - Install Accounting and l10n_es_edi_tbai - Switch to a Spanish company (e.g. ES Company) - In Accounting settings, select "Hacienda Foral de Bizkaia" as "Tax Agency for TBAI" - Create a vendor bill: * Vendor: [a Spanish vendor] * Invoice Lines: (These amounts are important) -------------------------------- Quantity | Price | Taxes -------------------------------- 2 | 2896.74 | 21% G 4 | 121.52 | 21% G - Confirm
Original PR description
Steps to reproduce:
- Install Accounting and l10n_es_edi_tbai
- Switch to a Spanish company (e.g. ES Company)
- In Accounting settings, select "Hacienda Foral de Bizkaia" as "Tax Agency for TBAI"
- Create a vendor bill:
* Vendor: [a Spanish vendor]
* Invoice Lines: (These amounts are important)
--------------------------------
Quantity | Price | Taxes
--------------------------------
2 | 2896.74 | 21% G
4 | 121.52 | 21% G
- Confirm the bill
- Sent bill to TicketBAI
Issue:
The generated xml will be rejected because "BaseImponible" value has more than 2 decimals.
Cause:
A floating point issue during the computation of "BaseImponible" with these specific values.
opw-3987704
Forward-Port-Of: odoo/odoo#170724When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to Reproduce 1. Install `account_accountant`. 2. Create an invoice with a line that has an analytic account and an account A. 3. Open the trial balance and access the journal items of account A using the three-dots menu. 4. Select the line from the invoice you created. 5. Attempt to change its acco
Original PR description
When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to…
When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to Reproduce 1. Install `account_accountant`. 2. Create an invoice with a line that has an analytic account and an account A. 3. Open the trial balance and access the journal items of account A using the three-dots menu. 4. Select the line from the invoice you created. 5. Attempt to change its account. You will encounter the following validation error: ``` The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Analytic Line (account.analytic.line) Constraint: account_analytic_line_account_id_fkey ``` ### Cause When accessing the journal items from the Trial Balance report, the `search_default_account_id` context key is automatically applied to filter the accounts you selected. However, using `search_default_` with a relational field also creates a `default_` context key for that field. Here, `default_account_id` is added to the context. When changing the account on a move line that has analytic accounts, the system deletes the existing related analytic items and creates new ones. Analytic items have an `account_id` field. Due to the `default_account_id` context key intended for the journal items, the same key is erroneously applied to the newly created analytic item, leading to a validation error because of a foreign key constraint. ### Fix I was thinking about cleaning the context but after discussing with JOL, we decided to only get rid of the problematic default key. opw-3958980 Forward-Port-Of: odoo/odoo#168329
Typing in select2 being in modals does not work from v16 as select2 and bootstrap modals are in conflict when it comes to the focus of elements. HACK ==== Disable bootstrap modal's focustrap in order to let the user type in the select2 on the modal's attachment. (Solution taken from odoo/enterprise#35733) Task-3527175 Forward-Port-Of: odoo/odoo#170956 Forward-Port-Of: odoo/odoo#154039
Original PR description
Typing in select2 being in modals does not work from v16 as select2 and bootstrap modals are in conflict when it comes to the focus of elements. HACK ==== Disable bootstrap modal's focustrap in order to let the user type in the select2 on the modal's attachment. (Solution taken from odoo/enterprise#35733) Task-3527175 Forward-Port-Of: odoo/odoo#170956 Forward-Port-Of: odoo/odoo#154039
Open tax "IVA 0% Entregas Intracomunitarias exentas" Set Tax Scope to False Create an invoice to an EU partner Add an invoice line (select the mentioned tax) Confirm Send for Validation Traceback: odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'DesgloseTipoOperacion' Template: l10n_es_edi_tbai.template_invoice_factura Path: /t/TipoDesglose/DesgloseTipoOperacion/PrestacionServicios Node: <PrestacionServicios t-if="invoice_info.get(\'Prestacio
Original PR description
Open tax "IVA 0% Entregas Intracomunitarias exentas" Set Tax Scope to False Create an invoice to an EU partner Add an invoice line (select the mentioned tax) Confirm Send for Validation Traceback: odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'DesgloseTipoOperacion' Template: l10n_es_edi_tbai.template_invoice_factura Path: /t/TipoDesglose/DesgloseTipoOperacion/PrestacionServicios Node: <PrestacionServicios t-if="invoice_info.get(\'PrestacionServicios\')"/> This occurs because tax info was not fetched properly When invoicing to a foreign partner the tax scope needs to be properly configured opw-3877924 Forward-Port-Of: odoo/odoo#171018
Prior to this commit, scanning a product barcode for a missing product would trigger a search for the missing pricelist, potentially leading to an error. This commit fixes this issue by preventing the pricelist search when the product is missing. opw-3850050 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166579
Original PR description
Prior to this commit, scanning a product barcode for a missing product would trigger a search for the missing pricelist, potentially leading to an error. This commit fixes this issue by preventing the pricelist search when the product is missing. opw-3850050 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166579
After the refatoring of the POS, the big scrollbar options does not work anymore. This commit restore the big scrollbar options. taskId: 3419014 opw-3998526 Close this one: https://github.com/odoo/odoo/pull/170746 Forward-Port-Of: odoo/odoo#170011
Original PR description
After the refatoring of the POS, the big scrollbar options does not work anymore. This commit restore the big scrollbar options. taskId: 3419014 opw-3998526 Close this one: https://github.com/odoo/odoo/pull/170746 Forward-Port-Of: odoo/odoo#170011
Steps to reproduce: ------------------- - Install `Sign` and `Website` (for test purpose) - Go to the website and enable the web editor - Click on Theme tab, and set Button -> Primary Style to `Flat` - Go to Sign module and copy the Share link of a document - Open it in an incognito window Issue: ------ Error: `The target selector was not found` Cause: ------ Trying to extend `.btn.flat` selector while it is not declared in the dependencies of the `sign.assets_public_sign`
Original PR description
Steps to reproduce: ------------------- - Install `Sign` and `Website` (for test purpose) - Go to the website and enable the web editor - Click on Theme tab, and set Button -> Primary Style to `Flat` - Go to Sign module and copy the Share link of a document - Open it in an incognito window Issue: ------ Error: `The target selector was not found` Cause: ------ Trying to extend `.btn.flat` selector while it is not declared in the dependencies of the `sign.assets_public_sign` assets. Solution: --------- Set the `extend` to `optional`. opw-3989063 Forward-Port-Of: odoo/odoo#170261
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in addition to "Fill" and "Outline". However, the way it was done causes some issues. Indeed, it wrongly sets the `btn-(primary|secondary)-(outline|flat)` CSS variables to `'True'` instead of the `true` boolean, and to `null` instead of `false`, which is not correct. This happens because `cust
Original PR description
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in…
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in addition to "Fill" and "Outline". However, the way it was done causes some issues. Indeed, it wrongly sets the `btn-(primary|secondary)-(outline|flat)` CSS variables to `'True'` instead of the `true` boolean, and to `null` instead of `false`, which is not correct. This happens because `customizeButtonStyle` now sends boolean values to the `_makeSCSSCusto` function, instead of strings representing these booleans. This results in the backend RPC call setting the variables to the Python boolean `True`, or to `null` in the falsy case because of the `"null"` default value. While it does not seem to break anything in general, there are issues when using themes that redefine these variables (e.g. "Avantgarde", "Enark", "Cobalt",...). Indeed, it is impossible to set the buttons corresponding style to "Fill". This happens because choosing "Fill" is supposed to set both variables to `false`, but because of the boolean values being sent to `_makeSCSSCusto`, the value that is in fact set is `"null"`. This therefore makes them fallback to the value defined in the theme, forcing them to `true` and preventing the "Fill" style from being applied. This commit fixes these issues by properly giving string values to `_makeSCSSCusto`. For already existing databases, all the variables that have been set to `'True'` will have their value replaced by `true`, thanks to the `o-map-omit` SCSS function. Note that the `'False'` case is also added, in order to be consistent. [1]: https://github.com/odoo/odoo/commit/388e4bb2bfcaebdd4ff30277fb49a034592d7086 opw-3957157 Forward-Port-Of: odoo/odoo#170015
Related to https://github.com/odoo/enterprise/pull/51266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169012
Original PR description
Related to https://github.com/odoo/enterprise/pull/51266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169012
Added the basic community localization package of Tanzania Added COA, taxes, tax group, tax report, and fiscal positions task-3783153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156503
Original PR description
Added the basic community localization package of Tanzania Added COA, taxes, tax group, tax report, and fiscal positions task-3783153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156503
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: - Go to email marketing - Choose a template with an image - Update the image and click on another tab directly (A/B tests for example) - Go back to mail body tab, the changes are not saved For dropped snippets: - Go to email marketing - Choose any template - Click on another tab (A/
Original PR description
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: -…
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: - Go to email marketing - Choose a template with an image - Update the image and click on another tab directly (A/B tests for example) - Go back to mail body tab, the changes are not saved For dropped snippets: - Go to email marketing - Choose any template - Click on another tab (A/B tests for example) - Go back to meil body tab - Add snippet click directly on another tab - Go back to mail body tab , the changes are not saved Origin of the issue: ==================== For Image and Icon: When we open the image media dialog, `_onWysiwygBlur` is called which means we lost the focus from the editable view. Old updates are saved because we call `commitChanges` but the updates after the change of the image are not since we lost the focus of the wysiwyg. Switching to another tab will not trigger `blur` event again so we loose the changes. (same flow for icon change). For dropped snippets: The first switch of tabs will trigger the blur event and will commit changes. When we switch again to the mail body tab, the focus isn't on the editable, we drop the snippet , still no focus on the editable so no `blur` event is called and we loose the changes again. We call `commitChanges` on `onWillUnmount` but we don't pass the paremeters from `mass_mailing_html_field` to its parent class so we loose the `urgent` flag which is responsible to save the data before destroying the component. Passing just the args in `commitChanges` will produce another issue about `Component is destroyed`. To have a minimal change in stable we just refocus on the wysiwyg on the mentioned 2 cases so the updates will be applied when blurring the `wysiwyg` Solution: ========= Put the focus again in the editor's window. Forward-Port-Of: odoo/odoo#167753
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addo
Original PR description
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addons/mail/models/ir_actions_server.py#L123-L124 [Linked PR](https://github.com/odoo/enterprise/pull/63816) opw-3946293 Forward-Port-Of: odoo/odoo#170930 Forward-Port-Of: odoo/odoo#168043
According to the documentation, the user receives their registration code through SMS, so phone number label is misleading. Steps to reproduce: 1.Install account_peppol > install an peppol egilible accounting l10n (i.e l10n_be) 2.In settings > technical > system parameter > set account_peppol.edi.mode to test 2.in settings search for peppol 3.notice how the phone number is requested in the registration form 4.click on validate registration 5.notice how the validation button displays
Original PR description
According to the documentation, the user receives their registration code through SMS, so phone number label is misleading.
Steps to reproduce:
1.Install account_peppol > install an peppol egilible accounting l10n (i.e l10n_be)
2.In settings > technical > system parameter > set account_peppol.edi.mode to test
2.in settings search for peppol
3.notice how the phone number is requested in the registration form
4.click on validate registration
5.notice how the validation button displays "verify phone number" while the verification code is sent by sms
Solution:
refactor labels, buttons, helps and errors message to indicate mobile number. The actual field account_peppol_phone_number is not renamed as per stable version changes condition.
opw-3977664
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#170870
Forward-Port-Of: odoo/odoo#169607*= hr_expense, project_sale_expense -STEP TO REPRODUCE: Create an expense sheet , submit then approve it as well, go to Pg admin or update the view manually to see the field `approval_state`. The `approval_state` is now approved. After that try to refuse the sheet, `approval_state` still approved while it should be consider `cancel` (Refuse) -Solution is to forbids unrealistic case where we shouldn't allow user to cancel when it linked to a journal entry and also update `approval_stat
Original PR description
*= hr_expense, project_sale_expense -STEP TO REPRODUCE: Create an expense sheet , submit then approve it as well, go to Pg admin or update the view manually to see the field `approval_state`. The `approval_state` is now approved. After that try to refuse the sheet, `approval_state` still approved while it should be consider `cancel` (Refuse) -Solution is to forbids unrealistic case where we shouldn't allow user to cancel when it linked to a journal entry and also update `approval_state` as well -> Therefore some test in `test_project_profitability` need to adapt 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#168430
Prior to this commit, orders loaded from other sessions did not load missing partners. opw-3981458 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169963 Forward-Port-Of: odoo/odoo#169763
Original PR description
Prior to this commit, orders loaded from other sessions did not load missing partners. opw-3981458 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169963 Forward-Port-Of: odoo/odoo#169763
…ice is not in the db 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#170616
Original PR description
…ice is not in the db 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#170616
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request. Steps to reproduce: ------------------- * Go to **Point of Sale** * Under **Configuration**, select **Payment Methods** * Create a new payment method and configure it for viva wallet * In the shop setting, add this payment method * Open shop session * Make an order and try to pay with viva wallet > Observation: There are some issues between us and Viva Wallet, try again later. [{'type':
Original PR description
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request. Steps to reproduce: ------------------- * Go to **Point of Sale** * Under **Configuration**, select…
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request.
Steps to reproduce:
-------------------
* Go to **Point of Sale**
* Under **Configuration**, select **Payment Methods**
* Create a new payment method and configure it for viva wallet
* In the shop setting, add this payment method
* Open shop session
* Make an order and try to pay with viva wallet
> Observation: There are some issues between us and Viva Wallet, try again
later. [{'type': 'missing', 'loc': ['body', 'terminalId'], 'msg': 'Field required', 'input': {'sessionId': '00007-001-0001 - c9a31bfb-b517-4e65-a1ee-b00a1d86731b', 'cashRegisterId': 'Mitchell Admin', 'amount': 206885, 'currencyCode': 978, 'merchantReference': '00007-001-0001 - c9a31bfb-b517-4e65-a1ee-b00a1d86731b/7', 'customerTrns': ' ', 'preauth': False, 'maxInstalments': 0, 'tipAmount': 0}, 'url': 'https://errors.pydantic.dev/2.6/v/missing'}]
Why the fix:
------------
As the error states, the request is missing the information about the terminal ID. That is due to the fact that starting from saas-17.1 parameters are loaded through the function `_load_data_params` and not `_loader_params_(...)`.
opw-3983997
Forward-Port-Of: odoo/odoo#170531For a (too) long time now, the Odoo Windows installer is build by using virtual machines. Maintaining those VM is very painfull. Also the result was unpredictable due to the erratic behavior of MS Windows. With this commit, the build package system now uses a Docker container like the other builds, greatly simplifying the whole process. Forward-Port-Of: odoo/odoo#171123 Forward-Port-Of: odoo/odoo#169519
Original PR description
For a (too) long time now, the Odoo Windows installer is build by using virtual machines. Maintaining those VM is very painfull. Also the result was unpredictable due to the erratic behavior of MS Windows. With this commit, the build package system now uses a Docker container like the other builds, greatly simplifying the whole process. Forward-Port-Of: odoo/odoo#171123 Forward-Port-Of: odoo/odoo#169519
Before this commit it was possible to remove employees with ongoing contracts. This commit adds a check to prevent this case. task: 3930155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170289 Forward-Port-Of: odoo/odoo#166338
Original PR description
Before this commit it was possible to remove employees with ongoing contracts. This commit adds a check to prevent this case. task: 3930155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170289 Forward-Port-Of: odoo/odoo#166338
28 changes
Enhancements to existing features
The manufacturing shop floor interface has been refined to make common actions clearer and reduce confusion for operators. Dialog sizing, button labels, visual cues, and menu options were adjusted so users see more accurate actions at the right time.
Original PR description
In this commit: ===================== - resized the Add Component modal to medium size. - renamed 'Open Backend MO' to 'Open Manufacturing Order' in the MRP menu dialog. - updated the behavior of the 'Register Production' button to only be crossed out upon clicking the validate button in the register production dialog. - styled the 'Register Production' button as a link. - made 'Print Barcode Commands' invisible when the work order is not activated. - replaced fa-plus icon with gear icon in shop floor module. task-3836580
Resolved issues and error corrections
This change restores a previous styling setting in the Enterprise web interface to avoid unnecessary warning messages during asset compilation. It does not change business functionality, but helps keep development and deployment logs cleaner.
Original PR description
This reverts commit odoo/enterprise@34a846cae4382b9507407e9f4abd509a02ce4331. Setting the box-shadow to none will trigger a WARNING in the compiler due to how bootstrap handle the box-shadow mixin[1] when receiving two arguments with one containing a 'none' We are setting the value back to 0 which will provide an invalid property too when the mixin is called with a single argument but won't warn in the console. [1]: https://github.com/twbs/bootstrap/pull/30394 follow up of task-3755095
The default appointment schedule has been corrected so available times are not accidentally blocked around the gap between morning and afternoon hours. This helps customers and staff see and book the intended appointment slots reliably.
Original PR description
Fix the gap between mornings and afternoons of the resource calendar `appointment_default_resource_calendar` which was leading to slot not being available. We also remove the temporary fix done with odoo/enterprise@fa0d123fa44775b1daccca4220e9a6ee8d72ad45 task-3858736
Code cleanup and technical improvements
This update streamlines how contact-like user information is prepared and sent to the browser across messaging-related features. It should reduce repeated data transfer and client-side processing, improving efficiency without changing expected user workflows.
Original PR description
This will reduce data transferred to the client and processed in JS when the same persona was appearing multiple times in various places. This also makes more clear what is transferred by avoiding nested values. This is part 4, focusing on persona in general. Unfortunately `mail_partner_format` itself is not yet converted to store in this PR because `_message_format` needs to be done first, and that will be its own PR (this is the next step). Formatting code eventually becomes simpler too, by always adding data to the store rather than updating pre-existing dict manually. Part of task-3605717 https://github.com/odoo/odoo/pull/170709
The Knowledge actions menu was reorganized internally to reduce the need for custom changes across different screen types. This should make the feature easier to maintain and less likely to break as the product evolves, with little visible change for users.
Original PR description
We refactor the menu "knowledge" of the menu "Actions" so that we do no longer need to patch many renderers.
This work brings several accounting-related features and reports together under the accountant module, including financial reports, asset reporting, scheduled tasks, and demo data. For businesses, it should make accounting capabilities more cohesive and easier to maintain, though the work-in-progress status suggests further validation may still be needed before release.
Miscellaneous changes
This commit allows the user the password provided by IAP during the first connection. A new wizard has been added for this. task-id: 3857241 IAP: https://github.com/odoo/iap-apps/pull/790 Forward-Port-Of: odoo/enterprise#65625 Forward-Port-Of: odoo/enterprise#60645
Original PR description
This commit allows the user the password provided by IAP during the first connection. A new wizard has been added for this. task-id: 3857241 IAP: https://github.com/odoo/iap-apps/pull/790 Forward-Port-Of: odoo/enterprise#65625 Forward-Port-Of: odoo/enterprise#60645
…nents - In the Inventory app, go to Lots/Serial Numbers; - Open any record; - Click on the Traceability stat button; - reload the page; Before this commit, the message "No operation made on this lot." was shown, even if there are operations. This occurs because the TraceabilityReport lost the current model at reload (active_model). Since [1] a new prop (a function called updateResId) was give to the controllers components of the window actions to update the resId on the action s
Original PR description
…nents - In the Inventory app, go to Lots/Serial Numbers; - Open any record; - Click on the Traceability stat button; - reload the page; Before this commit, the message "No operation made on this…
…nents - In the Inventory app, go to Lots/Serial Numbers; - Open any record; - Click on the Traceability stat button; - reload the page; Before this commit, the message "No operation made on this lot." was shown, even if there are operations. This occurs because the TraceabilityReport lost the current model at reload (active_model). Since [1] a new prop (a function called updateResId) was give to the controllers components of the window actions to update the resId on the action state and url, when needed. For instance, the form view after saving a new record, will update the state and the url with the newly created id. Since [2], the prop was also given to the controllers components of the client actions to update the resId. There is a need to update more than the resId. This PR will introduce a new prop with the aim to update the action state (updateActionState). This props will allow the controller components to update the state and push the new state to the router (updating the url). In practical, this allows to push a new state in the url, keeping the action service in sync. This synchronization between the router and the action service allows the browser back/forward/reload to work as expected. Now, the TraceabilityReport can update the state, to add the active_model to the url (as a query param), and be able to restore the full state at reload. [1]: https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f [2]: https://github.com/odoo/odoo/commit/3ad4fd65387f60b524e5f786556963ead8ae9dfe Forward-Port-Of: odoo/enterprise#65681 Forward-Port-Of: odoo/enterprise#65284
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addo
Original PR description
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addons/mail/models/ir_actions_server.py#L123-L124 [Linked PR](https://github.com/odoo/odoo/pull/168043) opw-3946293 Forward-Port-Of: odoo/enterprise#65565 Forward-Port-Of: odoo/enterprise#63816
Currently, an error occurs while editing the customer form view when the '281.50' contact tag is not available Step to produce: - Install the 'l10n_be_reports' module. - Go to the list view of 'Contact Tags' and delete the '281.50' record. - Open the customer form view and try to edit it. Stack Trace : ``` KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7fb69b00be20>, 'l10n_be_reports.res_partner_tag_281_50') File "odoo/tools/cache.py", line 103, in lookup
Original PR description
Currently, an error occurs while editing the customer form view when the '281.50' contact tag is not available Step to produce: - Install the 'l10n_be_reports' module. - Go to the list view of…
Currently, an error occurs while editing the customer form view when the '281.50' contact tag is not available
Step to produce:
- Install the 'l10n_be_reports' module.
- Go to the list view of 'Contact Tags' and delete the '281.50' record.
- Open the customer form view and try to edit it.
Stack Trace :
```
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7fb69b00be20>, 'l10n_be_reports.res_partner_tag_281_50')
File "odoo/tools/cache.py", line 103, in lookup
r = d[key]
File "<decorator-gen-5>", line 2, in __getitem__
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
ValueError: External ID not found in the system: l10n_be_reports.res_partner_tag_281_50
File "odoo/http.py", line 2250, in __call__
response = request._serve_nodb()
File "odoo/http.py", line 1759, in _serve_nodb
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2055, in dispatch
result = endpoint(**self.request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/custom/default/saas_worker/controllers/main.py", line 2305, in smtp
proxy.message_process(None, message)
File "addons/mail/models/mail_thread.py", line 1369, in message_process
routes = self.message_route(message, msg_dict, model, thread_id, custom_values)
File "home/odoo/src/custom/trial/saas_trial/models/mail.py", line 369, in message_route
return super(MailThread, self).message_route(message, message_dict, model=model, thread_id=thread_id,
File "addons/mail/models/mail_thread.py", line 1093, in message_route
self._routing_handle_bounce(message, message_dict)
File "addons/mail/models/mail_thread.py", line 754, in _routing_handle_bounce
rec_bounce_w_email._message_receive_bounce(bounced_email, bounced_partner)
File "addons/mail/models/mail_thread_blacklist.py", line 104, in _message_receive_bounce
record.message_bounce = record.message_bounce + 1
File "odoo/fields.py", line 1376, in __set__
records.write({self.name: write_value})
File "home/odoo/src/enterprise/saas-17.2/l10n_be_reports/models/res_partner.py", line 26, in write
tag_281_50 = self.env.ref('l10n_be_reports.res_partner_tag_281_50')
File "odoo/api.py", line 584, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "odoo/addons/base/models/ir_model.py", line 2185, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)
File "<decorator-gen-43>", line 2, in _xmlid_lookup
File "odoo/tools/cache.py", line 110, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/ir_model.py", line 2178, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
```
An error occurs when the system tries to retrieve an external ID of the contact
tag '281.50'at [1], but it is not available.
link [1]: https://github.com/odoo/enterprise/blob/77c76fecda9b63e2fc17431a4cd3623650f93724/l10n_be_reports/models/res_partner.py#L26
To handle this issue, add 'raise_if_not_found=False' if the contact tag '281.50' is
not available.
sentry-5499490971
Forward-Port-Of: odoo/enterprise#64878Impacted versions: - 17.0 Steps to reproduce: 1. Install l10n_mx_edi module. 2. Go to Company ESCUELA KEMPER URGATE. 3. Go to Settings / Automatic Currency Rates. 4. Run manually the currency rates. 5. Go to Accounting / Customers / Invoices. 6. Create a new invoice with the next values: - Customer: "INMOBILIARIA CVA" - Currency: USD - Product: Any but set the UNSPSC Category (any) 7. Confirm the invoice. 8. Click send and print. 9. Check CFDI and click on Clic
Original PR description
Impacted versions: - 17.0 Steps to reproduce: 1. Install l10n_mx_edi module. 2. Go to Company ESCUELA KEMPER URGATE. 3. Go to Settings / Automatic Currency Rates. 4. Run manually the currency rates.…
Impacted versions:
- 17.0
Steps to reproduce:
1. Install l10n_mx_edi module.
2. Go to Company ESCUELA KEMPER URGATE.
3. Go to Settings / Automatic Currency Rates.
4. Run manually the currency rates.
5. Go to Accounting / Customers / Invoices.
6. Create a new invoice with the next values:
- Customer: "INMOBILIARIA CVA"
- Currency: USD - Product: Any but set the UNSPSC Category (any)
7. Confirm the invoice.
8. Click send and print.
9. Check CFDI and click on Click send and print.
10. Open the generated xml
Current behavior:
- TipoCambio have many variations depending of product and currency value:
Example: June 17th: have:
| Product | Quantity | TipoCambio |
|---------------------------|----------|------------|
| [FURN_0006] Monitor Stand | 1 | 18.538484 |
| [FURN_0004] Letter Tray | 1 | 18.538558 |
| [E-COM09] Large Desk | 1 | 18.538498 |
Expected behavior:
- TipoCambio (inside XML) should have the exchange value of the currency (invoiced). Example: June 17th should have 18.5385 (USD)
Inspired in: [l10n_mx_extended](https://github.com/odoo/enterprise/blame/f030d17e07ae7b10fe95e054eb27ba35101cfc96/l10n_mx_edi_extended/models/account_move.py#L178)
Forward-Port-Of: odoo/enterprise#64838Added the balance sheet and profit loss statements to Tanzania localization package. task-3783153 Forward-Port-Of: odoo/enterprise#58148
Original PR description
Added the balance sheet and profit loss statements to Tanzania localization package. task-3783153 Forward-Port-Of: odoo/enterprise#58148
With an MX company Enable QR on POS ticket receipt Open POS session Make 2 orders without customer or invoice (save qr of a receipt) Close POS Session Go to Orders, select the 2 orders Click Actions > Create Global Invoice (After a few days) Open QR link and validate invoice Issue: Credit note CFDI validation will fail In this flow the system first issue a global invoice, then when a customer ask the invoice a credit note for the global invoice needs to be generated with the new invoi
Original PR description
With an MX company Enable QR on POS ticket receipt Open POS session Make 2 orders without customer or invoice (save qr of a receipt) Close POS Session Go to Orders, select the 2 orders Click Actions > Create Global Invoice (After a few days) Open QR link and validate invoice Issue: Credit note CFDI validation will fail In this flow the system first issue a global invoice, then when a customer ask the invoice a credit note for the global invoice needs to be generated with the new invoice. Currently the system uses the original pos order date as credit note date and this will fail validation if the order has been created before 72 hours ago Forward-Port-Of: odoo/enterprise#65451
Methods from l10n_cl_edi are being moved to l10n_cl as part of https://github.com/odoo/odoo/pull/133695. This includes _l10n_cl_get_amounts and _float_repr_float_round on the account move model, as well as the method _l10n_cl_get_line_amounts on the account move line model. They can therefore be removed in this commit. The VAT section for the electronic ticket document is also being transferred in the same manner, and can thus be removed in the template here. This will allow to show the PD
Original PR description
Methods from l10n_cl_edi are being moved to l10n_cl as part of https://github.com/odoo/odoo/pull/133695. This includes _l10n_cl_get_amounts and _float_repr_float_round on the account move model, as well as the method _l10n_cl_get_line_amounts on the account move line model. They can therefore be removed in this commit. The VAT section for the electronic ticket document is also being transferred in the same manner, and can thus be removed in the template here. This will allow to show the PDFs of invoices generated in other currency in a correct way. X-original-commit: 135a9bee298fe77217548d2fe86ae2558878e5b7 (cherry picked from commit 6ac7ebd00f0e63d4927e05f85ee45b96c7def4e3) Forward-Port-Of: odoo/enterprise#65346 Forward-Port-Of: odoo/enterprise#60890
When you open the Trial Balance with the module installed, it procs a traceback. Also fixed the issue that clicking on the button does nothing. Adapted the override to the new Date filters. We now don't remove the other selector when clicking on Month 13 task-3983699 Forward-Port-Of: odoo/enterprise#64790
Original PR description
When you open the Trial Balance with the module installed, it procs a traceback. Also fixed the issue that clicking on the button does nothing. Adapted the override to the new Date filters. We now don't remove the other selector when clicking on Month 13 task-3983699 Forward-Port-Of: odoo/enterprise#64790
An error occurs when the system tries to access single values from multiple records at [1]. Traceback On Sentry: ``` ValueError: too many values to unpack (expected 1) File "odoo/models.py", line 5851, in ensure_one _id, = self._ids ValueError: Expected singleton: iot.device(1, 2, 3, 4, 5, 6, 7, 8) File "odoo/http.py", line 2248, in __call__ response = request._serve_db() File "odoo/http.py", line 1823, in _serve_db return self._transactioning(_serve_ir_http, read
Original PR description
An error occurs when the system tries to access single values from multiple records at [1]. Traceback On Sentry: ``` ValueError: too many values to unpack (expected 1) File "odoo/models.py", line…
An error occurs when the system tries to access single values from multiple records at [1].
Traceback On Sentry:
```
ValueError: too many values to unpack (expected 1)
File "odoo/models.py", line 5851, in ensure_one
_id, = self._ids
ValueError: Expected singleton: iot.device(1, 2, 3, 4, 5, 6, 7, 8)
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 76, in web_save
return self.with_context(bin_size=True).web_read(specification)
File "addons/web/models/models.py", line 164, in web_read
for vals in co_records.web_read(field_spec['fields'])
File "addons/web/models/models.py", line 87, in web_read
values_list: list[dict] = self.read(fields_to_read, load=None)
File "odoo/models.py", line 3610, in read
return self._read_format(fnames=fields, load=load)
File "odoo/models.py", line 3821, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "odoo/models.py", line 6608, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1261, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1443, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4934, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 100, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-17.2/quality_iot/models/iot.py", line 16, in _compute_qcp_test_type
self.qcp_test_type = types.get(self.type, '')
File "odoo/fields.py", line 1202, in __get__
record.ensure_one()
File "odoo/models.py", line 5854, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
To handle this issue, Implement an iteration to iterate records.
sentry-5540606405
Forward-Port-Of: odoo/enterprise#65604Forward-Port-Of: odoo/enterprise#65639 Forward-Port-Of: odoo/enterprise#65585
Original PR description
Forward-Port-Of: odoo/enterprise#65639 Forward-Port-Of: odoo/enterprise#65585
The data from the moves in foreign currency are wrongly exported in sales tax report Steps: - Install l10n_th_reports and select th company - Make an invoice in foreign currency - Go to tax report and click on Sales Tax Report button -> In the xlsx file: `Total Amount` and `Vat Amount` are displayed in move currency with the company currency sign while the `Total Excluding VAT Amount` is displayed in company currency With this commit, we display all the values in company cur
Original PR description
The data from the moves in foreign currency are wrongly exported in sales tax report Steps: - Install l10n_th_reports and select th company - Make an invoice in foreign currency - Go to tax report and click on Sales Tax Report button -> In the xlsx file: `Total Amount` and `Vat Amount` are displayed in move currency with the company currency sign while the `Total Excluding VAT Amount` is displayed in company currency With this commit, we display all the values in company currency. Note: The fix in 16.0 requires that we convert the value from `tax['tax_group_amount']` while in 17.0 we should use the new `tax['tax_group_amount_company_currency']` opw-3959408 Forward-Port-Of: odoo/enterprise#65300
The test `test_01_preparation_display_resto` was using the food category of test data by searching after it with ``` self.env['pos.category'].search([('name', '=', 'Food')]).id ``` Bu this category is not always present in the test data. This commit changes the test by create a new category called Food directly when creating a new preparation display. RB error: 67596 Forward-Port-Of: odoo/enterprise#65631
Original PR description
The test `test_01_preparation_display_resto` was using the food category of test data by searching after it with
```
self.env['pos.category'].search([('name', '=', 'Food')]).id
```
Bu this category is not always present in the test data.
This commit changes the test by create a new category called Food directly when creating a new preparation display.
RB error: 67596
Forward-Port-Of: odoo/enterprise#65631Steps: - import a winbooks with data 1: DOCORDER != VAT and journal not in ('asset_receivable', 'liability_payable') 2: without "AMOUNTEUR" Actual result: - 1 KeyError traceback for "display_type" - 2 TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' Expected result - No KeyError, default value is "product" (cf compute) https://github.com/odoo/odoo/blob/9389095d160a03117f815dacebf591d842c81d1d/addons/account/models/account_move_line.py#L433 - AMOUNTEUR is 0 f
Original PR description
Steps:
- import a winbooks with data
1: DOCORDER != VAT and journal not in ('asset_receivable', 'liability_payable')
2: without "AMOUNTEUR"
Actual result:
- 1 KeyError traceback for "display_type"
- 2 TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Expected result
- No KeyError, default value is "product" (cf compute)
https://github.com/odoo/odoo/blob/9389095d160a03117f815dacebf591d842c81d1d/addons/account/models/account_move_line.py#L433
- AMOUNTEUR is 0 for calculation if not there
Caused by:
1 https://github.com/odoo/enterprise/commit/b9d4ce816fb926b6c0e7a71cd572c8a1c4134155 2 https://github.com/odoo/enterprise/commit/198ecca82cf61b14f42686e8b051568bda034ce9
opw-3996117
Forward-Port-Of: odoo/enterprise#65159Steps to reproduce: - Create a preparation display - Create orders to appear in it - Create a new preparation display Behavior: - Past orders before the creation of the preparation display still appear. Intended behaviour: - New preparation display needs to be empty. Reference: opw-4008808 Forward-Port-Of: odoo/enterprise#65368
Original PR description
Steps to reproduce: - Create a preparation display - Create orders to appear in it - Create a new preparation display Behavior: - Past orders before the creation of the preparation display still appear. Intended behaviour: - New preparation display needs to be empty. Reference: opw-4008808 Forward-Port-Of: odoo/enterprise#65368
Issue --> With a large number of `account.move.line` and `pos.order.line` records, methods `_get_tax_details`, `_get_gstr1_hsn_json` and `_set_details_pos_lines` do not perform well. Solution --> In `_get_tax_details` --> Replace the journal items recordset with a set of ids to do deletions. Move the fetch to when it is actually needed. In `_get_gstr_hsn_json` --> Prefetch the l10n_in_code values on `uom.uom` records that are used in the for loop. This optimization prevents add
Original PR description
Issue --> With a large number of `account.move.line` and `pos.order.line` records, methods `_get_tax_details`, `_get_gstr1_hsn_json` and `_set_details_pos_lines` do not perform well. Solution --> In…
Issue --> With a large number of `account.move.line` and `pos.order.line` records, methods `_get_tax_details`, `_get_gstr1_hsn_json` and `_set_details_pos_lines` do not perform well. Solution --> In `_get_tax_details` --> Replace the journal items recordset with a set of ids to do deletions. Move the fetch to when it is actually needed. In `_get_gstr_hsn_json` --> Prefetch the l10n_in_code values on `uom.uom` records that are used in the for loop. This optimization prevents additional hits to the backend. In `_set_details_pos_lines` --> Fetch `product.product` records and all the `uom.uom` records before the for loop to prevent additional hits to the backend when trying to fetch `product_id.type`, `product_id.l10n_in_hsn_code` and `product_uom_id.l10n_in_code` Benchmark --> For about 110k journal items and 95k pos order lines, the current implementation takes about 2800 seconds to finish computation. After the fix, the process takes about 300 seconds to finish. opw-3895401 Forward-Port-Of: odoo/enterprise#65578 Forward-Port-Of: odoo/enterprise#62305
When making comparison in trial balance report, the values are inverted in relation to the header. Steps: - Create and confirm a move X for today and 1000$ - Create and confirm a move Y for today - 1 month and 2000$ - Go to trial balance, select `This month` and one previous period comparison in the options -> Under actual month column, we have the previous month value and vice versa Reason: In trial Balance we want the period order to be `ascending` by default, this is why we were inve
Original PR description
When making comparison in trial balance report, the values are inverted in relation to the header. Steps: - Create and confirm a move X for today and 1000$ - Create and confirm a move Y for today - 1 month and 2000$ - Go to trial balance, select `This month` and one previous period comparison in the options -> Under actual month column, we have the previous month value and vice versa Reason: In trial Balance we want the period order to be `ascending` by default, this is why we were inverted the column for this report. However, since 70665c2f40dae9c2823fac520d821e25f4fabb80, the order period is dynamically set by the `period_order` option in the comparison filter, and set by default to `ascending`, therefore there is no need to force the inversion of the columns. opw-3907491 Forward-Port-Of: odoo/enterprise#63630
Steps to reproduce: ------------------- With a user which has no access rights for 'Employees' and 'Contracts' and with admin rights for 'Planning', tries to add a new recurring shift (via the Planning module). Issue: ------ We get an access error. Cause: ------ We're trying to access the `contract_ids` field even though we don't have access rights. Solution: --------- Fetch the value of the `date_end` field in sudo so that this flow is not blocked for a planning user. opw-39
Original PR description
Steps to reproduce: ------------------- With a user which has no access rights for 'Employees' and 'Contracts' and with admin rights for 'Planning', tries to add a new recurring shift (via the Planning module). Issue: ------ We get an access error. Cause: ------ We're trying to access the `contract_ids` field even though we don't have access rights. Solution: --------- Fetch the value of the `date_end` field in sudo so that this flow is not blocked for a planning user. opw-3992135 Forward-Port-Of: odoo/enterprise#65486 Forward-Port-Of: odoo/enterprise#64845
Currently, if there is a connection error while retrieving the CDR, we clear the ticket number. This will cause the user to send a duplicate delivery guide if he clicks on 'Retry', which is not what we want. Instead, we should keep the ticket number in all error cases except explicit rejection from SUNAT, so that a retry will try to retrieve the CDR again using the existing ticket number. [link to API docs](https://cpe.sunat.gob.pe/sites/default/files/inline-files/ServicioREST_GRE-SEECont_
Original PR description
Currently, if there is a connection error while retrieving the CDR, we clear the ticket number. This will cause the user to send a duplicate delivery guide if he clicks on 'Retry', which is not what we want. Instead, we should keep the ticket number in all error cases except explicit rejection from SUNAT, so that a retry will try to retrieve the CDR again using the existing ticket number. [link to API docs](https://cpe.sunat.gob.pe/sites/default/files/inline-files/ServicioREST_GRE-SEECont_v1.2_0.xlsx) opw-3757843 Forward-Port-Of: odoo/enterprise#65580 Forward-Port-Of: odoo/enterprise#65352
**Current behavior:** A product that is tracked via serial will have all of its lots displayed in the Schedule gantt view instead of just the ones which are part of the order. **Expected behavior:** Only the lots corresponding to rented quants of a product will be displayed. **Steps to reproduce:** 1. Enable `Rental Transfers` in settings 2. Create a rental order with 1 of the demo printer products (they are tracked via SN already) and confirm 3. Open the rental schedule view, see
Original PR description
**Current behavior:** A product that is tracked via serial will have all of its lots displayed in the Schedule gantt view instead of just the ones which are part of the order. **Expected behavior:**…
**Current behavior:** A product that is tracked via serial will have all of its lots displayed in the Schedule gantt view instead of just the ones which are part of the order. **Expected behavior:** Only the lots corresponding to rented quants of a product will be displayed. **Steps to reproduce:** 1. Enable `Rental Transfers` in settings 2. Create a rental order with 1 of the demo printer products (they are tracked via SN already) and confirm 3. Open the rental schedule view, see that for the new order, all of the printers in stock with a SN are displayed **Cause of the issue:** Previously, the commit 8c90c7493ec was merged to fix an issue where you could not group by serial numbers in the schedule view for orders that were created while the 'Rental Transfers' setting was enabled. This introducted this bug by not actually specifying which `lot_id`s of a product were part of an order- so it selected ALL `lot_id`s of ANY product in a rental order. **Fix:** Add a join on `StockMove` so we can select `lot_id`s which are exclusively in `StockMoveLine`s that are linked to `StockMoves` which correspond to a rental order. opw-3977685 Forward-Port-Of: odoo/enterprise#64662 Forward-Port-Of: odoo/enterprise#64118
**Steps to reproduce:** - Install account_reports - Go to "Accounting / Accounting / Journals / Journal Entries" - Create a new entry: * Accounting Date: [a date from last month] * Journal Items: [2 lines using accounts that are not of type "asset_cash" or "liability_credit_card"] - Post the entry - Create a journal: * Type: Miscellaneous * Default Account: [one of the accounts used for the created entry] - Go to "Accounting / Reporting / Statement Reports / Cash Flow Statement
Original PR description
**Steps to reproduce:** - Install account_reports - Go to "Accounting / Accounting / Journals / Journal Entries" - Create a new entry: * Accounting Date: [a date from last month] * Journal Items: [2…
**Steps to reproduce:** - Install account_reports - Go to "Accounting / Accounting / Journals / Journal Entries" - Create a new entry: * Accounting Date: [a date from last month] * Journal Items: [2 lines using accounts that are not of type "asset_cash" or "liability_credit_card"] - Post the entry - Create a journal: * Type: Miscellaneous * Default Account: [one of the accounts used for the created entry] - Go to "Accounting / Reporting / Statement Reports / Cash Flow Statement" **Issue:** The default account from the newly created misc journal appears in the report even if it is not a bank-type (or cash-type) account. **Cause:** Previously, only account moves from a bank or a cash journal were taken into account in the report. The default account of these journals is forced to "asset_cash" type. However, a fix has been made to allow some account moves from miscellaneous journals, which can have any type of account as default account. **Solution:** Only allow default accounts having "asset_cash" or "liability_credit_card" as type. opw-3867312 Forward-Port-Of: odoo/enterprise#63989
Steps: - Install the project - Enable Budget management from settings - Create project - Click on set status button inside your project - Create budget Issue: - If budget is not used for expenditure then instead of showing 0% , it displays -0% which is incorrect. Cause: - float value of 'cost' i.e. 0.0 leads to generation of negative value Fix: - Issue is been fixed by applying condition if cost equals 0.0 task-3744319 Forward-Port-Of: odoo/enterprise#65461 Forward-Port-Of
Original PR description
Steps: - Install the project - Enable Budget management from settings - Create project - Click on set status button inside your project - Create budget Issue: - If budget is not used for expenditure then instead of showing 0% , it displays -0% which is incorrect. Cause: - float value of 'cost' i.e. 0.0 leads to generation of negative value Fix: - Issue is been fixed by applying condition if cost equals 0.0 task-3744319 Forward-Port-Of: odoo/enterprise#65461 Forward-Port-Of: odoo/enterprise#56998
13 changes
Enhancements to existing features
The help text for uploading certificates in the Mexican localization has been updated to correctly specify .cer and .key file formats instead of the confusing DER format reference. This change makes it clearer for users in Mexico what file types they need to upload when setting up their electronic invoicing certificates.
Original PR description
Currently, help message for certificates in mexican localization ask for der format files. This can be confusing, therefore this commit aims to change that for smoother user understandings. [Here](https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/mexico.html#cer-and-key-certificates) is the link to the documentation specifying the format are .cer and .key
This update improves the performance of HR contract automation by checking calendar conditions once per batch instead of for each individual record. This reduces unnecessary processing and speeds up automation workflows, particularly when dealing with large numbers of contracts.
Original PR description
Avoid to check calendar for each record. Follows the logic of the community PR: https://github.com/odoo/odoo/pull/167310 Forward-Port-Of: odoo/enterprise#65741 Forward-Port-Of: odoo/enterprise#65417
Resolved issues and error corrections
This fix corrects an issue where rental returns for kits containing sub-kits with shared components were calculating incorrect quantities. When a kit contained the same component in multiple places (e.g., a component both directly and within a sub-kit), the return process would incorrectly double-count quantities. The fix ensures that return stock movements are properly matched to their original kit structure, preventing duplicate quantity calculations.
Original PR description
When renting with deliveries, if it's about a kit with subkit and shared component, the return will not be correct To reproduce the issue: 1. In Settings, enable "Rental Transfers" 2. Create a kit K…
When renting with deliveries, if it's about a kit with subkit and
shared component, the return will not be correct
To reproduce the issue:
1. In Settings, enable "Rental Transfers"
2. Create a kit K as follow:
- K
- C1
- C2
- C3
- C2
3. Confirm a rental with 1 x K
Error: in the return, there are two lines for each C2, which makes
sense since each line is linked to a different kit. However, the
quantity on each line is incorrect: 2 instead of 1
When generating the SM of the return, we first generate the values
https://github.com/odoo/odoo/blob/8db471e74238481a5429f0fcf8fbce1c0960ff27/addons/stock/models/stock_rule.py#L205-L206
In `_push_prepare_move_copy_values`, at some point, we adapt the
quantity of the returned SM based on the other SM of the SO. To do
so, we only consider the SM with the same product (among other
conditions). This criterion is not strict enough: for instance, when
looking at C2 of K, we take its quantity *and* we also take C2 of C1,
which is incorrect. Of course, we do the same when looking at C2 of
C1, hence the incorrect quantities.
OPW-3996074This fix resolves issues preventing branch companies from validating SEPA Direct Debit batch payments. Previously, the system would crash or block validation when processing payments from branch companies with their own SEPA credentials. The update now properly handles SEPA batch exports for branch company structures, allowing organizations with multiple entities to process direct debit payments correctly.
Original PR description
…atch payment Create a branch company and switch to it Activate SEPA Direct Debit (SDD) and add Creditor Identifier Activate Batch Payments Add a SEPA bank account on the Bank journal Add a SEPA bank…
…atch payment
Create a branch company and switch to it
Activate SEPA Direct Debit (SDD) and add Creditor Identifier
Activate Batch Payments
Add a SEPA bank account on the Bank journal
Add a SEPA bank account on a partner
Create SEPA mandate for the partner bank account on the Bank journal
Make an invoice to the partner
Register payment with payment method "SEPA Direct Debit"
Go to Accounting>Customer>Payments
Select the payment > Hit 'Create Batch'
Validate creted batch
Issue: A traceback will raise
```py
File "[...]/enterprise/account_sepa_direct_debit/models/account_payment.py", line 117, in _sdd_xml_gen_header
create_xml_node_chain(InitgPty, ['Id','OrgId','Othr','Id'], company_id.sdd_creditor_identifier)
File "[...]/odoo/tools/xml_utils.py", line 109, in create_xml_node_chain
current_node.text = last_node_value
File "src/lxml/etree.pyx", line 1039, in lxml.etree._Element.text.__set__
File "src/lxml/apihelpers.pxi", line 747, in lxml.etree._setNodeText
File "src/lxml/apihelpers.pxi", line 735, in lxml.etree._createTextNode
File "src/lxml/apihelpers.pxi", line 1538, in lxml.etree._utf8
TypeError: Argument must be bytes or unicode, got 'bool'
```
This occurs because we assign the credit identifier to the branch
company, but when validating the batch the system exports the
sdd xml using the company found on the journal
https://github.com/odoo/enterprise/blob/88d25bd184585143f39011947263e928b14551e5/account_batch_payment/models/account_batch_payment.py#L343
so the parent company that have no Creditor Identifier defined
After adding the Creditor Identifier on the parent company and trying
again the validation an error will block the action
"""Trying to generate a Direct Debit XML file containing payments from
another company than that file's creditor."""
opw-3943103The knowledge module's history revision tour has been updated to align with recent improvements made to the document comparison feature. This ensures the guided tour accurately reflects the current functionality and provides users with an up-to-date learning experience when reviewing document history.
Original PR description
Adapt history revision tour after the improvements done on the comparison feature. task-3761721
This fix resolves an issue where unavailabilities were not being displayed in the appointment scheduling calendar when resources had no assigned companies. Now, resources that are not linked to any specific company will properly show their unavailability periods, ensuring accurate scheduling information is always visible.
Original PR description
In gantt, if there are no allowed companies none of the resources will have their unavailabilities filled in. Resources not linked to any company should still have their unavailabilities filled in. task-3981513
This fix corrects how debit note lines are automatically populated when creating debit notes from credit notes in Colombian companies. Previously, the Purchase Order field was not being filled in correctly because the manual line copying logic was interfering with the standard process. The fix ensures that lines are properly copied with all required fields populated, improving the accuracy of debit note creation.
Original PR description
### Original issue: When creating a debit note on a bill from a purchase order with the option 'copy_lines', the field 'Purchase Order' in the lines is not populated. ### Steps to reproduce: -…
### Original issue:
When creating a debit note on a bill from a purchase order with the option 'copy_lines', the field 'Purchase Order' in the lines is not populated.
### Steps to reproduce:
- Install Purchase, Inventory apps and the l10n_co_edi module
- Switch to a Colombian company
- Go to Accounting > Configuration > Accounting > Journals
- In the Vendor Bill journal > Advanced Settings, uncheck the 'Electronic invoicing UBL 2.1 (Colombia)' option
- Go to Purchase > Orders > Purchase Orders, create a new one and confirm it
- 'Receive Products' and 'Validate'
- Go back to the Purchase order
- 'Create Bill' and 'Confirm'
- From actions, choose 'Debit Note'
- In the wizard, tick 'Copy Lines', select a 'Concepto Nota de Débito' and 'Create Debit Note'
- Display the Purchase Order field in the Invoice Line tab is visible, it should not be populated
### Cause:
This bug is due to another fix that have been badly made because no tests were there. Most of the content of enterprise/l10n_co_edi/wizards/account_debit_note.py:_prepare_default_values is not called when it is supposed to and called when it's not.
In the 'Create Debit Note' wizard view there is an option to copy the lines and so, autopopulate them. This option is not displayed for Debit Notes generated from Credit Notes because the lines would be negative.
(https://github.com/odoo/odoo/blob/47eff65afdba3a2a8283342d8b636657f1fac317/addons/account_debit_note/wizard/account_debit_note_view.xml#L16)
The logic of this option is located in the module account_debit_note: https://github.com/odoo/odoo/blob/2a02ba4de1c823bcdef0e8b6b6373fa27b5587a1/addons/account_debit_note/wizard/account_debit_note.py#L64, the line_ids value is filled with a default value if copy_lines is False. If left empty, the lines are copied from the original account.move.
In this commit, https://github.com/odoo/enterprise/commit/c738f14d4ac88d508b6b75747788f5867eb71a68 we are trying to manually populate the lines of a debit note when it is generated from a credit note. But the code is made so that the lines are always copied.
So in this other commit https://github.com/odoo/enterprise/commit/fa65a1ff8cb7333a3339438513d1eeb5d5f9690e there is a correction to take the copy_lines into consideration. But it breaks the precedent fix as Debit Notes of Credit Notes always have copy_lines to False. So the code to copy the lines manually is actually never called for Debit Notes of Credit Notes (which is the only case we want it to be called in). But is called every time copy_lines is set to True therefore ignoring the actual code to copy the lines in the module account_debit_note.
In the context of the bug of this PR, the problem comes from the manual copying of lines that is missing the value purchase_order_id.
### Solution:
Changing the logic of the _prepare_default_values function:
- if not a Colombian company or not a debit note of a credit note, stop here
- we let the logic in account_debit_note copy the lines (or not) depending on copy_lines.
- if the debit note comes from a credit note, we copy the lines and return
With this flow, the lines will not be copied manually so the value purchase_order_id will be populated.
opw-3962301
Forward-Port-Of: odoo/enterprise#65215
Forward-Port-Of: odoo/enterprise#64689The search bar in account reports now correctly searches for individual accounts even when they're organized in hierarchical groups. Previously, the search only looked at visible lines, which meant searching for a specific account would return the group it belonged to instead. This fix ensures users can find the exact account they're looking for.
Original PR description
Before this commit, the search bar only look at the visible lines. With that a problem arise with hierarchy for example. When writing an account in the searchbar we want to search on the account.account and not the group. task: 3988840
This update fixes a system error that occurred when the IoT quality module tried to process multiple device records at once. The system was incorrectly expecting to handle only a single record, causing it to crash. The fix allows the system to properly iterate through and process multiple records without errors.
Original PR description
An error occurs when the system tries to access single values from multiple records at [1]. Traceback On Sentry: ``` ValueError: too many values to unpack (expected 1) File "odoo/models.py", line…
An error occurs when the system tries to access single values from multiple records at [1].
Traceback On Sentry:
```
ValueError: too many values to unpack (expected 1)
File "odoo/models.py", line 5851, in ensure_one
_id, = self._ids
ValueError: Expected singleton: iot.device(1, 2, 3, 4, 5, 6, 7, 8)
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 76, in web_save
return self.with_context(bin_size=True).web_read(specification)
File "addons/web/models/models.py", line 164, in web_read
for vals in co_records.web_read(field_spec['fields'])
File "addons/web/models/models.py", line 87, in web_read
values_list: list[dict] = self.read(fields_to_read, load=None)
File "odoo/models.py", line 3610, in read
return self._read_format(fnames=fields, load=load)
File "odoo/models.py", line 3821, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "odoo/models.py", line 6608, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1261, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1443, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4934, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 100, in determine
return needle(*args)
File "home/odoo/src/enterprise/saas-17.2/quality_iot/models/iot.py", line 16, in _compute_qcp_test_type
self.qcp_test_type = types.get(self.type, '')
File "odoo/fields.py", line 1202, in __get__
record.ensure_one()
File "odoo/models.py", line 5854, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
To handle this issue, Implement an iteration to iterate records.
sentry-5540606405
Forward-Port-Of: odoo/enterprise#65604This fix corrects a currency display issue in the Thailand sales tax report where foreign currency invoices were showing incorrect currency symbols. Previously, when exporting the sales tax report to Excel, the Total Amount and VAT Amount were displayed with the company currency sign even though they were in the foreign currency. Now all values are properly displayed in the company currency for consistency and accuracy.
Original PR description
The data from the moves in foreign currency are wrongly exported in sales tax report Steps: - Install l10n_th_reports and select th company - Make an invoice in foreign currency - Go to tax report and click on Sales Tax Report button -> In the xlsx file: `Total Amount` and `Vat Amount` are displayed in move currency with the company currency sign while the `Total Excluding VAT Amount` is displayed in company currency With this commit, we display all the values in company currency. Note: The fix in 16.0 requires that we convert the value from `tax['tax_group_amount']` while in 17.0 we should use the new `tax['tax_group_amount_company_currency']` opw-3959408 Forward-Port-Of: odoo/enterprise#65300
This fix resolves two critical errors that occurred when importing Winbooks data with missing or incomplete information. The system now properly handles missing fields by using default values instead of crashing, allowing imports to complete successfully even when certain data fields are absent from the source file.
Original PR description
Steps:
- import a winbooks with data
1: DOCORDER != VAT and journal not in ('asset_receivable', 'liability_payable')
2: without "AMOUNTEUR"
Actual result:
- 1 KeyError traceback for "display_type"
- 2 TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Expected result
- No KeyError, default value is "product" (cf compute)
https://github.com/odoo/odoo/blob/9389095d160a03117f815dacebf591d842c81d1d/addons/account/models/account_move_line.py#L433
- AMOUNTEUR is 0 for calculation if not there
Caused by:
1 https://github.com/odoo/enterprise/commit/b9d4ce816fb926b6c0e7a71cd572c8a1c4134155 2 https://github.com/odoo/enterprise/commit/198ecca82cf61b14f42686e8b051568bda034ce9
opw-3996117
Forward-Port-Of: odoo/enterprise#65159This update resolves an error that occurred when editing customer forms if a specific contact tag (281.50) was deleted from the system. The fix allows the system to gracefully handle missing contact tags instead of crashing, ensuring users can continue working with customer records without interruption.
Original PR description
Currently, an error occurs while editing the customer form view when the '281.50' contact tag is not available Step to produce: - Install the 'l10n_be_reports' module. - Go to the list view of…
Currently, an error occurs while editing the customer form view when the '281.50' contact tag is not available
Step to produce:
- Install the 'l10n_be_reports' module.
- Go to the list view of 'Contact Tags' and delete the '281.50' record.
- Open the customer form view and try to edit it.
Stack Trace :
```
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7fb69b00be20>, 'l10n_be_reports.res_partner_tag_281_50')
File "odoo/tools/cache.py", line 103, in lookup
r = d[key]
File "<decorator-gen-5>", line 2, in __getitem__
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
ValueError: External ID not found in the system: l10n_be_reports.res_partner_tag_281_50
File "odoo/http.py", line 2250, in __call__
response = request._serve_nodb()
File "odoo/http.py", line 1759, in _serve_nodb
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2055, in dispatch
result = endpoint(**self.request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/custom/default/saas_worker/controllers/main.py", line 2305, in smtp
proxy.message_process(None, message)
File "addons/mail/models/mail_thread.py", line 1369, in message_process
routes = self.message_route(message, msg_dict, model, thread_id, custom_values)
File "home/odoo/src/custom/trial/saas_trial/models/mail.py", line 369, in message_route
return super(MailThread, self).message_route(message, message_dict, model=model, thread_id=thread_id,
File "addons/mail/models/mail_thread.py", line 1093, in message_route
self._routing_handle_bounce(message, message_dict)
File "addons/mail/models/mail_thread.py", line 754, in _routing_handle_bounce
rec_bounce_w_email._message_receive_bounce(bounced_email, bounced_partner)
File "addons/mail/models/mail_thread_blacklist.py", line 104, in _message_receive_bounce
record.message_bounce = record.message_bounce + 1
File "odoo/fields.py", line 1376, in __set__
records.write({self.name: write_value})
File "home/odoo/src/enterprise/saas-17.2/l10n_be_reports/models/res_partner.py", line 26, in write
tag_281_50 = self.env.ref('l10n_be_reports.res_partner_tag_281_50')
File "odoo/api.py", line 584, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "odoo/addons/base/models/ir_model.py", line 2185, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)
File "<decorator-gen-43>", line 2, in _xmlid_lookup
File "odoo/tools/cache.py", line 110, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/ir_model.py", line 2178, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
```
An error occurs when the system tries to retrieve an external ID of the contact
tag '281.50'at [1], but it is not available.
link [1]: https://github.com/odoo/enterprise/blob/77c76fecda9b63e2fc17431a4cd3623650f93724/l10n_be_reports/models/res_partner.py#L26
To handle this issue, add 'raise_if_not_found=False' if the contact tag '281.50' is
not available.
sentry-5499490971This fix resolves an issue where exchange rates (TipoCambio) in Mexican electronic invoices were showing inconsistent values across different products on the same invoice. The exchange rate will now correctly display a single, consistent value based on the invoice's currency, ensuring compliance with Mexican tax requirements and improving data accuracy in financial documents.
Original PR description
Impacted versions: - 17.0 Steps to reproduce: 1. Install l10n_mx_edi module. 2. Go to Company ESCUELA KEMPER URGATE. 3. Go to Settings / Automatic Currency Rates. 4. Run manually the currency rates.…
Impacted versions:
- 17.0
Steps to reproduce:
1. Install l10n_mx_edi module.
2. Go to Company ESCUELA KEMPER URGATE.
3. Go to Settings / Automatic Currency Rates.
4. Run manually the currency rates.
5. Go to Accounting / Customers / Invoices.
6. Create a new invoice with the next values:
- Customer: "INMOBILIARIA CVA"
- Currency: USD - Product: Any but set the UNSPSC Category (any)
7. Confirm the invoice.
8. Click send and print.
9. Check CFDI and click on Click send and print.
10. Open the generated xml
Current behavior:
- TipoCambio have many variations depending of product and currency value:
Example: June 17th: have:
| Product | Quantity | TipoCambio |
|---------------------------|----------|------------|
| [FURN_0006] Monitor Stand | 1 | 18.538484 |
| [FURN_0004] Letter Tray | 1 | 18.538558 |
| [E-COM09] Large Desk | 1 | 18.538498 |
Expected behavior:
- TipoCambio (inside XML) should have the exchange value of the currency (invoiced). Example: June 17th should have 18.5385 (USD)
Changes:
- Avoid create query to search mx currency
OPW-3985223
Related PR: #64838