Skip to content

16.0 [IMP] website_sale_order_type: ensure sequence is applied on creation#1159

Open
uolaizola wants to merge 1 commit intoOCA:16.0from
binovo:16.0-imp-website-order-type-sequence
Open

16.0 [IMP] website_sale_order_type: ensure sequence is applied on creation#1159
uolaizola wants to merge 1 commit intoOCA:16.0from
binovo:16.0-imp-website-order-type-sequence

Conversation

@uolaizola
Copy link

The sale order sequence (determined by the order type) was not being correctly applied when orders were created via the website. This happened because 'type_id' was missing from the initial values in _prepare_sale_order_values, causing the order to be created with the default Odoo sequence before the type was assigned.

This commit:

  • Overrides _prepare_sale_order_values to inject the partner's sale type.
  • Adds a test case to verify the sequence prefix is correctly applied.

The sale order sequence (determined by the order type) was not being
correctly applied when orders were created via the website. This
happened because 'type_id' was missing from the initial values in
_prepare_sale_order_values, causing the order to be created with
the default Odoo sequence before the type was assigned.

This commit:
- Overrides _prepare_sale_order_values to inject the partner's sale type.
- Adds a test case to verify the sequence prefix is correctly applied.
@OCA-git-bot
Copy link
Contributor

Hi @pilarvargas-tecnativa,
some modules you are maintaining are being modified, check this out!

@uolaizola uolaizola changed the title [IMP] website_sale_order_type: ensure sequence is applied on creation 16.0 [IMP] website_sale_order_type: ensure sequence is applied on creation Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants