Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

how to send automatic mail when project created ?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
projectmailmodulesmoduleautomatic_email
22 Risposte
15170 Visualizzazioni
Avatar
Ahmed elbarbary

hi ,

i have a module to send automatic mail when customer has been created what about if i need to send mail when project created, what i should change in these files ?

__init__.py

import res_partner

------------------------------------------------------------------------------------------------------------------------------------------------------------

__openerp__.py

# -*- coding: utf-8 -*-
{
    "name" : "Automatical email to customer",
    "version" : "1.0",
    "author" : "Author name",
    "description": """
        Sends automatic when customer created
    """,
    "website" : "Author website name",
    "category" : "",
    'depends': ['base'],
    "data" : ['email_template_customer_auto.xml',],
    'js': [], 
    'css': [

    ],
    'qweb': [
    ],
    "active": False,
    "installable": True,

}

------------------------------------------------------------------------------------------------------------------------------------------------------------

res_partner.py

from osv import osv, fields

class res_partner(osv.osv):
    _inherit = 'res.partner'
    _columns = {}

    def create(self, cr, uid, vals, context=None):
        res = super(res_partner, self).create(cr, uid, vals, context=context)
        if vals:
            template = self.pool.get('ir.model.data').get_object(cr, uid, 'customer_auto_email', 'email_template_customer_auto')
            mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, res , force_send=True)

        return res

res_partner()

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

email_template_customer_auto.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data noupdate="1">

        <!--Email template-->
        <record id="email_template_customer_auto" model="email.template">
            <field name="name">Send auto email</field>
            <field name="email_from">${object.company_id and object.company_id.email or ''}</field>
            <field name="subject">New Customer created ${object.name}</field>
            <field name="email_to">${object.company_id and object.company_id.email or ''}</field>
            <field name="model_id" ref="base.model_res_partner"/>
            <field name="auto_delete" eval="True"/>
            <field name="lang">${object.lang}</field>
            <field name="body_html"><![CDATA[
             
          the email content

Thank you!           
            ]]></field>
        </record>
  
  </data>
</openerp>

0
Avatar
Abbandona
ABU K

Whent I try to install your code It raise an error ----AssertionError: The model email.template does not exist !

Ahmed elbarbary
Autore

so install module "Email template " and try again

ABU K

When I create a customer and save ,then I got this error######### ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto

OdooBot
is it a pop up message or it is  taceback ?


On 18 September 2014 09:15, Libu Koshy <libukoshym@mail.odoo.com> wrote:

When I create a customer and save ,then I got this error######### ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto

--
Libu Koshy
Sent by Odoo Inc. using Odoo about Forum Post how to send automatic mail when project created ?

Ahmed elbarbary
Autore

uninstall this module and delete it from your modules and i will send u the complete module to your email now

OdooBot
this is send auto email when customer be created 

On 18 September 2014 11:22, Libu Koshy <libukoshym@mail.odoo.com> wrote:

Server Traceback (most recent call last) with a pop up wizard

--
Libu Koshy
Sent by Odoo Inc. using Odoo about Forum Post how to send automatic mail when project created ?

OdooBot
this is send auto email when project be created 

On 18 September 2014 11:40, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
this is send auto email when customer be created 

On 18 September 2014 11:22, Libu Koshy <libukoshym@mail.odoo.com> wrote:

Server Traceback (most recent call last) with a pop up wizard

--
Libu Koshy
Sent by Odoo Inc. using Odoo about Forum Post how to send automatic mail when project created ?


OdooBot
this is send auto email when invoice be created 

On 18 September 2014 11:41, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
this is send auto email when project be created 

On 18 September 2014 11:40, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
this is send auto email when customer be created 

On 18 September 2014 11:22, Libu Koshy <libukoshym@mail.odoo.com> wrote:

Server Traceback (most recent call last) with a pop up wizard

--
Libu Koshy
Sent by Odoo Inc. using Odoo about Forum Post how to send automatic mail when project created ?



OdooBot
only invoice module or all modules 

OdooBot
really i am sorry i cannot help u i didn't know what is this error, it works fine at my system without any adding configuration just paste the module folders to addons then update module list and install those modules and every thing going well , u can check your outgoing mail server if u have the same problem u can do automated action and email templates from openerp wizard setting  instead of those modules


On 18 September 2014 12:51, Libu Koshy <libukoshym@mail.odoo.com> wrote:

Now I tried only this module(invoice module) ,and when I create a invoice then error occurs

--
Libu Koshy
Sent by Odoo Inc. using Odoo about Forum Post how to send automatic mail when project created ?

Avatar
Janeesh
Risposta migliore

Hi,

Try this code.

module name : project_auto_email

__init__.py

import project

------------------------------------------------------------------------------------------------------------------------------------------------------------

__openerp.py

# -*- coding: utf-8 -*-
{
    "name" : "Automatical email on Project Creation",
    "version" : "1.0",
    "author" : "Author name",
    "description": """
        Sends automatic when projects created
    """,
    "website" : "Author website name",
    "category" : "",
    'depends': ['base' ,'project'],
    "data" : ['email_template_project_auto.xml',],
    'js': [], 
    'css': [

    ],
    'qweb': [
    ],
    "active": False,
    "installable": True,

}

------------------------------------------------------------------------------------------------------------------------------------------------------------

project.py

from osv import osv, fields

class project_project(osv.osv):
    _inherit = 'project.project'
    _columns = {}

    def create(self, cr, uid, vals, context=None):
        res = super(project_project, self).create(cr, uid, vals, context=context)
        if vals:
            template = self.pool.get('ir.model.data').get_object(cr, uid, 'project_auto_email', 'email_template_project_auto')
            mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, res , force_send=True)

        return res

project_project()

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

email_template_project_auto.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data noupdate="1">

        <!--Email template-->
        <record id="email_template_project_auto" model="email.template">
            <field name="name">Send auto email</field>
            <field name="email_from">${object.company_id and object.company_id.email or ''}</field>
            <field name="subject">New Customer created ${object.name}</field>
            <field name="email_to">${object.company_id and object.company_id.email or ''}</field>
            <field name="model_id" ref="project.model_project_project"/>
            <field name="auto_delete" eval="True"/>
            <field name="lang">${object.lang}</field>
            <field name="body_html"><![CDATA[
             
          the email content

Thank you!           
            ]]></field>
        </record>
  
  </data>
</openerp>

7
Avatar
Abbandona
Avatar
Roy Mathew
Risposta migliore

Change the following line into xml file

Your line is : <field name="model_id" ref="base.model_project_project"/>

Change it by : <field name="model_id" ref="project.model_project_project"/>

2
Avatar
Abbandona
Avatar
Med Said BARA
Risposta migliore

Why not using OpenChatter ?  By subscribing as many followers as you want.

https://www.dropbox.com/s/urgc666clpnn4jt/OpenChatter Project.png

 

 

If you want to do that by coding, hereafter a good  and simple example on how to send an automatic mail when a Task is created.

https://www.odoo.com/apps/7.0/send_mail_task/

You can try to adapt this example to your need (e.g send mail when Project is created or when a Customer is created)

Some helpful links:

https://doc.odoo.com/trunk/mail/mail_openchatter_howto/

https://github.com/vnc-biz/openerp-addons-bundle/blob/master-7.0/mail/doc/mail_openchatter_howto.rst

https://anybox.fr/blog/openerp-disable-autofollow-in-openchatter

https://doc.odoo.com/trunk/mail/mail_thread/

https://www.odoo.com/forum/help-1/question/what-is-the-track-proprerty-of-mail-thread-model-used-for-1704

1
Avatar
Abbandona
Avatar
Emipro Technologies Pvt. Ltd.
Risposta migliore

Hi Ahmed,

Just change the following line into xml file with my line.

Your line is : <field name="model_id" ref="base.model_project_project"/>

Change it by : <field name="model_id" ref="project.model_project_project"/>

1
Avatar
Abbandona
Avatar
Ahmed elbarbary
Autore Risposta migliore
0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
CHANGE THE STAGE
project modules
Avatar
0
ago 24
3258
help with the module all-in-one whatsapp integration-sale purchase account and crm odoo 10
modules module
Avatar
0
mag 20
3669
How to define the thousands separator BY CUSTOM MODULE? Risolto
modules module
Avatar
Avatar
Avatar
3
dic 19
6236
OpenERP 7.0 will not update modules list? Risolto
modules module
Avatar
Avatar
Avatar
Avatar
Avatar
6
dic 23
20884
How to import a field from an module to other?
modules module
Avatar
Avatar
1
mar 15
5165
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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