Daily updates from Odoo
Monday, January 6, 2025
10 changes · master
Code cleanup and technical improvements
The Point of Sale system’s internal data handling has been reorganized to make the code easier to maintain and extend. This should not change day-to-day behavior for users, but it helps future updates across related Point of Sale features be delivered more reliably.
Original PR description
In this PR, we refactor the related_models module. There is now `Models` class that contains all the models. Also, a `CRUD` class is introduced to represent each model. We can get the model records from the `CRUD` methods. This refactoring is introduced so that the `Models` and the `CRUD` methods don't need to accept the instances as first param. `this` becomes usable in the `Models` and `CRUD` methods. Related: https://github.com/odoo/odoo/pull/189500
Miscellaneous changes
The "remaining" value of a budget should be the difference between the amount spent and the amount forecast, not the other way around. Task-4331872 Forward-Port-Of: odoo/enterprise#75767 Forward-Port-Of: odoo/enterprise#73742
Original PR description
The "remaining" value of a budget should be the difference between the amount spent and the amount forecast, not the other way around. Task-4331872 Forward-Port-Of: odoo/enterprise#75767 Forward-Port-Of: odoo/enterprise#73742
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated, i.e. "Balance Sheet" and "Profit and Loss" - Create a menu item in the action of the report - Open the report - Press the filter "Unfold All" - Press the "PDF" button -> Results: the pdf has no line unfolded while they should (the web UI works as expected) Reason of the issue
Original PR description
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated,…
Steps to reproduce - Activate developer mode - Go to Accounting -> Configuration -> Accounting Reports - Create a composite report with 2 existing reports that have the "filter_unfold_all" activated, i.e. "Balance Sheet" and "Profit and Loss" - Create a menu item in the action of the report - Open the report - Press the filter "Unfold All" - Press the "PDF" button -> Results: the pdf has no line unfolded while they should (the web UI works as expected) Reason of the issue: In the dispatch_report_action() function, the get_options() was wrong and unnecessary. This function is first called on the first section, then called on the composite report with its own options. This led to use the options of the composite report which does not have the filter_unfold_all field set to True. This also handles the case where a composite report has reports A and B, A having the filter_unfold_all while B doesn't have it. The expected result when printing it is that only report A has unfolded lines. task-4317649 Forward-Port-Of: odoo/enterprise#74826
- When the type of identification of vendor is 'RUC' the code should be 01 because is purchase - The "tipoComprobante" tag has to be '41' instead '01' according the schema of DIMM (government's software to validate ATS report) Forward-Port-Of: odoo/enterprise#73194
Original PR description
- When the type of identification of vendor is 'RUC' the code should be 01 because is purchase - The "tipoComprobante" tag has to be '41' instead '01' according the schema of DIMM (government's software to validate ATS report) Forward-Port-Of: odoo/enterprise#73194
Currently, An error occurs when reloading the DIAN configuration in an account journal to obtain the security token of a certificate, if no certificate is available. Step to produce: - Install the `l10n_co_dian` module. - Navigate to Settings and click on Certificates under the Certificates and Keys section. - And delete a 'Demo DIAN Certificate'. - Open any Journals and click on a 'Reload DIAN configuration'. `IndexError: tuple index out of range` The error occurs because the sys
Original PR description
Currently, An error occurs when reloading the DIAN configuration in an account journal to obtain the security token of a certificate, if no certificate is available. Step to produce: - Install the `l10n_co_dian` module. - Navigate to Settings and click on Certificates under the Certificates and Keys section. - And delete a 'Demo DIAN Certificate'. - Open any Journals and click on a 'Reload DIAN configuration'. `IndexError: tuple index out of range` The error occurs because the system attempts to access the certificate's token from a company at [1], but it is not available. Link [1]: https://github.com/odoo/enterprise/blob/a354a19060338084df35a14ed7f21defc3c05c11/l10n_co_dian/xml_utils.py#L123 To resolve this issue, Raise a validation error if a certificate is not found when the system attempts to retrieve its security token. Sentry-6165073693 Forward-Port-Of: odoo/enterprise#76316 Forward-Port-Of: odoo/enterprise#76052
Forward-Port-Of: odoo/enterprise#76430
Original PR description
Forward-Port-Of: odoo/enterprise#76430
Issue: ==================== - A traceback occurred when attempting to print the session report from the reporting menu. - The issue was caused by unused code related to pro forma orders left over from the refactoring in version 17.0. Fix: ==================== - Removed the unused code related to pro forma orders. - Ensured the session report can be printed without errors. Task-4438550 Forward-Port-Of: odoo/enterprise#76428 Forward-Port-Of: odoo/enterprise#76285
Original PR description
Issue: ==================== - A traceback occurred when attempting to print the session report from the reporting menu. - The issue was caused by unused code related to pro forma orders left over from the refactoring in version 17.0. Fix: ==================== - Removed the unused code related to pro forma orders. - Ensured the session report can be printed without errors. Task-4438550 Forward-Port-Of: odoo/enterprise#76428 Forward-Port-Of: odoo/enterprise#76285
Fix a small issue with the test where the batch is created before the freeze time, causing the batch date & name to be wrong. Forward-Port-Of: odoo/enterprise#76425
Original PR description
Fix a small issue with the test where the batch is created before the freeze time, causing the batch date & name to be wrong. Forward-Port-Of: odoo/enterprise#76425
Fix division by 0 and some UI Forward-Port-Of: odoo/enterprise#75916
Original PR description
Fix division by 0 and some UI Forward-Port-Of: odoo/enterprise#75916
Before this commit: ====================== - HTTP errors were not handled for UrbanPiper requests. - Calling `response.json()` raise a traceback After this commit: ====================== - Enhanced error handling using `raise_for_status()` to notify users of any errors. - Added a check for `fiscal_position` during configuration. task-4447233 Forward-Port-Of: odoo/enterprise#76436
Original PR description
Before this commit: ====================== - HTTP errors were not handled for UrbanPiper requests. - Calling `response.json()` raise a traceback After this commit: ====================== - Enhanced error handling using `raise_for_status()` to notify users of any errors. - Added a check for `fiscal_position` during configuration. task-4447233 Forward-Port-Of: odoo/enterprise#76436