Skip to content

[19.0][MIG] pos_order_to_sale_order - #1484

Draft
glitchov wants to merge 83 commits into
OCA:19.0from
acsone:19.0-mig-pos_order_to_sale_order-hda
Draft

[19.0][MIG] pos_order_to_sale_order#1484
glitchov wants to merge 83 commits into
OCA:19.0from
acsone:19.0-mig-pos_order_to_sale_order-hda

Conversation

@glitchov

@glitchov glitchov commented Feb 4, 2026

Copy link
Copy Markdown

Migration from #1429

legalsylvain and others added 30 commits February 4, 2026 11:27
* [ADD] new module pos_order_to_sale_order
…ion of this module (price unit loss, and pricelist) if pos_pricelist is installed
[FIX] Remove console.log ;
[IMP] Do not import js files in backend
[IMP] apply new readme structure
[FIX] remove useless demo file
[FIX] some pylint issues
[REF] add maintainers and developpment status
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-8.0/pos-8.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-8-0/pos-8-0-pos_order_to_sale_order/
Co-authored-by: Iván Todorovich <ivan.todorovich@druidoo.io>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_to_sale_order/
Currently translated at 100.0% (23 of 23 strings)

Translation: pos-12.0/pos-12.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_to_sale_order/es/
Currently translated at 100.0% (23 of 23 strings)

Translation: pos-12.0/pos-12.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_to_sale_order/pt_BR/
Return module's javascript widgets to make them extendable for other modules.

Same idea as OCA#535
…) is null, that occures if pos_restaurant is installed
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_to_sale_order/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-12.0/pos-12.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_to_sale_order/
chaule97 and others added 12 commits February 4, 2026 11:27
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-17.0/pos-17.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_order_to_sale_order/
Currently translated at 100.0% (22 of 22 strings)

Translation: pos-17.0/pos-17.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_order_to_sale_order/it/
Currently translated at 100.0% (22 of 22 strings)

Translation: pos-17.0/pos-17.0-pos_order_to_sale_order
Translate-URL: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_order_to_sale_order/ca/
Recompute `sale.order` taxes, as received ones are the ones from
product, without fiscal position mapping applied.
…ale order + changed the way to display buttons
@legalsylvain
legalsylvain marked this pull request as draft February 4, 2026 13:25
@legalsylvain

Copy link
Copy Markdown
Contributor

Thanks for porting this module.
could you take a look on red CI ?

@glitchov
glitchov force-pushed the 19.0-mig-pos_order_to_sale_order-hda branch from 26b2288 to b85bdab Compare February 4, 2026 13:41
@glitchov
glitchov force-pushed the 19.0-mig-pos_order_to_sale_order-hda branch from b85bdab to 0731135 Compare February 4, 2026 16:23

@FullProfit2022 FullProfit2022 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm
Funzional test ok

@symbiotech

Copy link
Copy Markdown

I continued this migration and opened a follow-up with CI fixes (Odoo 19 tour import paths + restore is_storable on tour products): #1587

Happy to close this one in favor of that PR if preferred.

symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Cashiers often lack Sales ACL; create_order_from_pos must elevate.

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Apply valid review notes (@Odoo-Module, assert msgs, a11y, typos)
and ignore chrome zombie teardown warning that fails checklog.

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
create_order_from_pos is a public RPC that sudo()s to bypass Sales
ACLs for cashiers. Without checks, any caller who can reach call_kw
could force draft/confirm/deliver/invoice with elevated rights.

Before elevating, require:
- a customer on the payload
- an open POS session readable by the current user
- action allowed by that config's iface_create_* flags

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
serializeForORM() returns x2many sync commands, not a plain line list.
CREATE (0) carries full vals; UPDATE/DELETE are partial or empty.

Treating every command as a new SO line breaks once a draft POS order
(or its lines) was synced: qty edits become bogus creates, deletes
KeyError / invent junk lines, and customer-note sequence matching
drifts.

Keep Command.CREATE payloads only when mapping POS -> sale.order.

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
delivered/invoiced actions only set move qty then call button_validate().
On lots, serials, or backorder policies, validate often returns a wizard
action instead of finishing, so pickings stay open and invoice/delivery
status assertions fail.

Set quantities, mark moves picked, validate with skip_backorder, and
process any leftover wizard so Create Delivered/Invoiced finishes.

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Exact float equality on monetary totals is flaky when tax/currency
rounding differs slightly across environments.

Use assertAlmostEqual(..., places=2) instead.

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
symbiotech added a commit to symbiotech/pos that referenced this pull request Jul 22, 2026
- Import Command from odoo like sale_order.py
- Mark Create Order icon decorative (aria-hidden); button text
  is enough for a11y and avoids hardcoded aria-label/title

Refs OCA#1484

Co-authored-by: Cursor <cursoragent@cursor.com>
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.