Skip to content
Permalink
Browse files

[FIX] website_sale: `_is_available_on_website` access rights issues

- The method `_is_available_on_website` on `product.pricelist` access to
  the field `code` which is limited to the group `base.group_user`.
  This causes issues when the method is called by a non internal user.
  • Loading branch information...
tbe-odoo committed Mar 26, 2019
1 parent f00c490 commit 5d370d63965c3421f4a577b49a0d5479ce6b0951
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/website_sale/models/product.py
@@ -79,7 +79,7 @@ def _is_available_on_website(self, website_id):
Change in this method should be reflected in `_get_website_pricelists_domain`.
"""
self.ensure_one()
return self.website_id.id == website_id or (not self.website_id and (self.selectable or self.code))
return self.website_id.id == website_id or (not self.website_id and (self.selectable or self.sudo().code))

def _get_website_pricelists_domain(self, website_id):
''' Check above `_is_available_on_website` for explanation.

0 comments on commit 5d370d6

Please sign in to comment.
You can’t perform that action at this time.