Hello Community,
I can’t seem to find a solution at the moment, so maybe someone here has an idea:
We are using Odoo Online v19.
We want to send quotations that contain many optional items. These items are visible in the attached PDF, but confirming the order becomes difficult because the customer has to describe their acceptance manually in their own text. Our customers do not have login credentials for the customer portal.
Up to now, we have worked around this by first creating a “Share” link and manually inserting it into the email message sent to the customer. This way, the customer can open the quotation online with all its positions, adjust optional items, and confirm it directly.
Is there a way to automatically insert this “Share link” into the email template so that it is included automatically when composing an email?
Thank you!
Hello Steffen Graf, Can you try this
<p>
View quotation:
<a t-attf-href="/my/orders/#{object.id}?access_token=#{object.access_token}">
{{ object.name }}
</a>
</p>
Key Differences from Your Code:
1. Use {{ }} instead of ${} - Odoo mail templates use Jinja2 syntax
2. Use #{ } for URLs with t-attf-href - This is QWeb attribute formatting
3. Use /my/orders/ not /my/quotes/ - The correct portal route for sale orders
4. Ensure access_token exists - The sale.order model should have this field by default
Hello Kunjan,
good job, thank you! The following code works perfectly:
View quotation:
<a t-attf-href="/my/orders/{{object.id}}?access_token={{object.access_token}}">Angebot online aufrufen</a>
Greethings
Steffen
Hello Steffen,
great to hear and you're welcome!
I'm glad the code is working perfectly for you
Greetings,
Kunjan Patel
Hello Kunjan, thank you for your reply. I tested your idea in our test instance as well as on demo.odoo.com. Unfortunately, the variable is not being populated. When I click the link, I get a 404 error — which makes sense when you look at the link shown at the bottom of the screen. Have I done any misttakes? Regards