diff --git a/addons/sale_management/models/sale_order.py b/addons/sale_management/models/sale_order.py index c6d95bea3a3..2b430efba7e 100644 --- a/addons/sale_management/models/sale_order.py +++ b/addons/sale_management/models/sale_order.py @@ -135,20 +135,6 @@ class SaleOrder(models.Model): order.sale_order_template_id.mail_template_id.send_mail(order.id) return res - def get_access_action(self, access_uid=None): - """ Instead of the classic form view, redirect to the online quote if it exists. """ - self.ensure_one() - user = access_uid and self.env['res.users'].sudo().browse(access_uid) or self.env.user - - if not self.sale_order_template_id or (not user.share and not self.env.context.get('force_website')): - return super().get_access_action(access_uid) - return { - 'type': 'ir.actions.act_url', - 'url': self.get_portal_url(), - 'target': 'self', - 'res_id': self.id, - } - def update_prices(self): super().update_prices() # Special case: we want to overwrite the existing discount on update_prices call