Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Send an email button to the website

Subscribe

Get notified when there's activity on this post

This question has been flagged
emailtemplatewebsiteserveractionwebsite_sale
1 Reply
2621 Views
Avatar
Mikko

I would like to add an button on the website to the cart view, that basically would allow the customer to receive a PDF quotation of the current cart products to his/her email. I know how to create an email template, and thought of making a server action that would use the template and send the email. I also managed to create a button to the website. However, I don't know how to call the server action from the website, or if it's even possible in this case where the action is send an email type. If the server action executes python code, there is the "Available on the Website" button available. But not for the send an email action. Does this mean that this type of server action cannot be called from the website?

Anyway, as I currently see it I have three options:

  1. Somehow call the send an email server action from the website? How?
  2. Call an execute python code action and use that to call the send an email action? (seems shaky)
  3. Abandon the server action approach, and figure some other way to do this?

Any help will be greatly appreciated as always. Even if you can just point me on the right direction on options one, two and three above. Thank you! 

0
Avatar
Discard
Avatar
Ivana Bartonkova
Best Answer

Hi Mikko!

If you want a customer to have the possibility to receive a quote after clicking a button on the website, you would need to write a controller for that - you cannot simply call the python function that is defined in the backend on the model. 

Also, we need to assume, that this approach can work only if the customer is logged in or already inputted the delivery address (meaning the quotation is linked to a different customer than a Public User).

What could be easier to implement though would be to redirect the customer to the portal view of the quotation (as a shopping cart is basically a sale.order in status quotation), and there the customer can decide to download PDF or print it.

Hope I managed to point you to the right direction

Ivana from edoo.is

0
Avatar
Discard
Mikko
Author

Hi Ivana. Thank you very much for your advise, this does help a lot. I will ask about the controller from our Odoo partner, and we have the other possible solution that you suggested as a backup plan.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Clean up Website Quotations Solved
website website_sale
Avatar
Avatar
Avatar
2
Sep 24
5126
Google Places Autocomplete
google website website_sale
Avatar
Avatar
Avatar
2
Oct 25
3818
Website Product Description
website website_sale odoo16EE
Avatar
Avatar
1
Aug 25
1204
Disable Automatic Confirmation of Website Orders
ecommerce website website_sale
Avatar
Avatar
1
May 24
4308
how to limit the quantity of one product in ecommerce Solved
website website_sale eCommerce
Avatar
Avatar
1
Dec 23
3912
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now