Skip to content

[18.0][IMP] contract: fix invoicing (date_ref & invoice lines)#1403

Merged
OCA-git-bot merged 2 commits intoOCA:18.0from
jbaudoux:18-fix-contract-invoice_line_ids
Mar 18, 2026
Merged

[18.0][IMP] contract: fix invoicing (date_ref & invoice lines)#1403
OCA-git-bot merged 2 commits intoOCA:18.0from
jbaudoux:18-fix-contract-invoice_line_ids

Conversation

@jbaudoux
Copy link
Contributor

@jbaudoux jbaudoux commented Mar 9, 2026

Multiple contracts invoicing

Fix date_ref set by the first contract, preventing other contracts to be invoiced

Allow additional invoice lines

Allow to hook contract._prepare_invoice to add more invoice lines.

invoice_vals["invoice_line_ids"] is already initialized by _prepare_invoice. I'm simply removing the reset of the value by the caller.

Allow to hook contract._prepare_invoice to add more invoice lines
Copy link
Contributor

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

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

Code review, LGTM!

Fix date_ref when invoicing multiple contracts
@jbaudoux jbaudoux force-pushed the 18-fix-contract-invoice_line_ids branch from daabf9f to 6276c8c Compare March 18, 2026 11:23
@jbaudoux jbaudoux changed the title [18.0][IMP] contract: allow additional invoice lines [18.0][IMP] contract: fix invoicing (date_ref & hook) Mar 18, 2026
@jbaudoux jbaudoux changed the title [18.0][IMP] contract: fix invoicing (date_ref & hook) [18.0][IMP] contract: fix invoicing (date_ref & invoice lines) Mar 18, 2026
@jbaudoux
Copy link
Contributor Author

jbaudoux commented Mar 18, 2026

@luisDIXMIT @sbejaoui @etobella @pedrobaeza @victor-champonnois @tobiaszehntner I fixed the invoicing in case there are multiple contracts being invoiced. The date_ref method argument was overriden by the first contract.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Mar 18, 2026
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1403-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit e31efc2 into OCA:18.0 Mar 18, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9caa33b. Thanks a lot for contributing to OCA. ❤️

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.

4 participants