Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Create schedule action For sending emails

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
odoo10
2 Răspunsuri
6447 Vizualizări
Imagine profil
jenan soliman

Hello,

I want to create schedule action for the button send by email in invoicing for customer every month, How can I do that.


Thanks in advance for any help.

0
Imagine profil
Abandonează
Imagine profil
D Enterprise
Cel mai bun răspuns

Hi,

The "Send by Email" button on the invoice opens the default email template (like account.email_template_edi_invoice ) and sends the invoice as a PDF attachment to the customer.

Create a Custom Module

Create a simple custom module (eg, auto_invoice_mailer ) and add the following logic.

__manifest__.py

{ 'name' : 'Auto Invoice Email Sender' , 'version' : '1.0' , 'category' : 'Accounting' , 'depends' : [ 'account' ], 'data' : [ 'data/auto_invoice_cron.xml' , ], }

models/auto_invoice.py

from odoo import models, api from datetime import datetime, timedelta class AutoInvoiceSender (models.Model): _inherit = 'account. move' @api.model def cron_send_invoices_by_email ( self ): # Set your criteria for invoices to send (eg, posted, customer invoice, not already sent) invoices = self. search([ ( 'move_type' , '=' , 'out_invoice' ), ( 'state' , '=' , 'posted' ), ( 'invoice_date' , '>=' , (datetime.today() - timedelta(days= 30 )).date()), ( 'invoice_sent' , '=' , False ), # Make sure it's not already sent ]) template = self.env.ref( 'account.email_template_edi_invoice' , raise_if_not_found= False ) for invoice in invoices: if template: invoice.message_post_with_template( template.id ) invoice.write({ 'invoice_sent' : True }) # Mark as sent

data/auto_invoice_cron.xml

<odoo> <data noupdate = "1"> <record id = "ir_cron_auto_invoice_sender" model = "ir.cron"> <field name = "name" >Send Monthly Customer Invoices by Email </field> <field name = "model_id" ref = "account.model_account_move"/> <field name = "state" >code </field> <field name = "code" >model.cron_send_invoices_by_email() </field> <field name = "user_id" ref = "base.user_admin"/> <field name = "interval_number">1 </field> <field name = "interval_type">months </field> <field name = "numbercall" >-1 </field> <field name = "doall" eval = "False"/> <field name = "active" eval = "True"/> </record> </data> </odoo>

i hope it is usefull

0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,


Create schedule action with the button click function.


<data noupdate="1">


     <record id="ir_cron_scheduler_recurring_action" model="ir.cron">


              <field name="name">Recurring Todo Activity</field>


               <field name="model_id" ref="model_mail_activity"/>


               <field name="state">code</field>


                <field name="code">model.action_done()</field>


                <field name="user_id" ref="base.user_root"/>


                <field name="interval_number">1</field>


                 <field name="interval_type">days</field>


                 <field name="numbercall">-1</field>

     </record>

</data>



Change the interval type as days/months


For creating email template please go through this blog


https://www.cybrosys.com/blog/creating-email-templates-in-odoo-15


Create python function to send email through button function


def action_done(self):

   mail_template = self.env.ref("module_name.email_template_name")

   mail_template_send_mail(self.id,force_send=True)


Hope it helps




0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to send messages that are not shown in chatter? Rezolvat
odoo10
Imagine profil
Imagine profil
Imagine profil
2
oct. 25
8803
How to ORDER BY? [Odoo 10] Rezolvat
odoo10
Imagine profil
Imagine profil
2
nov. 24
29704
Dynamic domain functionality - possible to change domain of a field in another model with onchange? (Odoo 10) Rezolvat
odoo10
Imagine profil
Imagine profil
Imagine profil
2
mai 24
8393
Change state of other module
odoo10
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
mar. 24
7812
The save button function from the application menu in recruitment is not the same with the save button function on the button from a form link to the applications menu.
odoo10
Imagine profil
0
mar. 24
2146
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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