Skip to content

[19.0][IMP] contract: paginate contract lines on the form view#1465

Open
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-contract-line-pagination
Open

[19.0][IMP] contract: paginate contract lines on the form view#1465
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-contract-line-pagination

Conversation

@bosd

@bosd bosd commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Problem

The contract form loads all contract lines at once. The recurring and fixed line lists (contract_line_ids / contract_line_fixed_ids) had no limit, so opening a contract with many lines rendered every line up front — noticeably slow on contracts with 50+ lines.

Change

Add limit="80" to both embedded line lists in the contract form view. 80 is Odoo's default backend list limit, so:

  • Small/typical contracts (< 80 lines) are unaffected — no pagination shown, identical UX.
  • Large contracts now load the first page instead of every line, so the form opens faster; the rest is one click away via the list pager.

Low risk, low effort — a view-only change, no Python/data changes.

The recurring/fixed contract line lists loaded every line at once, which
slows down opening contracts with many lines. Add a list `limit` (80,
Odoo's default backend list limit) so large contracts paginate instead of
rendering all lines up front. Small contracts are unaffected.

@qgroulard qgroulard 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.

Makes sense 👍

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants