Skip to content
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

[17.0][ADD]: Improve pos_order_to_sale_order #1252

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

victorvermot
Copy link

@victorvermot victorvermot commented Oct 7, 2024

Before Change:

  • The lang used in the SO is not the one set on the partner
  • The pricelist is not the one set on the partner

After Merge:

  • The lang is the one used in the partner -> a german partner will have the article description in german
  • The pricelist is the correct one by retriggering compute methods

@OCA-git-bot
Copy link
Contributor

Hi @legalsylvain,
some modules you are maintaining are being modified, check this out!

@victorvermot victorvermot force-pushed the improve_pos_order_to_sale_order branch from 331b5ae to 6103b98 Compare October 7, 2024 14:22
@victorvermot victorvermot force-pushed the improve_pos_order_to_sale_order branch from 6103b98 to 1d776c6 Compare October 7, 2024 14:36
Comment on lines +16 to +23
partner_pricelist = (
order_data["pricelist_id"]
if order_data["pricelist_id"]
else self.env["res.partner"]
.browse(order_data["partner_id"])
.property_product_pricelist.id
)
self.pricelist_id = partner_pricelist
Copy link
Contributor

@legalsylvain legalsylvain Oct 7, 2024

Choose a reason for hiding this comment

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

pricelist is selected on pos.order. Why the pricelist is not selected correctly in the point of sale ?

@legalsylvain
Copy link
Contributor

The lang is the one used in the partner -> a german partner will have the article description in german

I don't get it. why the data are not in german in the point of sale ?

@victorvermot
Copy link
Author

The lang is the one used in the partner -> a german partner will have the article description in german

I don't get it. why the data are not in german in the point of sale ?

In our case, a French vendor is using the pos to scan the articles. His/her system is in french. When creating the invoice for the partner, we want to use their language.

.browse(order_data["partner_id"])
.property_product_pricelist.id
)
self.pricelist_id = partner_pricelist
order_lines = [
Command.create(SaleOrderLine._prepare_from_pos(sequence, line_data[2]))
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess adding lang context over there should made the work.

@victorvermot victorvermot marked this pull request as ready for review October 16, 2024 13:39
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.

3 participants