[16.0][ADD] purchase_request_line_sequence: order and number purchase request lines - #3146
Open
marcos-mendez wants to merge 2 commits into
Open
[16.0][ADD] purchase_request_line_sequence: order and number purchase request lines#3146marcos-mendez wants to merge 2 commits into
marcos-mendez wants to merge 2 commits into
Conversation
…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.
marcos-mendez
force-pushed
the
16.0-add-purchase_request_line_sequence
branch
from
August 13, 2026 19:06
804c644 to
530fde1
Compare
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.
Purchase request lines are ordered by
id desc: the last line typed shows upfirst, and the order cannot be changed. Sale orders, purchase orders and
invoices all carry a
sequencefield with a drag handle, so this bringspurchase requests in line with the rest of Odoo.
It also adds a
#column with the position of each line. That one is computedon 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 desctosequence, id. Onexisting databases every line shares the default sequence, so they fall back
to
idand read in the order they were typed instead of reversed.7 tests, 100% coverage on the model.