[18.0][MIG] account_invoice_report_service: Migration to 18.0#705
[18.0][MIG] account_invoice_report_service: Migration to 18.0#705
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the account_invoice_report_service module from a previous version to Odoo 18.0. The migration introduces custom invoice and delivery PDF reports with service-specific functionality.
Key changes:
- Migration to version 18.0 with updated tax totals handling
- Implementation of custom invoice and delivery report templates
- Addition of timezone-aware date computations for service orders
Reviewed Changes
Copilot reviewed 25 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test-requirements.txt | Adds dependency on external sale_order_service module from Git |
| account_invoice_report_service/manifest.py | Updates module version to 18.0.1.0.0 and defines module structure |
| account_invoice_report_service/views/report_invoice_service.xml | Implements service invoice report template with patient and service data sections |
| account_invoice_report_service/views/report_invoice_delivery.xml | Implements delivery invoice report template with item details |
| account_invoice_report_service/models/account_invoice.py | Adds invoice grouping logic and line processing methods |
| account_invoice_report_service/models/sale_order.py | Adds timezone-aware date computation for orders |
| t-set="tax_groups" | ||
| t-value="tax_totals['groups_by_subtotal'].get('Untaxed Amount', [])" |
There was a problem hiding this comment.
The tax totals structure has changed in Odoo 18.0. The 'groups_by_subtotal' key should be 'subtotals' to match the new tax totals format.
| <t t-set="tax_totals" t-value="o.tax_totals" /> | ||
| <t | ||
| t-set="tax_groups" | ||
| t-value="tax_totals['subtotals'].get('Untaxed Amount', [])" |
There was a problem hiding this comment.
The tax groups structure should use 'groups_by_subtotal' instead of 'subtotals' to access tax group data. This appears to be inconsistent with the service report template.
| t-value="tax_totals['subtotals'].get('Untaxed Amount', [])" | |
| t-value="tax_totals['groups_by_subtotal'].get('Untaxed Amount', [])" |
| <t t-set="tax_totals" t-value="o.tax_totals" /> | ||
| <table | ||
| class="ris-table3" | ||
| t-if="not (tax_totals and tax_totals['groups_by_subtotal'])" |
There was a problem hiding this comment.
This condition checks for 'groups_by_subtotal' but should check for 'subtotals' to be consistent with Odoo 18.0 tax totals structure.
| t-if="not (tax_totals and tax_totals['groups_by_subtotal'])" | |
| t-if="not (tax_totals and tax_totals['subtotals'])" |
| <t t-set="tax_totals" t-value="o.tax_totals" /> | ||
| <table | ||
| class="rid-table3" | ||
| t-if="not (tax_totals and tax_totals['subtotals'])" |
There was a problem hiding this comment.
This condition should check for 'groups_by_subtotal' to be consistent with the tax groups access pattern used elsewhere in the codebase.
| t-if="not (tax_totals and tax_totals['subtotals'])" | |
| t-if="not (tax_totals and tax_totals['subtotals'] and tax_totals['groups_by_subtotal'])" |
5b6ea07 to
8aec3c6
Compare
8aec3c6 to
c3352f7
Compare
…ip code and minor adjustments
…es in service report Realted to issue odoo/odoo#35191
…nd hide 0 tax on both reports
…ess and zip to avoid confusion
…header to fit in an envelope with window and adjunt service report due to delivery report changes
… the product has no tracking eventhough it has on the line
… invoices and filename standarization
… client order ref
…header when none of the invoice lines are linked to an order + sort by lines without order first
… order per invoice and they have the same date, the second criterium to sort were nullable
…rvice report company configuration
…te does not keep the timezone when truncated by 'date' widget
…ak when the invoice lines have too much content.
…s have too much content in delivery report
…ice lines have too much content in delivery report" This reverts commit 8a148f8.
…s have too much content in service report
…invoice lines in delivery report
…or other type of orders and not just sale orders.
c3352f7 to
b874804
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 18.0 #705 +/- ##
=======================================
Coverage ? 36.29%
=======================================
Files ? 8
Lines ? 135
Branches ? 23
=======================================
Hits ? 49
Misses ? 86
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.