Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

I need some info on how to insert a server action with XML for sending an email

Odoberať

Get notified when there's activity on this post

This question has been flagged
workflowxmlemail
1 Odpoveď
4852 Zobrazenia
Avatar
Aitor Bouzas

I need some info on how to insert a server action with XML for sending an email. I've searched for it into the web, but nothing seems to help me... I just need to add a server action that sends an email and link it to a workflow (I already know how to link it to a workflow action).

Can someone help me?

Thanks in advice

0
Avatar
Zrušiť
Avatar
Anand
Best Answer

1st create a server action...

<?xml version="1.0" encoding="UTF-8"?> <openerp> <data> <record id="ir_actions_server_send_email_when_closed_nconf" model="ir.actions.server"> <field name="name">Auto-email when request is closed, not confirmed</field> <field name="model_id" ref="model_generic_request"/> <field name="state">email</field> <field name="type">ir.actions.server</field> <field name="condition">True</field> <field name="email">object.requestor.email</field> <field name="subject">Your request object.name has been closed (not confirmed)</field> <field name="message"><![CDATA[ THIS IS AN AUTOMATED EMAIL. DO NOT REPLY. Hello, We are here to inform you that the request [[object.name]] you submitted on [[object.request_date]] with the following data: | Request - Details |========================= | Number: [[object.id]] |========================= | Responsible Person: [[object.responsible_name.name]] | Request description: [[object.request_description]] | Stating reasons: [[object.stating_reasons]] |========================= | Notes: [[object.notes]] Has not been confirmed and is closed. If you have any question, do not hesitate to contact your supervisor. Thank you!]]> </field> </record> </data> </openerp>

then link it in workflow activity...

<record model="workflow.activity" id="act_closed_nconf"> <field name="wkf_id" ref="wkf_request" /> <field name="name">request_closed_nconf</field> <field name="action_id" ref="ir_actions_server_send_email_when_closed_nconf"/> <field name="kind">function</field> <field name="action">close_nconf_request()</field> <field name="flow_stop">True</field> </record>

for more check here

2
Avatar
Zrušiť
Aitor Bouzas
Autor

Perfect! Thank you very much :)

Aitor Bouzas
Autor

Do you know how to use a template too? I'd like to define a template via xml and then use it in this server action... Is there any way?

Anand

wait i will ans...

Anand

check it.... https://www.odoo.com/forum/help-1/question/send-email-template-through-code-21588

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

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
how to export the workflow in xml?
workflow xml
Avatar
Avatar
1
mar 15
4500
[8.0] Email notification based on workflow state.
workflow email 8.0
Avatar
0
jún 16
4467
Workflow and inheritance
workflow xml 8.0
Avatar
0
sep 15
4198
jobs application email workflow
workflow email alias
Avatar
0
júl 15
4557
Send Email action throws an error
workflow error email
Avatar
2
máj 15
4261
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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