Skip to content

[18.0][MIG] account_invoice_report_service: Migration to 18.0#705

Open
deeniiz wants to merge 51 commits into18.0from
18.0-mig-account_invoice_report_service
Open

[18.0][MIG] account_invoice_report_service: Migration to 18.0#705
deeniiz wants to merge 51 commits into18.0from
18.0-mig-account_invoice_report_service

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented Sep 19, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 19, 2025 06:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +509 to +510
t-set="tax_groups"
t-value="tax_totals['groups_by_subtotal'].get('Untaxed Amount', [])"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
<t t-set="tax_totals" t-value="o.tax_totals" />
<t
t-set="tax_groups"
t-value="tax_totals['subtotals'].get('Untaxed Amount', [])"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
t-value="tax_totals['subtotals'].get('Untaxed Amount', [])"
t-value="tax_totals['groups_by_subtotal'].get('Untaxed Amount', [])"

Copilot uses AI. Check for mistakes.
<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'])"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition checks for 'groups_by_subtotal' but should check for 'subtotals' to be consistent with Odoo 18.0 tax totals structure.

Suggested change
t-if="not (tax_totals and tax_totals['groups_by_subtotal'])"
t-if="not (tax_totals and tax_totals['subtotals'])"

Copilot uses AI. Check for mistakes.
<t t-set="tax_totals" t-value="o.tax_totals" />
<table
class="rid-table3"
t-if="not (tax_totals and tax_totals['subtotals'])"
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition should check for 'groups_by_subtotal' to be consistent with the tax groups access pattern used elsewhere in the codebase.

Suggested change
t-if="not (tax_totals and tax_totals['subtotals'])"
t-if="not (tax_totals and tax_totals['subtotals'] and tax_totals['groups_by_subtotal'])"

Copilot uses AI. Check for mistakes.
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_report_service branch 3 times, most recently from 5b6ea07 to 8aec3c6 Compare November 18, 2025 16:26
@deeniiz deeniiz requested a review from eantones November 18, 2025 16:26
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_report_service branch from 8aec3c6 to c3352f7 Compare February 11, 2026 11:37
eantones added 19 commits March 12, 2026 11:27
…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
eantones and others added 27 commits March 12, 2026 11:27
…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
…te does not keep the timezone when truncated by 'date' widget
…ak when the invoice lines have too much content.
…ice lines have too much content in delivery report"

This reverts commit 8a148f8.
…or other type of orders and not just sale orders.
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_report_service branch from c3352f7 to b874804 Compare March 12, 2026 10:31
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 36.29630% with 86 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (18.0@4b294fd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ount_invoice_report_service/models/account_move.py 18.75% 65 Missing ⚠️
...t_invoice_report_service/report/account_invoice.py 44.00% 14 Missing ⚠️
...ccount_invoice_report_service/models/sale_order.py 53.33% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants