[19.0][IMP] contract_line_successor: colour contract lines by lifecycle state - #1520
Open
bosd wants to merge 1 commit into
Open
[19.0][IMP] contract_line_successor: colour contract lines by lifecycle state#1520bosd wants to merge 1 commit into
bosd wants to merge 1 commit into
Conversation
Contributor
|
Hi @sbejaoui, |
bosd
force-pushed
the
19.0-imp-contract_line_successor-state-colors
branch
2 times, most recently
from
September 5, 2026 16:10
efc3c38 to
6fff528
Compare
pedrobaeza
approved these changes
Sep 5, 2026
bosd
pushed a commit
to bosd/contract
that referenced
this pull request
Sep 5, 2026
The form's embedded recurring-line lists (contract_line_fixed_ids and contract_line_ids) still coloured lines blue by create_invoice_visibility, so an in-progress line lit up as soon as it was invoice-ready. Colour them by state to match the standalone list / OCA OCA#1520: upcoming=info(blue), in-progress=normal, to-renew/upcoming-close=primary(purple), closed/canceled=muted. Bump 1.1.8->1.1.9.
Colour the contract line list by the line's `state`: - upcoming -> info (blue, like a draft order) - in-progress -> normal - to-renew / upcoming-close -> primary (purple: needs attention before the end date, but not an error) - closed / canceled -> muted Warning (orange) is deliberately left free so it keeps meaning a genuine problem, matching the contract itself (yellow = invoice generation error). This mirrors the contract list colours and Odoo's draft/expired conventions, so a line's status is readable at a glance. Replaces the previous `create_invoice_visibility`-driven blue, which lit in-progress lines that happened to be due for invoicing.
bosd
force-pushed
the
19.0-imp-contract_line_successor-state-colors
branch
from
September 5, 2026 18:26
6fff528 to
9d9214a
Compare
bosd
pushed a commit
to bosd/contract
that referenced
this pull request
Sep 5, 2026
…, bump 1.1.2 FLC deploy branch = OCA#1520 (standalone + contract-form line state colouring) with a version bump so OPaaS upgrades past the deployed 1.1.0/1.1.1. The form colouring lives here (not in base contract) because this module defines contract.line.state and loads after contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1370 (the 19.0 migration of
contract_line_successor, which introduces the linestatefield). Merge #1370 first; this then rebases to just the coloring change.Problem
The contract-lines list colours a line blue whenever it is due for invoicing (
create_invoice_visibility) and muted only when canceled. So an ordinary in-progress line shows up blue the moment it is invoice-ready, and an ended line looks identical to a running one. This applies both to the standalone contract-lines list and to the lists embedded on the contract form.Change
Colour the lines by their lifecycle
state, matching the contract list and Odoo's own draft/expired conventions, on both the standalone list and the contract-form embedded lists (contract_line_fixed_ids/contract_line_ids):upcomingin-progressto-renew,upcoming-closeclosed,canceledWarning/orange is deliberately left free so it keeps meaning a genuine problem (as
has_invoice_generation_errordoes on the contract itself).Note
This intentionally replaces the previous
create_invoice_visibility-driven blue: an in-progress line that is due for invoicing is no longer coloured (blue now means upcoming only). Flagging that as a deliberate behaviour change for reviewers.