Skip to content

Commit 25d27ce

Browse files
[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.
1 parent 0c8f303 commit 25d27ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/website_portal_sale/models/sale_order.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_access_action(self):
1414
portal users that have access to a confirmed order. """
1515
# TDE note: read access on sale order to portal users granted to followed sale orders
1616
self.ensure_one()
17-
if self.state in ['draft', 'cancel']:
17+
if self.state == 'cancel' or (self.state == 'draft' and not self.env.context.get('mark_so_as_sent')):
1818
return super(SaleOrder, self).get_access_action()
1919
if self.env.user.share:
2020
try:

0 commit comments

Comments
 (0)