Skip to content

[14.0][FIX][product_supplierinfo_intercompany] keep sellers sorted #772

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

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion product_supplierinfo_intercompany/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def _prepare_sellers(self, params=False):
# use sudo to evaluate the access rule as we may not have the access
# rigth when evaluating the field intercompany_pricelist_id.company_id
seller_ids = sellers.sudo().filtered_domain(domain).ids
return sellers.browse(seller_ids)
# return the sellers in the same order as the original sellers
return sellers.browse(seller_ids).sorted(key=lambda s: sellers.ids.index(s.id))

def _get_intercompany_supplier_info_domain(self, pricelist):
return [
Expand Down