[FIX] sale: use website address when sending quotation by mail
When the quotation is sent by email it is still in draft state. However right after sending it will move to sent state. This state allows the customer to see it in its website portal. Let us then use a convenient context key used when sending quotations by email to force the use of website address for quotation link contained in the email.
This commit is contained in:
@@ -14,7 +14,7 @@ class SaleOrder(models.Model):
|
||||
portal users that have access to a confirmed order. """
|
||||
# TDE note: read access on sale order to portal users granted to followed sale orders
|
||||
self.ensure_one()
|
||||
if self.state in ['draft', 'cancel']:
|
||||
if self.state == 'cancel' or (self.state == 'draft' and not self.env.context.get('mark_so_as_sent')):
|
||||
return super(SaleOrder, self).get_access_action()
|
||||
if self.env.user.share:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user