diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index b8efd980571..8d41359ee70 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -277,19 +277,19 @@ class Pricelist(models.Model): def _get_partner_pricelist_multi(self, partner_ids, company_id=None): """ Retrieve the applicable pricelist for given partners in a given company. - It will return the first found pricelist in this order: - First, the pricelist of the specific property (res_id set), this one - is created when saving a pricelist on the partner form view. - Else, it will return the pricelist of the partner country group - Else, it will return the generic property (res_id not set), this one - is created on the company creation. - Else, it will return the first available pricelist + It will return the first found pricelist in this order: + First, the pricelist of the specific property (res_id set), this one + is created when saving a pricelist on the partner form view. + Else, it will return the pricelist of the partner country group + Else, it will return the generic property (res_id not set), this one + is created on the company creation. + Else, it will return the first available pricelist - :param company_id: if passed, used for looking up properties, - instead of current user's company - :return: a dict {partner_id: pricelist} + :param int company_id: if passed, used for looking up properties, + instead of current user's company + :return: a dict {partner_id: pricelist} """ - # `partner_ids` might be ID from inactive uers. We should use active_test + # `partner_ids` might be ID from inactive users. We should use active_test # as we will do a search() later (real case for website public user). Partner = self.env['res.partner'].with_context(active_test=False) company_id = company_id or self.env.company.id