diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 6b850ba296d..f3f57d86bbd 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -1322,34 +1322,6 @@ class ProductTemplate(models.Model): return _("There are no possible combination.") combination = combination[:-1] - def _get_current_company(self, **kwargs): - """Get the most appropriate company for this product. - - If the company is set on the product, directly return it. Otherwise, - fallback to a contextual company. - - :param kwargs: kwargs forwarded to the fallback method. - - :return: the most appropriate company for this product - :rtype: recordset of one `res.company` - """ - self.ensure_one() - return self.company_id or self._get_current_company_fallback(**kwargs) - - def _get_current_company_fallback(self, **kwargs): - """Fallback to get the most appropriate company for this product. - - This should only be called from `_get_current_company` but is defined - separately to allow override. - - The final fallback will be the current user's company. - - :return: the fallback company for this product - :rtype: recordset of one `res.company` - """ - self.ensure_one() - return self.env.company - def _get_placeholder_filename(self, field): image_fields = ['image_%s' % size for size in [1920, 1024, 512, 256, 128]] if field in image_fields: