Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Jan 16, 2026

Steps to reproduce:

  • Go to the sequence interface, and chose the config number 1 for a pos.order
  • In the prefix field, enter something with characters that are not numbers
  • Go to a PoS with config number 1 active and make a purchase
  • A traceback appears saying that we can't convert the sequence to an Integer

Why the fix:
Having a custom prefix with letters used to work, but in version 19, we now store the sequence_number with the prefix, which can be composed of characters which can not be stored in an Integer field such as sequence_number.

To prevent this error, we remove the prefix and the suffix (which has the same issue) from the sequence_number before storing it. We then add the prefix and the suffix back when computing the order's name, so that it's consistant with the prefix and the suffix the user chose.

This is the way the order's name was computed before version 19.0, which saw the prefix and suffix disappear from the order's name.

opw-5386575

Forward-Port-Of: #239515

**Steps to reproduce:**
- Go to the sequence interface, and chose the config #1 for a pos.order
- In the prefix field, enter something with characters that are not numbers
- Go to a PoS with config #1 active and make a purchase
- A traceback appears saying that we can't convert the sequence to an Integer

**Why the fix:**
Having a custom prefix with letters used to work, but in version
19, we now store the sequence_number with the prefix, which can
be composed of characters which can not be stored in an Integer field
such as sequence_number.

To prevent this error, we remove the prefix and the suffix (which
has the same issue) from the sequence_number before storing it.
We then add the prefix and the suffix back when computing the
order's name, so that it's consistant with the prefix and the
suffix the user chose.

This is the way the order's name was computed before version 19.0,
which saw the prefix and suffix disappear from the order's name.

opw-5386575

X-original-commit: 67fc637
@robodoo
Copy link
Contributor

robodoo commented Jan 16, 2026

Pull request status dashboard

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Jan 16, 2026
@fw-bot
Copy link
Contributor Author

fw-bot commented Jan 16, 2026

@artn-odoo @adgu-odoo this PR targets master and is the last of the forward-port chain containing:

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@artn-odoo
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Jan 19, 2026
**Steps to reproduce:**
- Go to the sequence interface, and chose the config #1 for a pos.order
- In the prefix field, enter something with characters that are not numbers
- Go to a PoS with config #1 active and make a purchase
- A traceback appears saying that we can't convert the sequence to an Integer

**Why the fix:**
Having a custom prefix with letters used to work, but in version
19, we now store the sequence_number with the prefix, which can
be composed of characters which can not be stored in an Integer field
such as sequence_number.

To prevent this error, we remove the prefix and the suffix (which
has the same issue) from the sequence_number before storing it.
We then add the prefix and the suffix back when computing the
order's name, so that it's consistant with the prefix and the
suffix the user chose.

This is the way the order's name was computed before version 19.0,
which saw the prefix and suffix disappear from the order's name.

opw-5386575

closes #244366

X-original-commit: 67fc637
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Arthur Nanson (artn) <artn@odoo.com>
@robodoo robodoo added the 19.2 label Jan 19, 2026
@robodoo robodoo closed this Jan 19, 2026
vikri-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jan 20, 2026
**Steps to reproduce:**
- Go to the sequence interface, and chose the config #1 for a pos.order
- In the prefix field, enter something with characters that are not numbers
- Go to a PoS with config #1 active and make a purchase
- A traceback appears saying that we can't convert the sequence to an Integer

**Why the fix:**
Having a custom prefix with letters used to work, but in version
19, we now store the sequence_number with the prefix, which can
be composed of characters which can not be stored in an Integer field
such as sequence_number.

To prevent this error, we remove the prefix and the suffix (which
has the same issue) from the sequence_number before storing it.
We then add the prefix and the suffix back when computing the
order's name, so that it's consistant with the prefix and the
suffix the user chose.

This is the way the order's name was computed before version 19.0,
which saw the prefix and suffix disappear from the order's name.

opw-5386575

closes odoo#244366

X-original-commit: 67fc637
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Arthur Nanson (artn) <artn@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

19.2 forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants