Skip to content

[REF] contract - pass self instead of relying on @api.model - #1497

Open
anthonissen-a wants to merge 1 commit into
OCA:18.0from
acsone:18.0-ref-contract_remove_static_args-aan
Open

[REF] contract - pass self instead of relying on @api.model#1497
anthonissen-a wants to merge 1 commit into
OCA:18.0from
acsone:18.0-ref-contract_remove_static_args-aan

Conversation

@anthonissen-a

Copy link
Copy Markdown

Replaces @api.model methods with instance methods across contract methods to improve extensibility and allow overrides to access record data in self.

Method parameters are now optional to ensure full backward compatibility.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sbejaoui, @florian-dacosta,
some modules you are maintaining are being modified, check this out!

@OCA-git-botOCA-git-bot added series:18.0 mod:contract Module contract mod:contract_line_successor Module contract_line_successor mod:contract_refund_on_stop Module contract_refund_on_stop mod:contract_forecast Module contract_forecast mod:contract_invoice_start_end_dates Module contract_invoice_start_end_dates mod:contract_sale_generation Module contract_sale_generation labels Aug 12, 2026
@anthonissen-a
anthonissen-aforce-pushed the 18.0-ref-contract_remove_static_args-aan branch from 5a767be to 6b89846CompareAugust 12, 2026 08:51
@anthonissen-a
anthonissen-aforce-pushed the 18.0-ref-contract_remove_static_args-aan branch from 6b89846 to 73138e4CompareAugust 12, 2026 11:57
@anthonissen-a
anthonissen-a marked this pull request as ready for review August 12, 2026 12:04

@qgroulardqgroulard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great changes 👍

This is backward compatible and it highly improves the extensibility of get_next_invoice_date and get_next_period_date_end for other OCA modules and custom code.

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

Labels

mod:contract_forecastModule contract_forecastmod:contract_invoice_start_end_datesModule contract_invoice_start_end_datesmod:contract_line_successorModule contract_line_successormod:contract_refund_on_stopModule contract_refund_on_stopmod:contract_sale_generationModule contract_sale_generationmod:contractModule contractseries:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@anthonissen-a@OCA-git-bot@qgroulard