Wednesday, December 18, 2024
4 changes · 17.0
Resolved issues and error corrections
This update resolves a bug where deferred tax dates weren't correctly synchronized between invoice and tax lines. The fix ensures that tax line dates are accurately updated when invoice deferred dates are removed, preventing data inconsistencies. This improves the reliability of tax calculations and reporting.
Original PR description
Steps to reproduce: 1) Via Studio, modify the 'Journal Items' tab to add 'Start date' and 'End date' to the list view 2) Create a purchase tax 3) Create a bill with the tax created in the previous…
Steps to reproduce: 1) Via Studio, modify the 'Journal Items' tab to add 'Start date' and 'End date' to the list view 2) Create a purchase tax 3) Create a bill with the tax created in the previous step 4) Select deferred dates in the future 5) Check the journal items (two lines with deferred dates) 6) Go back to the 'Invoice lines' tab, delete the deferred dates and check the journal items again => one line still present the deferred dates!! Reason: When removing the `deferred_start_date` and the `deferred_end_date` from the invoice line, the newly computed `tax_key` for the tax line(s) will not have the `deferred_start_date` and the `deferred_end_date` fields, by [_get_deferred_tax_key](https://github.com/odoo-dev/enterprise/blob/c2c3a8591b3a5dfa402acb981564e46e0ff4ced9/account_accountant/models/account_move.py#L582). However, since when updating the tax line(s), we merge the old values with the new values (obtained in part from the before mentioned updated key), by this code in [_sync_dynamic_line](https://github.com/odoo/odoo/blob/f3d3e0c612392f1a35b9c131d29b4f3bd70a9d36/addons/account/models/account_move.py#L2599-L2602), and since the new key values of the tax line(s) does not have the `deferred_start_date` and the `deferred_end_date` explicitly set to `False`, and since the old key values have those fields set, merging new values with the old values will keep the old `deferred_start_date` and the `deferred_end_date`, resulting in a mismatch between the deferred dates on the invoice line and the tax lines. Fix: Now, `_get_deferred_tax_key` explicitly set `deferred_start_date` and the `deferred_end_date` to `False` when `tax_repartition_line_id ` is defined, to make sure they override any old `deferred_start_date` and the `deferred_end_date` existing in the old keys. opw-4328465
This update fixes a bug in the Helpdesk app that previously limited the products displayed on tickets to those linked to the customer's sales orders. Now, all products associated with a contact and their parent company will be visible, ensuring a more complete view for support agents. This improvement enhances the accuracy and usability of the Helpdesk system.
Original PR description
Steps to reproduce:
- Install helpdesk_stock and Studio
- Create 3 contacts, 1 company and two child employees
- Create a quotation for each contact with a different product
- Helpdesk app > Create a ticket
- Add the Product ('product_id') field with studio
- (Under 'Existing Fields' search product)
- (View tab > Show invisible elements > Find product field > untick invisible)
The products from contacts linked to the parent company should appear, but only those related to SOs from the contact itself or its parent company are shown (i.e. We should see all 3 products no matter which contact is set as customer).
This is related to https://github.com/odoo/enterprise/pull/73391, which was a step in the right direction but still insufficient. Unlike that fix however this one is relevant up to master.
opw-4285382
Forward-Port-Of: odoo/enterprise#74361This update fixes an issue where inter-company sales and purchase orders didn't automatically assign a fiscal position. The change removes a redundant setting, allowing the system to correctly calculate and apply the appropriate fiscal position when creating these orders. This ensures accurate accounting and reporting for transactions between companies.
Original PR description
When creating a PO/SO with inter-company rules, the related SO/PO has no fiscal position set, unless having one set on the partner. Removing the `fiscal_position_id` from the values dict allows it to be computed directly at the creation of the related SO/PO Steps: - Have 2 companies A and B - Activate inter-company rules and synchronize sale/purchase orders - With A, create a SO for B, confirm - With B, go to PO and select the related PO newy created -> There is no fiscal position opw-4247948 Forward-Port-Of: odoo/enterprise#73392
This update fixes a problem where tax reports generated as PDFs were displaying cropped columns due to limitations in the PDF generation process. The fix removes unnecessary currency display from report headers, ensuring all data from the table view is accurately included in the PDF output. This improves the clarity and completeness of tax reports.
Original PR description
**Issue:** Some tax reports don't display all data. Last columns may be cropped.  **Expected:** The PDF file should contain all data displayed in the Tax Report table view as is. **Steps to reproduce:** - Activate Accounting app; - Install the Argentina localization; - Move to the Argentine company; - Go to `Accounting` > `Reporting` > `Tax Report`; - Change selection to display some lines (or add invoice lines); - Print PDF report. **Cause:** The columns are cropped because of the global width of the report wkhtmltopdf can't handle correctly. **Fix:** Remove useless currencies' display in headers. Backport improvement (https://github.com/odoo/enterprise/commit/5bbdc059045c1a50c8ef1d6f5f8c9cb76d2d85f9).  Ticket link: https://www.odoo.com/odoo/project/967/tasks/4349604 opw-4349604