Skip to content

[16.0][ADD] purchase_request_line_sequence: order and number purchase request lines - #3146

Open
marcos-mendez wants to merge 2 commits into
OCA:16.0from
marcos-mendez:16.0-add-purchase_request_line_sequence
Open

[16.0][ADD] purchase_request_line_sequence: order and number purchase request lines#3146
marcos-mendez wants to merge 2 commits into
OCA:16.0from
marcos-mendez:16.0-add-purchase_request_line_sequence

Conversation

@marcos-mendez

Copy link
Copy Markdown

Purchase request lines are ordered by id desc: the last line typed shows up
first, and the order cannot be changed. Sale orders, purchase orders and
invoices all carry a sequence field with a drag handle, so this brings
purchase requests in line with the rest of Odoo.

It also adds a # column with the position of each line. That one is computed
on the fly and not stored — a reading aid, not an identifier: removing a line
renumbers the ones below it. It is an optional column and can be hidden.

Note that the default order changes, from id desc to sequence, id. On
existing databases every line shares the default sequence, so they fall back
to id and read in the order they were typed instead of reversed.

7 tests, 100% coverage on the model.

…lines

Purchase request lines are ordered by id desc, so the last line typed shows
up first and the order cannot be changed. Sale orders, purchase orders and
invoices all carry a sequence field with a drag handle instead.

Adds that sequence, plus a computed # column showing the position of each
line. The position is not stored: it is a reading aid, and removing a line
renumbers the ones below it.
@OCA-git-bot OCA-git-bot added series:16.0 mod:purchase_request_line_sequence Module purchase_request_line_sequence labels Aug 13, 2026
@marcos-mendez
marcos-mendez force-pushed the 16.0-add-purchase_request_line_sequence branch from 804c644 to 530fde1 Compare August 13, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:purchase_request_line_sequence Module purchase_request_line_sequence series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants