-
-
Notifications
You must be signed in to change notification settings - Fork 605
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][IMP] pos_order_to_sale_order : use customer note and correctly prepare sale.order.line name fields #1080
[16.0][IMP] pos_order_to_sale_order : use customer note and correctly prepare sale.order.line name fields #1080
Conversation
…er line name fields
…sale_order_line_multiline_description_sale to avoid to write on sale.order.line after having creating the sale.order.line
Hi @ivs-cetmix, @geomer198 . could you take a look on this one ? |
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
@legalsylvain Looks good! Thank you! |
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.
Could you fix my comments and add tests for this implementation?
Command.create(SaleOrderLine._prepare_from_pos(line[2])) | ||
for line in order_data["lines"] | ||
Command.create(SaleOrderLine._prepare_from_pos(i + 1, line_data[2])) | ||
for (i, line_data) in enumerate(order_data["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.
I think need add a start
argument for starting from 1
.
Command.create(SaleOrderLine._prepare_from_pos(i, line_data[2]))
for (i, line_data) in enumerate(order_data["lines"], start=1)
res = super()._get_sale_order_line_multiline_description_sale() | ||
|
||
for (i, line_data) in enumerate( | ||
self.env.context.get("pos_order_lines_data", []) |
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.
Here too.
self.env.context.get("pos_order_lines_data", []) | ||
): | ||
if line_data.get("customer_note", False) and self.sequence == i + 1: | ||
res += "\n" + line_data.get("customer_note") |
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.
Here better use f-string
:
res += f"\n{line_data.get('customer_note')}"
No time in the next days. Could you make a PR against my branch ? |
@legalsylvain sure, thank you! Will do |
Could you get me an access to creating PR? I got an error 403 at creating PR in your branch. |
I don't understand. You should have write to create a PR. could you say me where is your branch ? |
I created branch from this branch. I cloned branch in local and created a new brench from your. |
yes, but where is your branch on github ? |
I can't create branch on Github and get an error:
|
You have to push your branch on a remote you have write access. |
Sorry, I don't understand what you mean. I try push to your remote repository and doesn't access to your repository. |
1- fork the repo |
Thanks a lot! |
Done! grap#4 |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at ce90d76. Thanks a lot for contributing to OCA. ❤️ |
context : when using pos_order_to_sale_order in V16 :
This PR fixes both problem.
Supersed : #1065
Previous implementation :
New implementation :