Daily updates from Odoo
Friday, May 3, 2024
20 changes · master
Enhancements to existing features
Creating a spreadsheet in Documents will no longer show a template selection dialog when no templates are available. This restores the previous behavior, reducing unnecessary steps for users who just want to create an empty spreadsheet.
Original PR description
This reverts commit 6d0af6cf42dbf033fe2b886d8ba60daec611f104. Task: 3761476
This update streamlines accounting-related test preparation so tests create fewer unnecessary default records, such as extra currencies and companies. It helps keep internal validation faster, simpler, and easier to maintain without changing day-to-day product behavior.
Original PR description
Removal of chart_template_ref and other arguments of setUpClass Avoid second currency and company created by default For currencies setup in test, avoid the data object Also removed the Test class `TestSaleTimesheetEnterpriseMultiCompany` as it is not used
Document-related screens now allow long titles to wrap onto multiple lines instead of being cut off or forced into one line. This makes longer folder, rule, and facet names easier for users to review without losing context.
Original PR description
Earlier the title was stuck to the single line in various models of the documents. This PR addresses the issue and provides multiline support for the titles. Task-3870149
Resolved issues and error corrections
This update fixes invalid text escape patterns across multiple Odoo Enterprise modules to avoid warnings in newer Python versions. It helps keep the system compatible with Python 3.12 and future releases without changing business features or workflows.
Original PR description
Since python3.12 invalid escape sequences are deprecated and this will be removed in future versions. This commit fixes all the missing escape automatically using All checks passed!. Some will be escaped, other may be replaced by r string. Another solution would be to hide the deprecation warning but this would maybe need to adapt some of the versions later leading to another forwardport hell, lets fix it one for all once we are at it. Note that ruff check will forbid to introduce new ones in any cases. Manual forward port of #61571
Miscellaneous changes
**Steps to reproduce:** - Install l10n_lu_reports - Switch to a company in Luxembourg (e.g. LU Company) - Go to "Accounting / Reporting / Statement Reports / Balance Sheet" - Export electronic report via "XML" button **Issue:** Some fields (i.e. "201", "202", "405", "406") don't appear in the XML if their value is 0. These fields are mandatory and should always appear in the XML. **Source:** https://ecdf.b2g.etat.lu/ecdf/forms/popup/CA_BILAN_ABR/2024/en/1/rules opw-3802589 Forwa
Original PR description
**Steps to reproduce:** - Install l10n_lu_reports - Switch to a company in Luxembourg (e.g. LU Company) - Go to "Accounting / Reporting / Statement Reports / Balance Sheet" - Export electronic report via "XML" button **Issue:** Some fields (i.e. "201", "202", "405", "406") don't appear in the XML if their value is 0. These fields are mandatory and should always appear in the XML. **Source:** https://ecdf.b2g.etat.lu/ecdf/forms/popup/CA_BILAN_ABR/2024/en/1/rules opw-3802589 Forward-Port-Of: odoo/enterprise#61446
Forward-Port-Of: odoo/enterprise#61851
Original PR description
Forward-Port-Of: odoo/enterprise#61851
The fix in https://github.com/odoo/enterprise/pull/59200/ mistakenly fixed a global rule along the problematic specific rule. Global rules (i.e. with no groups) are AND-ed and not OR-ed together. task-3884341 Forward-Port-Of: odoo/enterprise#61457
Original PR description
The fix in https://github.com/odoo/enterprise/pull/59200/ mistakenly fixed a global rule along the problematic specific rule. Global rules (i.e. with no groups) are AND-ed and not OR-ed together. task-3884341 Forward-Port-Of: odoo/enterprise#61457
string format was broken on post fail message, this commit fix it. [Task-3775424](https://www.odoo.com/web#id=3775424&cids=1&menu_id=6478&action=4043&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#61857
Original PR description
string format was broken on post fail message, this commit fix it. [Task-3775424](https://www.odoo.com/web#id=3775424&cids=1&menu_id=6478&action=4043&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#61857
The Belastingdienst for the Dutch government has a service to check the status of the processing of the submitted report. This adds this functionality through a new module (which will be merged in master). Forward-Port-Of: odoo/enterprise#61017 Forward-Port-Of: odoo/enterprise#60777
Original PR description
The Belastingdienst for the Dutch government has a service to check the status of the processing of the submitted report. This adds this functionality through a new module (which will be merged in master). Forward-Port-Of: odoo/enterprise#61017 Forward-Port-Of: odoo/enterprise#60777
Versions -------- - 17.0+ Issue ----- `precision_rounding` values were being passed incorrectly as `precision_digits` parameters. Solution -------- Pass them as named `precision_rounding` parameters instead. Community branch: https://github.com/odoo/odoo/pull/163182 Forward-Port-Of: odoo/enterprise#61890 Forward-Port-Of: odoo/enterprise#61387
Original PR description
Versions -------- - 17.0+ Issue ----- `precision_rounding` values were being passed incorrectly as `precision_digits` parameters. Solution -------- Pass them as named `precision_rounding` parameters instead. Community branch: https://github.com/odoo/odoo/pull/163182 Forward-Port-Of: odoo/enterprise#61890 Forward-Port-Of: odoo/enterprise#61387
**Steps:** Go to Payroll App > Configuration > Salary > Structures Select checkbox for any entry Now click on the Action Button **Issue:** "Duplicate" action menu is displayed 2 times  **Cause:** Prior to this update, the 'list_controller.js' file in version saas~16.4 did not included the "Duplicate" menu action within the [getActionMenuItems](https://github.com/odoo/odoo/blob
Original PR description
**Steps:** Go to Payroll App > Configuration > Salary > Structures Select checkbox for any entry Now click on the Action Button **Issue:** "Duplicate" action menu is displayed 2 times…
**Steps:** Go to Payroll App > Configuration > Salary > Structures Select checkbox for any entry Now click on the Action Button **Issue:** "Duplicate" action menu is displayed 2 times  **Cause:** Prior to this update, the 'list_controller.js' file in version saas~16.4 did not included the "Duplicate" menu action within the [getActionMenuItems](https://github.com/odoo/odoo/blob/saas-16.4/addons/web/static/src/views/list/list_controller.js#L287-L325) function. However, in the same version, the 'hr.payroll' model defined this action in the [hr_payroll_structure_views.xml](https://github.com/odoo/enterprise/blob/saas-16.4/hr_payroll/views/hr_payroll_structure_views.xml#L132-L143) file, utilized within the 'Salary Structures' in the Payroll app. In version 17.0, the "Duplicate" menu action was added to the [getStaticActionMenuItems](https://github.com/odoo/odoo/blob/17.0/addons/web/static/src/views/list/list_controller.js/#L304-L349) function of 'list_controller.js'. Following the update, despite the addition of the "Duplicate" menu action in the 'list_controller.js' file for version 17.0, it still remained present in the [hr_payroll_structure_views.xml](https://github.com/odoo/enterprise/blob/17.0/hr_payroll/views/hr_payroll_structure_views.xml#L134-L145) file. **Fix:** Removed the 'ir_actions_server_duplicate_structure' from hr_payroll_structure_views.xml, to ensure the same menu action "Duplicate" do not exist twice, in the 'Salary Structures'. Affected Version: 17.0 ~ master Task ID: [3854557](https://www.odoo.com/web#id=3854557&cids=2&menu_id=4720&action=4043&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#61666
**Current behavior:** When downloading sign documents via buttons in the form and tree views, user will get an access error on the read perm for the `sign.request.item.value` model. **Expected behavior:** These buttons should permit the download of the corresponding document. **Steps to reproduce:** 1. In the Sign app go to Documents 2. In the tree view click the download button by a document which has not already been generated (e.g., any of the demo data documents) **Cause of th
Original PR description
**Current behavior:** When downloading sign documents via buttons in the form and tree views, user will get an access error on the read perm for the `sign.request.item.value` model. **Expected…
**Current behavior:** When downloading sign documents via buttons in the form and tree views, user will get an access error on the read perm for the `sign.request.item.value` model. **Expected behavior:** These buttons should permit the download of the corresponding document. **Steps to reproduce:** 1. In the Sign app go to Documents 2. In the tree view click the download button by a document which has not already been generated (e.g., any of the demo data documents) **Cause of the issue:** The download buttons call `get_completed_document()` which, if the completed doc has not been generated, will directly call `_generate_completed_document()` where we do a `read_group()` on the `sign.request.item.value` model. This model must be read with `.sudo()` because access rights are never granted to any group. **Fix:** Get rid of the `_generate_completed_document()` call in `get_completed_document()`, letting the program go to the `act_url` flow, into `download_document()`. Here we will access the `sign.request` record with `env.su is True` which will permit the `read_group()` later on in the aforementioned flow. Because we always route from `get_completed_document()` with a `download_type='completed'`, there is no reason to generate the document here. opw-3834177 Forward-Port-Of: odoo/enterprise#61332 Forward-Port-Of: odoo/enterprise#60399
When generating VAT XML by posting a tax closing entry, the `<ns2:Comment>` tag in the ML is empty despite specifying a comment during the closing process. ### Steps to reproduce 1. Install `l10n_be_reports_post_wizard`. 2. Switch to a Belgian company. 3. Open the tax report. 4. Create a tax closing. 5. Post the tax closing, ensuring a comment is defined in the appearing wizard. 6. Review the generated XML file. Expected behavior: The `<ns2:Comment>` tag in the XML should display t
Original PR description
When generating VAT XML by posting a tax closing entry, the `<ns2:Comment>` tag in the ML is empty despite specifying a comment during the closing process. ### Steps to reproduce 1. Install `l10n_be_reports_post_wizard`. 2. Switch to a Belgian company. 3. Open the tax report. 4. Create a tax closing. 5. Post the tax closing, ensuring a comment is defined in the appearing wizard. 6. Review the generated XML file. Expected behavior: The `<ns2:Comment>` tag in the XML should display the comment entered during the tax closing. Actual behavior: The `<ns2:Comment>` tag is found to be empty. opw-3859928 Forward-Port-Of: odoo/enterprise#60917
Wrong conflict resolution when forward porting https://github.com/odoo/enterprise/commit/b81c50278a8d55a733c6f1579dc764c19b92e08d Task-3901993 Forward-Port-Of: odoo/enterprise#61772
Original PR description
Wrong conflict resolution when forward porting https://github.com/odoo/enterprise/commit/b81c50278a8d55a733c6f1579dc764c19b92e08d Task-3901993 Forward-Port-Of: odoo/enterprise#61772
[FIX] account_reports: hide lines at 0 when unfold Problem: There are two way to see the issue :- 1- Whenever you go to the balance sheet and check on the hide at 0 option Then you go and unfold-fold-unfold a line with one zero child and non zero child. The line will with zero will keep showing up. 2- Mentioned in the task-3898147 Issue: when we check the option 'hide at 0' then we fold
Original PR description
[FIX] account_reports: hide lines at 0 when unfold Problem: There are two way to see the issue :- 1- Whenever you go to the balance sheet and check on the hide at 0 option Then you go and…
[FIX] account_reports: hide lines at 0 when unfold
Problem: There are two way to see the issue :-
1- Whenever you go to the balance sheet and check on the hide at 0 option Then you go and
unfold-fold-unfold a line with one zero child and non zero child.
The line will with zero will keep showing up.
2- Mentioned in the task-3898147
Issue: when we check the option 'hide at 0' then we fold and unfold.
The flow of func 'unfold Loaded Line' (the already loaded lines) has no clue about the 'hide at 0' option
but on the other hand the func 'unfoldNewLine' (the new added lines) know about the 'hide at 0' option
Solution: Send the lines that we want to unfold to the 'assignLinesVisibility' logic that handle 'hide at 0'
as we do with 'unfoldNewLine'
Minor renames: setLineVisibility >> hideZeroLines, assignLinesVisibility >> setLineVisibility
Task-3898147
Forward-Port-Of: odoo/enterprise#61831**Steps to reproduce:** - Install l10n_ec_reports_ats - Switch to an Ecuadorian company (e.g. EC Company) - Create a draft invoice - Cancel the invoice - Go to "Accounting / Reporting / Statement Reports / Tax Report" - Filter the report on the same month than the cancelled invoice - Click on upper-left ATS button **Issue:** A traceback is raised: "TypeError: 'bool' object is not subscriptable" while trying to render the cancelled moves: <secuencialInicio t-out="void_move.l10n_lata
Original PR description
**Steps to reproduce:** - Install l10n_ec_reports_ats - Switch to an Ecuadorian company (e.g. EC Company) - Create a draft invoice - Cancel the invoice - Go to "Accounting / Reporting / Statement Reports / Tax Report" - Filter the report on the same month than the cancelled invoice - Click on upper-left ATS button **Issue:** A traceback is raised: "TypeError: 'bool' object is not subscriptable" while trying to render the cancelled moves: <secuencialInicio t-out="void_move.l10n_latam_document_number[-9:]"/> **Cause:** "l10n_latam_document_number" field is a computed field that depends on the name of the account move. When the move is in draft, it doesn't have a name (i.e. "/") and "l10n_latam_document_number" has False as value. **Solution:** Cancelled draft invoices should not be taken into account in ATS report. opw-3857645 Forward-Port-Of: odoo/enterprise#61737
Versions -------- - saas-16.4+ Steps ----- 1. Set decimal accuracy of Product Unit of Measure to 5 digits; 2. create a Manufacturing Order for any product; 3. set quantity to 1000 Units; 4. add Work Order and confirm; 5. go to Overview and click on the chosen Work Center. Issue ----- `1000` gets displayed as `1000.0000000000001`. Cause ----- Our float utils introduce tiny rounding errors, especially at higher precisions, which need to be eliminated for display. Solution
Original PR description
Versions -------- - saas-16.4+ Steps ----- 1. Set decimal accuracy of Product Unit of Measure to 5 digits; 2. create a Manufacturing Order for any product; 3. set quantity to 1000 Units; 4. add Work Order and confirm; 5. go to Overview and click on the chosen Work Center. Issue ----- `1000` gets displayed as `1000.0000000000001`. Cause ----- Our float utils introduce tiny rounding errors, especially at higher precisions, which need to be eliminated for display. Solution -------- Use `formatFloat` w/ the precision digits of the `qty_producing` field. opw-3684166 Forward-Port-Of: odoo/enterprise#61868 Forward-Port-Of: odoo/enterprise#58880
The context key default_journal_id is being given the record and not the id when opening the bank rec widget. In the bank rec widget, updateJournalState is called, which in some [cases](https://github.com/odoo/enterprise/blob/17.0/account_accountant/static/src/components/bank_reconciliation/kanban.js#L553) will use that context key as journal id to send to [collect_global_info_data](https://github.com/odoo/enterprise/blob/17.0/account_accountant/models/bank_rec_widget.py#L1576). In collect_g
Original PR description
The context key default_journal_id is being given the record and not the id when opening the bank rec widget. In the bank rec widget, updateJournalState is called, which in some [cases](https://github.com/odoo/enterprise/blob/17.0/account_accountant/static/src/components/bank_reconciliation/kanban.js#L553) will use that context key as journal id to send to [collect_global_info_data](https://github.com/odoo/enterprise/blob/17.0/account_accountant/models/bank_rec_widget.py#L1576). In collect_global_info_data, the journal id is used to browse, which create a recordset with id 'account.journal(x,)' which will trigger an error when exists is called. This change will simply fix the context key to properly take the id as you would expect. opw-3885030 Forward-Port-Of: odoo/enterprise#61850
Adding tooltip to Withhold Agent for l10n_ec localization in accounting settings under Ecuadorian Localization Reason is to give the user tip about what this field actually hold and enhance the user experience as some users raising some issues because of the lack of knowing this field Task [link](https://www.odoo.com/web#model=project.task&id=3819108) Task-3819108 Forward-Port-Of: odoo/enterprise#60578
Original PR description
Adding tooltip to Withhold Agent for l10n_ec localization in accounting settings under Ecuadorian Localization Reason is to give the user tip about what this field actually hold and enhance the user experience as some users raising some issues because of the lack of knowing this field Task [link](https://www.odoo.com/web#model=project.task&id=3819108) Task-3819108 Forward-Port-Of: odoo/enterprise#60578
Issue: DIAN activated the changes of Anexo 1.9 on May 1st. Currently our documents fail some (new) validations: * The TDC section should only be exported when the invoice is not in COP (since it is used for exchange rate information) * New tags ENC_11 and ENC_12 are needed in case there is no referenced invoice on a debit or credit note. (example discounts for early payments or discounts for rebates) Fix: This commit fixes these issues s.t. the validation passed again. * The TDC se
Original PR description
Issue: DIAN activated the changes of Anexo 1.9 on May 1st. Currently our documents fail some (new) validations: * The TDC section should only be exported when the invoice is not in COP (since it is used for exchange rate information) * New tags ENC_11 and ENC_12 are needed in case there is no referenced invoice on a debit or credit note. (example discounts for early payments or discounts for rebates) Fix: This commit fixes these issues s.t. the validation passed again. * The TDC section is only displayed if invoice is not in company currency (assumed to be 'COP' anyway in more places) * The new ENC_11 and ENC_12 tags are added (conditionally) **manual forward port** of https://github.com/odoo/enterprise/pull/61841 Forward-Port-Of: odoo/enterprise#61848