Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how can i send automatic email when create a new customer ?

By
Ahmed elbarbary
on 8/11/14, 2:54 AM 4,011 views

hi, i am a new openerp developer and i need to send automatic email with python code when create a new customer, any one have a sample for this or any one can help me. i don't even know the steps, thnank

Hi ahmed, In res_partner class override the create method and override send_email method mail_template class.

Ahmed elbarbary
on 8/11/14, 4:41 AM

hi ali could you tell me where i find res_partner class or could u explain this in more details please

Ahmed elbarbary
on 8/11/14, 4:51 AM
hi ali could you tell me where i find res_partner class or could u explain this in more details please


On 11 August 2014 01:33, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

Hi ahmed, In res_partner class override the create method and override send_email method mail_template class.

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo

Ahmed elbarbary
on 8/11/14, 4:51 AM
hi ali could you tell me where i find res_partner class or could u explain this in more details please


On 11 August 2014 01:51, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
hi ali could you tell me where i find res_partner class or could u explain this in more details please


On 11 August 2014 01:33, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

Hi ahmed, In res_partner class override the create method and override send_email method mail_template class.

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo


Ahmed elbarbary
on 8/11/14, 5:46 AM

Hi, To whom you want to send a email to customer or to the company..?

Ali Ravani
on 8/11/14, 6:12 AM

to the combany

Ahmed elbarbary
on 8/11/14, 6:18 AM

ok thanks alot but this error appears to me ??!!

when creating anew customer

 

Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper new_id = old_create(cr, uid, vals, context=context) File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 8, in create res = super(self, res_partner).create(cr, uid, vals, context=None) TypeError: must be type, not res.partner



On 11 August 2014 03:12, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

Hi, To whom you want to send a email to customer or to the company..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo

Ahmed elbarbary
on 8/11/14, 6:40 AM
i apply your change but it still appear error with new modification
Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper
    new_id = old_create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 8, in create
    res = super(res_partner, self).create(cr, uid, vals, context=context)
TypeError: must be type, not res.partner


On 11 August 2014 03:40, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:

ok thanks alot but this error appears to me ??!!

when creating anew customer

 

Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper new_id = old_create(cr, uid, vals, context=context) File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 8, in create res = super(self, res_partner).create(cr, uid, vals, context=None) TypeError: must be type, not res.partner



On 11 August 2014 03:12, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

Hi, To whom you want to send a email to customer or to the company..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo


Ahmed elbarbary
on 8/11/14, 7:02 AM
1
Ali Ravani
On 8/11/14, 6:21 AM

Hello,
first create 1 folder customer_auto_email and put it in addons folder, in this folder add __init__.py, __openerp__.py, res_partner.py, email_template_customer_auto.xml

1) __init__.py
import res_partner

2) __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'],
    "init_xml" : [],
    "demo_xml" : [],
    "update_xml" : [
                        'email_template_customer_auto.xml',
                          
    ],
    'js': [], 
    'css': [

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

}

3) 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()

 

4) email_template_customer_auto.xml

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

        <!--Email template-->
        <record id="email_template_auto_customer" 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[
                """ 
                Write here a body of email using HTML tag.....
                """            
            ]]></field>
        </record>
  
  </data>
</openerp>

what i think send email to company from company email address is not  logical.

but you can also send email from email id of user who logged in OpenERP, its sound good then.

Thanks & Regards,
Ali.

0
Ahmed elbarbary
On 8/11/14, 6:33 AM

ok i go it. it was an error in xml code replace 

<record id="email_template_auto_customer" model="email.template"> 

with

<record id="email_template_customer_auto" model="email.template">

so the files will be 

1) __init__.py
import res_partner

2) __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'],
    "datal" : [ 'email_template_customer_auto.xml',],
     'js': [], 
    'css': [

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

}

3) 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()

 

4) 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[
                """ 
                Write here a body of email using HTML tag.....
                """            
            ]]></field>
        </record>
  
  </data>
</openerp>

i have made changes in super line of res_partner.py file, review it

Ali Ravani
on 8/11/14, 6:38 AM

i apply your change but it still appear error with new modification Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper new_id = old_create(cr, uid, vals, context=context) File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 8, in create res = super(res_partner, self).create(cr, uid, vals, context=context) TypeError: must be type, not res.partner

Ahmed elbarbary
on 8/11/14, 7:01 AM

i apply your change but it still appear error with new modification Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper new_id = old_create(cr, uid, vals, context=context) File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 8, in create res = super(res_partner, self).create(cr, uid, vals, context=context) TypeError: must be type, not res.partner

Ahmed elbarbary
on 8/11/14, 7:01 AM

did you configure out going mail server..?

Ali Ravani
on 8/11/14, 7:13 AM
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo

Ahmed elbarbary
on 8/11/14, 7:14 AM
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo


Ahmed elbarbary
on 8/11/14, 7:17 AM

yes

Ahmed elbarbary
on 8/11/14, 7:18 AM
do you have any idea about that error


On 11 August 2014 04:17, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo



Ahmed elbarbary
on 8/11/14, 8:04 AM

do youhave any idea about this or do you know any coding method to custom any module to send automatic mail when any action happened ?

Ahmed elbarbary
on 8/11/14, 8:25 AM
do youhave any idea about this or do you know any coding method to custom any module to send automatic mail when any action happened ?


On 11 August 2014 05:04, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do you have any idea about that error


On 11 August 2014 04:17, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo




Ahmed elbarbary
on 8/12/14, 1:48 AM
hi ali,

now a new error appears

OpenERP Server Error

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper
    new_id = old_create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 10, in create
    template = self.pool.get('ir.model.data').get_object(cr, uid, 'customer_auto_email', 'email_template_customer_auto')
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 884, in get_object
    res_model, res_id = self.get_object_reference(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 876, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 869, in _get_id
    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto



On 11 August 2014 22:48, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do youhave any idea about this or do you know any coding method to custom any module to send automatic mail when any action happened ?


On 11 August 2014 05:04, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do you have any idea about that error


On 11 August 2014 04:17, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo





Ahmed elbarbary
on 8/12/14, 3:21 AM

hia ail, now a new error appears could you help me OpenERP Server Error Client Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1128, in call_kw return self._call_kw(req, model, method, args, kwargs) File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw return getattr(req.session.model(model), method)(*args, **kwargs) File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, *params) File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, **kw or {}) File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, *args, **kwargs) File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper new_id = old_create(cr, uid, vals, context=context) File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 10, in create template = self.pool.get('ir.model.data').get_object(cr, uid, 'customer_auto_email', 'email_template_customer_auto') File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 884, in get_object res_model, res_id = self.get_object_reference(cr, uid, module, xml_id) File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 876, in get_object_reference data_id = self._get_id(cr, uid, module, xml_id) File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup r = self.lookup(self2, cr, *args) File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup value = d[key] = self.method(self2, cr, *args) File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 869, in _get_id raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id)) ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto

Ahmed elbarbary
on 8/12/14, 3:22 AM

ok i edit my answer with the coorect files thank you

Ahmed elbarbary
on 8/12/14, 7:41 AM
ok nice it works now 



On 12 August 2014 00:21, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
hi ali,

now a new error appears

OpenERP Server Error

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper
    new_id = old_create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 10, in create
    template = self.pool.get('ir.model.data').get_object(cr, uid, 'customer_auto_email', 'email_template_customer_auto')
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 884, in get_object
    res_model, res_id = self.get_object_reference(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 876, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 869, in _get_id
    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto



On 11 August 2014 22:48, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do youhave any idea about this or do you know any coding method to custom any module to send automatic mail when any action happened ?


On 11 August 2014 05:04, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do you have any idea about that error


On 11 August 2014 04:17, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo






Ahmed elbarbary
on 8/12/14, 10:31 AM
sorry but i have another last question , what i do if i need an email sent to the company also but if a new project not customer created?


On 12 August 2014 07:31, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
ok nice it works now 



On 12 August 2014 00:21, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
hi ali,

now a new error appears

OpenERP Server Error

Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1128, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/openerp/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/server/openerp/addons/base_action_rule/base_action_rule.py", line 144, in wrapper
    new_id = old_create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/addons/auto email/res_partner.py", line 10, in create
    template = self.pool.get('ir.model.data').get_object(cr, uid, 'customer_auto_email', 'email_template_customer_auto')
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 884, in get_object
    res_model, res_id = self.get_object_reference(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 876, in get_object_reference
    data_id = self._get_id(cr, uid, module, xml_id)
  File "/opt/openerp/server/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/opt/openerp/server/openerp/tools/cache.py", line 46, in lookup
    value = d[key] = self.method(self2, cr, *args)
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 869, in _get_id
    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: customer_auto_email.email_template_customer_auto



On 11 August 2014 22:48, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do youhave any idea about this or do you know any coding method to custom any module to send automatic mail when any action happened ?


On 11 August 2014 05:04, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
do you have any idea about that error


On 11 August 2014 04:17, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:14, AHMED ELBARBARY <aelbarbary152@gmail.com> wrote:
yes


On 11 August 2014 04:13, Ali Ravani <ali.ravani14@mail.odoo.com> wrote:

did you configure out going mail server..?

--
Ali Ravani Sent by Odoo Inc. using Odoo. Access your messages and documents in Odoo







Ahmed elbarbary
on 8/12/14, 10:32 AM
Ahmed elbarbary
on 12/30/14, 8:53 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 8/11/14, 2:54 AM
Seen: 4011 times
Last updated: 3/16/15, 8:10 AM