-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][REF] pos_order_to_sale_order: create method optimization #1042
[16.0][REF] pos_order_to_sale_order: create method optimization #1042
Conversation
Hi @legalsylvain, |
5665631
to
2a79a4c
Compare
return { | ||
"partner_id": order_data["partner_id"], | ||
"origin": _("Point of Sale %s") % (session.name), | ||
"client_order_ref": order_data["name"], | ||
"user_id": order_data["user_id"], | ||
"pricelist_id": order_data["pricelist_id"], | ||
"fiscal_position_id": order_data["fiscal_position_id"], | ||
"order_lines": order_lines, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"order_lines": order_lines, | |
"order_line": order_lines, |
https://github.com/odoo/odoo/blob/16.0/addons/sale/models/sale_order.py#L208
Should fix the CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@legalsylvain done
2a79a4c
to
0d75cb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional, ok.
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 2d87948. Thanks a lot for contributing to OCA. ❤️ |
Optimized the process of sales order creation.
Before this changes:
Executing the create command creates an empty order, which can lead to unexpected effects if the create method has been extended by another module
After this changes:
The create method will return the order with the product lines included.