Skip to content

[18.0][MIG] account_invoice_same_accounting_date: Migration to 18.0#854

Open
deeniiz wants to merge 6 commits into18.0from
18.0-mig-account_invoice_same_accounting_date
Open

[18.0][MIG] account_invoice_same_accounting_date: Migration to 18.0#854
deeniiz wants to merge 6 commits into18.0from
18.0-mig-account_invoice_same_accounting_date

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented Mar 4, 2026

No description provided.

…counting date the same as the invoice date by default
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_same_accounting_date branch from 8757437 to c623321 Compare March 4, 2026 16:25
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 53.84615% with 6 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
...nvoice_same_accounting_date/models/account_move.py 45.45% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             18.0     #854   +/-   ##
=======================================
  Coverage        ?   53.84%           
=======================================
  Files           ?        3           
  Lines           ?       13           
  Branches        ?        2           
=======================================
  Hits            ?        7           
  Misses          ?        6           
  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.

eantones and others added 4 commits March 23, 2026 17:47
…date

Override _get_accounting_date instead of adding a separate onchange
handler. For purchase documents, route through super's sale document
branch (via a scoped context flag on is_sale_document) which applies
the tax lock date check and returns invoice_date directly, without
the max(invoice_date, today) logic that prevents proper currency
recomputation.

This lets the core _onchange_invoice_date detect the date change and
call _onchange_currency, which recomputes all line debit/credit at
the correct exchange rate. The previous _onchange_invoice_date_accounting
set date = invoice_date without triggering line recomputations, causing
base and tax lines to use different exchange rates on multi-currency
invoices.
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_same_accounting_date branch from c623321 to 112fbfd Compare March 23, 2026 16:48
@deeniiz deeniiz force-pushed the 18.0-mig-account_invoice_same_accounting_date branch from 112fbfd to b3f4775 Compare March 23, 2026 16:50
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.

2 participants