Friday, December 20, 2024
21 changes · master
Enhancements to existing features
This update makes company information consistently available across several business apps, helping features behave correctly in multi-company environments. It also streamlines how company switching information is handled by relying on the existing company service instead of session data.
Original PR description
This commit adapts the code to have companies always in the config. This with respect to a change in community (https://github.com/odoo/odoo/pull/190218)
This update removes an outdated internal coding pattern across several Odoo Enterprise apps. It should not change day-to-day user workflows, but it helps keep the platform easier to maintain and evolve over time.
Original PR description
odoo/odoo#182709 task-4155860
Budget items now limit account choices to accounts used in Profit and Loss reporting. This helps keep financial budgets aligned with the reports they depend on and reduces the chance of selecting inappropriate accounts.
Original PR description
This commit adds a domain to the `account_id` field from the account report budget item object (`account.report.budget.item`). The allowed accounts to be set on this field must be those from the Profit & Loss report, since the financial budget feature relies on it. task-id: 4314709
This update removes an outdated testing mock used by the Documents app as part of ongoing code modernization. It has no expected impact on day-to-day users, but helps keep the product easier to maintain and improve over time.
Original PR description
This commit removes the `res.users` mock model patch, as it depends on the legacy mail mock model. The change is part of ongoing efforts to deprecate outdated mock models and modernize the codebase. Part of Task-3818666 Related Com PR: https://github.com/odoo/odoo/pull/191140
Code cleanup and technical improvements
This update reorganizes internal point-of-sale IoT and preparation display code to make it easier for developers to read and maintain. It should not change day-to-day user workflows, but it helps reduce future maintenance effort and risk.
Original PR description
Try to use models instead of services when possible. This will make the code more readable and easier to maintain.
Miscellaneous changes
In ES localization Tax Report 349 is an informative tax return report for intra-Community operations. Currently, the tax report will show amounts from credit notes in the invoices section, instead of the refunds section Steps to reproduce: - Have an ES Company setup - Create and confirm credit note with: - EU partner - Type for mod 349: A - Go to Accounting > Reporting > Tax Report - Select Report: Tax Report (Mod 349) (ES) Issue: Credit Notes appear in the invoices section inst
Original PR description
In ES localization Tax Report 349 is an informative tax return report for intra-Community operations. Currently, the tax report will show amounts from credit notes in the invoices section, instead of the refunds section Steps to reproduce: - Have an ES Company setup - Create and confirm credit note with: - EU partner - Type for mod 349: A - Go to Accounting > Reporting > Tax Report - Select Report: Tax Report (Mod 349) (ES) Issue: Credit Notes appear in the invoices section instead of the refunds section opw-4358330 Forward-Port-Of: odoo/enterprise#75808 Forward-Port-Of: odoo/enterprise#75266
After this commit : ==== - Replace manual calculation with predefined method to enhance reliability and maintainability. task-4405397 Forward-Port-Of: odoo/enterprise#75620
Original PR description
After this commit : ==== - Replace manual calculation with predefined method to enhance reliability and maintainability. task-4405397 Forward-Port-Of: odoo/enterprise#75620
task-4403259 community: https://github.com/odoo/odoo/pull/190509 Forward-Port-Of: odoo/enterprise#75675
Original PR description
task-4403259 community: https://github.com/odoo/odoo/pull/190509 Forward-Port-Of: odoo/enterprise#75675
There is no need for two information panels, it causes redundancy at best or confusion when looking for a particular info. The purpose of this specification is to refactor this for * better clarity: one panel to show everything relevant * better UX: no need to open a dialog to view the details Technical challenges came from the needs to 1. Support this in stable => workaround to include data for additional fields even if the view is not updated. 2. Support the container folder (whe
Original PR description
There is no need for two information panels, it causes redundancy at best or confusion when looking for a particular info. The purpose of this specification is to refactor this for * better clarity: one panel to show everything relevant * better UX: no need to open a dialog to view the details Technical challenges came from the needs to 1. Support this in stable => workaround to include data for additional fields even if the view is not updated. 2. Support the container folder (when no record is selected), which is not a record loaded by the kanban/list view. See other commits for included fixes Task-4266789 Forward-Port-Of: odoo/enterprise#75696
Before this commit, other plans were not computed according to dates. As a result, it ws difficult to see when two plans were conflicting for one user. Forward-Port-Of: odoo/enterprise#75838
Original PR description
Before this commit, other plans were not computed according to dates. As a result, it ws difficult to see when two plans were conflicting for one user. Forward-Port-Of: odoo/enterprise#75838
`quality_iot` listens continuously for measure updates. It also provides a "take measure" button for devices that don't send automatically their measure. On caliper devices, measures are sent continuously, so methods to read value once were not implemented, resulting in a error if we tried to call them. To avoid displaying an error popup, we implemented those actions on caliper drivers. opw-4332476 Forward-Port-Of: odoo/enterprise#75847
Original PR description
`quality_iot` listens continuously for measure updates. It also provides a "take measure" button for devices that don't send automatically their measure. On caliper devices, measures are sent continuously, so methods to read value once were not implemented, resulting in a error if we tried to call them. To avoid displaying an error popup, we implemented those actions on caliper drivers. opw-4332476 Forward-Port-Of: odoo/enterprise#75847
The format of the payment report was iso20022 but it should be sepa_ct. Task: 4392276 Forward-Port-Of: odoo/enterprise#75442
Original PR description
The format of the payment report was iso20022 but it should be sepa_ct. Task: 4392276 Forward-Port-Of: odoo/enterprise#75442
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those fields values and therefore the XML could not be processed since it was expected an integer and it got a boolean. After this fix, if a country does not have VAT information, the field will be process as 0 and the XML will be created, so the invoice will be confirmed. We already had this approach in t
Original PR description
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those…
This fix is to avoid the an error that occurs when a country does not have the VAT information set. Before this fix, when that situation happened the method get_vat_country returned False as those fields values and therefore the XML could not be processed since it was expected an integer and it got a boolean. After this fix, if a country does not have VAT information, the field will be process as 0 and the XML will be created, so the invoice will be confirmed. We already had this approach in the past, inside the method wsfex_get_cae_request, but it was lost in a refactor made on the module. So what I did was just to recover that approach. https://github.com/odoo/enterprise/commit/33ea78a5bb34e657c16bcbb704eeb71897ae642d#diff-2459e118c605cf039bb94c62561285ad753b6a27c571f10a25547ee9b01aa318L741. Steps to reproduce the error: - Create a test contact based on Uruguay. - Go to Contacts/Configuration/Localization/Countries and delete all VAT information from Uruguay (Natural Person VAT, Legal Entity VAT, Other VAT) . - Create an invoice for the test client created before, add a product and all needed fields and try to confirm the invoice. - An error will pop up, saying that the server was unable to read request because of an error in the XML document. Forward-Port-Of: odoo/enterprise#75501
PoS was displaying a dependency error when trying open the printer selection popup to print a daily sale report. opw-4171163 Forward-Port-Of: odoo/enterprise#75809
Original PR description
PoS was displaying a dependency error when trying open the printer selection popup to print a daily sale report. opw-4171163 Forward-Port-Of: odoo/enterprise#75809
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the se
Original PR description
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which…
## Issue: When we create a batch from a payment by selecting it and clicking on "Create Batch", even if the payment is already in a batch or validated, it is possible to add it to a new batch, which can lead to issues when validating the batch. ## Steps to reproduce: - Create a payment (posted but not sent) SEPA transfer. - Select this payment and create batch payment. - validate the batch - Open payments list again, and select that same payment, then create a batch payment from the selection. - a new batch payment will be created. - If you open the batch payments list you'll notice 2 batches: 1. the original batch now has no payments inside it so the "re-generate Export File" button won't show up. 2. the second batch now contains the payment, but we can't re-generate the export file because it shows an error: The batch could not be validated, Some payments have already been sent. Solution: - before creating a batch with payments or adding payments to a batch we check if the payments we are adding are already in a batch. - also in the constrain method `_check_payments_constrains` we added a check to validate wether the payment we're adding is already validated. OPW-3976563 Forward-Port-Of: odoo/enterprise#74984 Forward-Port-Of: odoo/enterprise#67315
Giving l10n_ae_annual_leave_days_taken and l10n_ae_annual_leave_days_total a group value, as it is not supposed to be public. [link to build errors](https://runbot.odoo.com/web#id=97976&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/enterprise#75122
Original PR description
Giving l10n_ae_annual_leave_days_taken and l10n_ae_annual_leave_days_total a group value, as it is not supposed to be public. [link to build errors](https://runbot.odoo.com/web#id=97976&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/enterprise#75122
Before this commit, the following traceback could be encountered when changing the curency of a confirmed order (after removing the constraint in sale): ``` File "/home/arj/PycharmProjects/worktree/18.0/enterprise/sale_subscription/models/sale_order_log.py", line 95, in _create_log return self._create_currency_transfer_log(order, initial_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/arj/PycharmProjects/worktree/18.0/enterprise/sale_subscrip
Original PR description
Before this commit, the following traceback could be encountered when changing the curency of a confirmed order (after removing the constraint in sale):
```
File "/home/arj/PycharmProjects/worktree/18.0/enterprise/sale_subscription/models/sale_order_log.py", line 95, in _create_log
return self._create_currency_transfer_log(order, initial_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arj/PycharmProjects/worktree/18.0/enterprise/sale_subscription/models/sale_order_log.py", line 183, in _create_currency_transfer_log
old_mrr_new_currency = initial_values['currency_id'].currency_id._convert(old_mrr,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'res.currency' object has no attribute 'currency_id'
```
Forward-Port-Of: odoo/enterprise#75885Forward-Port-Of: odoo/enterprise#75570
Original PR description
Forward-Port-Of: odoo/enterprise#75570
Users only need the computation of the document type field for customer invoices. As a result, this fix restricts the assignment of document types to customer invoices, while preserving the standard functionality for all other document types. task-4299210 This is a fix for #73945 Forward-Port-Of: odoo/enterprise#75335
Original PR description
Users only need the computation of the document type field for customer invoices. As a result, this fix restricts the assignment of document types to customer invoices, while preserving the standard functionality for all other document types. task-4299210 This is a fix for #73945 Forward-Port-Of: odoo/enterprise#75335
Currently a traceback is occurring when there is no working time (calendar_id) in resource, while creating a planning slot. To reproduce this issue: 1) Install planning 2) Open any planning slot in Gantt view and redirect to resource from the slot 3) Remove the Working Time of that resource 4) Now try to create a new planning slot for that resource from Gantt view Error:- ``` ValueError: Expected singleton: resource.calendar() ``` Here, `calendar_id` is not required in the r
Original PR description
Currently a traceback is occurring when there is no working time (calendar_id) in resource, while creating a planning slot. To reproduce this issue: 1) Install planning 2) Open any planning slot in…
Currently a traceback is occurring when there is no working time (calendar_id) in resource, while creating a planning slot. To reproduce this issue: 1) Install planning 2) Open any planning slot in Gantt view and redirect to resource from the slot 3) Remove the Working Time of that resource 4) Now try to create a new planning slot for that resource from Gantt view Error:- ``` ValueError: Expected singleton: resource.calendar() ``` Here, `calendar_id` is not required in the resource. So, when the user removes the calendar_id from the resource and tries to create a new planning slot, it leads to the above traceback. In the below line, we try to get calendar_d from the resource if it is available. https://github.com/odoo/enterprise/blob/7847510dc6ad8dec73f01470714aacb0c3510769/planning/models/planning.py#L611-L612 We can resolve this issue by taking calendar_id from the company as it is required. If it fails to get the value from the resource. sentry-6150920391 Forward-Port-Of: odoo/enterprise#75713
Description of the issue this commit addresses: The community commit linked to this one changed the rates of luxembourgian taxes used in the oss fiscal positions. Because of that, some tests are failing. --- Desired behavior after this commit is merged: Said tests are not failing anymore. --- Community PR: https://github.com/odoo/odoo/pull/189444 task-[4369658](https://www.odoo.com/odoo/project/967/tasks/4369658) Forward-Port-Of: odoo/enterprise#75799 Forward-Port-Of: odoo/en
Original PR description
Description of the issue this commit addresses: The community commit linked to this one changed the rates of luxembourgian taxes used in the oss fiscal positions. Because of that, some tests are failing. --- Desired behavior after this commit is merged: Said tests are not failing anymore. --- Community PR: https://github.com/odoo/odoo/pull/189444 task-[4369658](https://www.odoo.com/odoo/project/967/tasks/4369658) Forward-Port-Of: odoo/enterprise#75799 Forward-Port-Of: odoo/enterprise#75650