From cb0879d8d1e15869e8c9157aec81e43cc89e4370 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Thu, 15 Jan 2015 17:21:46 +0100 Subject: [PATCH 1/7] Add module base_export_email --- base_export_email/__init__.py | 30 ++++++ base_export_email/__openerp__.py | 54 +++++++++++ base_export_email/ir_actions.py | 157 +++++++++++++++++++++++++++++++ base_export_email/ir_actions.xml | 43 +++++++++ 4 files changed, 284 insertions(+) create mode 100755 base_export_email/__init__.py create mode 100755 base_export_email/__openerp__.py create mode 100644 base_export_email/ir_actions.py create mode 100644 base_export_email/ir_actions.xml diff --git a/base_export_email/__init__.py b/base_export_email/__init__.py new file mode 100755 index 000000000..47054a027 --- /dev/null +++ b/base_export_email/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Authors: Laetitia Gangloff +# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import ir_actions diff --git a/base_export_email/__openerp__.py b/base_export_email/__openerp__.py new file mode 100755 index 000000000..29916c7e4 --- /dev/null +++ b/base_export_email/__openerp__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Authors: Laetitia Gangloff +# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + "name": "Base export email addon", + "version": "0.1", + "author": "ACSONE SA/NV", + "category": "Other", + "website": "http://www.acsone.eu", + "depends": ['email_template', + ], + "description": """ + +Base export email addon +========================= + +- Add server action type to send by email a data export + +""", + "data": ["ir_actions.xml"], + "demo": [], + "test": [], + "active": False, + "license": "AGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py new file mode 100644 index 000000000..cd76267bc --- /dev/null +++ b/base_export_email/ir_actions.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Authors: Laetitia Gangloff +# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields +from openerp.tools.translate import _ +from openerp.addons.web.controllers import main +from openerp.tools.safe_eval import safe_eval +import time +import base64 + + +class actions_server(orm.Model): + _inherit = "ir.actions.server" + + def __init__(self, pool, cr): + super(actions_server, self).__init__(pool, cr) + # add state 'export_email' + self._columns['state'].selection.append(('export_email', + _('Export data by email'))) + return + + _columns = {'model': fields.related('model_id', 'model', + type="char", size=256, string='Model'), + 'filter_id': fields.many2one( + 'ir.filters', string='Filter', ondelete='restrict'), + 'email_template_id': fields.many2one( + 'email.template', string='Template', ondelete='restrict'), + 'saved_export_id': fields.many2one( + 'ir.exports', string='Saved export', ondelete='restrict'), + 'fields_to_export': fields.text( + 'Fields to export', + help="The list of fields to export. \ + The format is ['name', 'seller_ids/product_name']") + } + + _defaults = {'fields_to_export': '[]'} + + def onchange_model_id(self, cr, uid, ids, model_id, context=None): + """ + Used to set correct domain on filter_id and saved_export_id + """ + data = {'model': False, + 'filter_id': False, + 'email_template_id': False, + 'saved_export_id': False} + if model_id: + model = self.pool['ir.model'].browse(cr, uid, model_id, + context=context) + data.update({'model': model.model}) + return {'value': data} + + def _search_data(self, cr, uid, action, context=None): + """ + search data to export + """ + obj_pool = self.pool[action.model] + domain = action.filter_id and safe_eval( + action.filter_id.domain, {'time': time}) or [] + ctx = action.filter_id and safe_eval( + action.filter_id.context) or context + return obj_pool.search(cr, uid, domain, + offset=0, limit=False, order=False, + context=ctx) + + def _export_data(self, cr, uid, obj_ids, action, context=None): + """ + export data + """ + obj_pool = self.pool[action.model] + export_fields = [] + if action.fields_to_export: + export_fields = safe_eval(action.fields_to_export) + if action.saved_export_id: + # retrieve fields of the selected list + export_fields.extend( + [efl.name for efl in + action.saved_export_id.export_fields]) + return export_fields, obj_pool.export_data( + cr, uid, obj_ids, export_fields, + context=context).get('datas', []) + + def _send_email(self, cr, uid, action, export_fields, export_data, + context=None): + """ + Prepare a message with the exported data to send with the + template of the configuration + """ + mail_compose = self.pool['mail.compose.message'] + values = mail_compose.onchange_template_id( + cr, uid, 0, action.email_template_id, 'comment', + action.model, 0, context=context)['value'] + values['partner_ids'] = [ + (4, partner_id) for partner_id in values.pop('partner_ids', + []) + ] + export = main.CSVExport() + filename = export.filename(action.model) + content = export.from_data(export_fields, export_data) + if isinstance(content, unicode): + content = content.encode('utf-8') + data_attach = { + 'name': filename, + 'datas': base64.b64encode(str(content)), + 'datas_fname': filename, + 'description': filename, + } + + values['attachment_ids'] = [(0, 0, data_attach)] + compose_id = mail_compose.create( + cr, uid, values, context=context) + return mail_compose.send_mail(cr, uid, [compose_id], context=context) + + def run(self, cr, uid, ids, context=None): + """ + If the state of an action is export_email, + export data related to the configuration and send the result by email + """ + for action in self.browse(cr, uid, ids, context): + if action.state == 'export_email': + ids.remove(action.id) + # search data to export + obj_ids = self._search_data(cr, uid, action, context=context) + # export data + export_fields, export_data = self._export_data( + cr, uid, obj_ids, action, context=context) + # Prepare a message with the exported data to send with the + # template of the configuration + self._send_email( + cr, uid, action, export_fields, export_data, + context=context) + return super(actions_server, self).run(cr, uid, ids, context=context) diff --git a/base_export_email/ir_actions.xml b/base_export_email/ir_actions.xml new file mode 100644 index 000000000..274808982 --- /dev/null +++ b/base_export_email/ir_actions.xml @@ -0,0 +1,43 @@ + + + + + Server Action (base_export_email) + ir.actions.server + + + + onchange_model_id(model_id, context) + + + + + + {'required': [('state', '!=', 'export_email'), + ('state','!=','dummy'), + ('state','!=','sms'), + ('state','!=','code'), + ('state','!=','loop'), + ('state','!=','trigger'), + ('state','!=','object_copy'), + ('state','!=','client_action'), + ('state','!=','email'), + ('state','!=','sms'), + ('state','!=','other')]} + + + + + + + + + + + + + + + From 3999f373086184a9a4adf6b212032a59e24ecd28 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Thu, 15 Jan 2015 18:37:51 +0100 Subject: [PATCH 2/7] update licence. update documentation. add export_data. clean docstring --- base_export_email/__init__.py | 8 -------- base_export_email/__openerp__.py | 19 ++++++++++--------- base_export_email/ir_actions.py | 27 ++++++++++----------------- base_export_email/ir_actions.xml | 1 + 4 files changed, 21 insertions(+), 34 deletions(-) diff --git a/base_export_email/__init__.py b/base_export_email/__init__.py index 47054a027..9d55d5bba 100755 --- a/base_export_email/__init__.py +++ b/base_export_email/__init__.py @@ -3,14 +3,6 @@ # # Authors: Laetitia Gangloff # Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) -# All Rights Reserved -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsibility of assessing all potential -# consequences resulting from its eventual inadequacies and bugs. -# End users who are looking for a ready-to-use solution with commercial -# guarantees and support are strongly advised to contact a Free Software -# Service Company. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/base_export_email/__openerp__.py b/base_export_email/__openerp__.py index 29916c7e4..5222a2be8 100755 --- a/base_export_email/__openerp__.py +++ b/base_export_email/__openerp__.py @@ -3,14 +3,6 @@ # # Authors: Laetitia Gangloff # Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) -# All Rights Reserved -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsibility of assessing all potential -# consequences resulting from its eventual inadequacies and bugs. -# End users who are looking for a ready-to-use solution with commercial -# guarantees and support are strongly advised to contact a Free Software -# Service Company. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -40,7 +32,16 @@ Base export email addon ========================= -- Add server action type to send by email a data export +Add server action type to send by email a data export +For this new action type you need to fill the following fields : +- Filter : it defines the filter to use on the data. +- Template : it is the mail template to send the email. +- Saved export : it is a saved export list. +- Fields to export : it is the list of field to export. It can be used alone + or to complete the saved export list. + +Example of use : in a cron for a periodic export of some data + to see the evolution. """, "data": ["ir_actions.xml"], diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py index cd76267bc..ab3652ecc 100644 --- a/base_export_email/ir_actions.py +++ b/base_export_email/ir_actions.py @@ -3,14 +3,6 @@ # # Authors: Laetitia Gangloff # Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) -# All Rights Reserved -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsibility of assessing all potential -# consequences resulting from its eventual inadequacies and bugs. -# End users who are looking for a ready-to-use solution with commercial -# guarantees and support are strongly advised to contact a Free Software -# Service Company. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -56,10 +48,14 @@ class actions_server(orm.Model): 'fields_to_export': fields.text( 'Fields to export', help="The list of fields to export. \ - The format is ['name', 'seller_ids/product_name']") + The format is ['name', 'seller_ids/product_name']"), + 'export_format': fields.selection([('csv', 'CSV'), + ('xls', 'Excel')], + 'Export Formats'), } - _defaults = {'fields_to_export': '[]'} + _defaults = {'fields_to_export': '[]', + 'export_format': 'csv'} def onchange_model_id(self, cr, uid, ids, model_id, context=None): """ @@ -76,9 +72,6 @@ class actions_server(orm.Model): return {'value': data} def _search_data(self, cr, uid, action, context=None): - """ - search data to export - """ obj_pool = self.pool[action.model] domain = action.filter_id and safe_eval( action.filter_id.domain, {'time': time}) or [] @@ -89,9 +82,6 @@ class actions_server(orm.Model): context=ctx) def _export_data(self, cr, uid, obj_ids, action, context=None): - """ - export data - """ obj_pool = self.pool[action.model] export_fields = [] if action.fields_to_export: @@ -119,7 +109,10 @@ class actions_server(orm.Model): (4, partner_id) for partner_id in values.pop('partner_ids', []) ] - export = main.CSVExport() + if action.export_format == 'csv': + export = main.CSVExport() + else: + export = main.ExcelExport() filename = export.filename(action.model) content = export.from_data(export_fields, export_data) if isinstance(content, unicode): diff --git a/base_export_email/ir_actions.xml b/base_export_email/ir_actions.xml index 274808982..c8622d2e9 100644 --- a/base_export_email/ir_actions.xml +++ b/base_export_email/ir_actions.xml @@ -28,6 +28,7 @@ + From 2bbba688a771207b43dd6401e81a7e0481ff9640 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Mon, 19 Jan 2015 11:17:54 +0100 Subject: [PATCH 3/7] base_export_email : add email_template sample --- base_export_email/__openerp__.py | 3 ++- base_export_email/ir_actions.py | 18 +++++++++++++++--- base_export_email/ir_actions_data.xml | 12 ++++++++++++ .../{ir_actions.xml => ir_actions_view.xml} | 2 +- 4 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 base_export_email/ir_actions_data.xml rename base_export_email/{ir_actions.xml => ir_actions_view.xml} (96%) diff --git a/base_export_email/__openerp__.py b/base_export_email/__openerp__.py index 5222a2be8..b2738e1f0 100755 --- a/base_export_email/__openerp__.py +++ b/base_export_email/__openerp__.py @@ -44,7 +44,8 @@ Example of use : in a cron for a periodic export of some data to see the evolution. """, - "data": ["ir_actions.xml"], + "data": ["ir_actions_view.xml", + "ir_actions_data.xml"], "demo": [], "test": [], "active": False, diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py index ab3652ecc..d94f11665 100644 --- a/base_export_email/ir_actions.py +++ b/base_export_email/ir_actions.py @@ -54,8 +54,21 @@ class actions_server(orm.Model): 'Export Formats'), } + def get_email_template(self, cr, uid, context=None): + email_template_id = 0 + try: + model_data_obj = self.pool['ir.model.data'] + email_template_id = model_data_obj.get_object_reference( + cr, uid, 'base_export_email', 'export_data_email_template')[1] + except ValueError: + pass + return email_template_id + _defaults = {'fields_to_export': '[]', - 'export_format': 'csv'} + 'export_format': 'csv', + 'email_template_id': lambda self, cr, uid, c: + self.get_email_template(cr, uid, context=c), + } def onchange_model_id(self, cr, uid, ids, model_id, context=None): """ @@ -63,7 +76,6 @@ class actions_server(orm.Model): """ data = {'model': False, 'filter_id': False, - 'email_template_id': False, 'saved_export_id': False} if model_id: model = self.pool['ir.model'].browse(cr, uid, model_id, @@ -104,7 +116,7 @@ class actions_server(orm.Model): mail_compose = self.pool['mail.compose.message'] values = mail_compose.onchange_template_id( cr, uid, 0, action.email_template_id, 'comment', - action.model, 0, context=context)['value'] + 'ir.actions.server', action.id, context=context)['value'] values['partner_ids'] = [ (4, partner_id) for partner_id in values.pop('partner_ids', []) diff --git a/base_export_email/ir_actions_data.xml b/base_export_email/ir_actions_data.xml new file mode 100644 index 000000000..8c02c5f01 --- /dev/null +++ b/base_export_email/ir_actions_data.xml @@ -0,0 +1,12 @@ + + + + + Export data sample + Export data for ${object.model} + + + ]]> + + + diff --git a/base_export_email/ir_actions.xml b/base_export_email/ir_actions_view.xml similarity index 96% rename from base_export_email/ir_actions.xml rename to base_export_email/ir_actions_view.xml index c8622d2e9..fc76ac8ea 100644 --- a/base_export_email/ir_actions.xml +++ b/base_export_email/ir_actions_view.xml @@ -31,7 +31,7 @@ + domain="[('model_id.model', '=', 'ir.actions.server')]"/> From 44c18c63e9d31d1d7aed4bc5dd139054e07d7f05 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Mon, 19 Jan 2015 18:01:32 +0100 Subject: [PATCH 4/7] base_export_email : do not remove id from the list. --- base_export_email/ir_actions.py | 45 +++++++++++++++++---------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py index d94f11665..731526cd7 100644 --- a/base_export_email/ir_actions.py +++ b/base_export_email/ir_actions.py @@ -37,24 +37,25 @@ class actions_server(orm.Model): _('Export data by email'))) return - _columns = {'model': fields.related('model_id', 'model', - type="char", size=256, string='Model'), - 'filter_id': fields.many2one( - 'ir.filters', string='Filter', ondelete='restrict'), - 'email_template_id': fields.many2one( - 'email.template', string='Template', ondelete='restrict'), - 'saved_export_id': fields.many2one( - 'ir.exports', string='Saved export', ondelete='restrict'), - 'fields_to_export': fields.text( - 'Fields to export', - help="The list of fields to export. \ + _columns = { + 'model': fields.related('model_id', 'model', + type="char", size=256, string='Model'), + 'filter_id': fields.many2one( + 'ir.filters', string='Filter', ondelete='restrict'), + 'email_template_id': fields.many2one( + 'email.template', string='Template', ondelete='restrict'), + 'saved_export_id': fields.many2one( + 'ir.exports', string='Saved export', ondelete='restrict'), + 'fields_to_export': fields.text( + 'Fields to export', + help="The list of fields to export. \ The format is ['name', 'seller_ids/product_name']"), - 'export_format': fields.selection([('csv', 'CSV'), - ('xls', 'Excel')], - 'Export Formats'), - } + 'export_format': fields.selection([('csv', 'CSV'), + ('xls', 'Excel')], + 'Export Formats'), + } - def get_email_template(self, cr, uid, context=None): + def _get_email_template(self, cr, uid, context=None): email_template_id = 0 try: model_data_obj = self.pool['ir.model.data'] @@ -64,11 +65,12 @@ class actions_server(orm.Model): pass return email_template_id - _defaults = {'fields_to_export': '[]', - 'export_format': 'csv', - 'email_template_id': lambda self, cr, uid, c: - self.get_email_template(cr, uid, context=c), - } + _defaults = { + 'fields_to_export': '[]', + 'export_format': 'csv', + 'email_template_id': lambda self, cr, uid, c: + self._get_email_template(cr, uid, context=c), + } def onchange_model_id(self, cr, uid, ids, model_id, context=None): """ @@ -148,7 +150,6 @@ class actions_server(orm.Model): """ for action in self.browse(cr, uid, ids, context): if action.state == 'export_email': - ids.remove(action.id) # search data to export obj_ids = self._search_data(cr, uid, action, context=context) # export data From e3f1ffba10670850f30e152b21987ab795c14c26 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Wed, 25 Feb 2015 17:39:34 +0100 Subject: [PATCH 5/7] add more evaluation element in globals_dict --- base_export_email/ir_actions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py index 731526cd7..683b24de1 100644 --- a/base_export_email/ir_actions.py +++ b/base_export_email/ir_actions.py @@ -24,6 +24,8 @@ from openerp.tools.translate import _ from openerp.addons.web.controllers import main from openerp.tools.safe_eval import safe_eval import time +from dateutil.relativedelta import relativedelta +from datetime import datetime import base64 @@ -88,7 +90,10 @@ class actions_server(orm.Model): def _search_data(self, cr, uid, action, context=None): obj_pool = self.pool[action.model] domain = action.filter_id and safe_eval( - action.filter_id.domain, {'time': time}) or [] + action.filter_id.domain, {'time': time, + 'datetime': datetime, + 'relativedelta': relativedelta, + }) or [] ctx = action.filter_id and safe_eval( action.filter_id.context) or context return obj_pool.search(cr, uid, domain, From 63333521650d1d637ad0961e71572db8674e5313 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Wed, 8 Jul 2015 14:32:34 +0200 Subject: [PATCH 6/7] base_export_email : Split send email to be able to use easily in other module --- base_export_email/ir_actions.py | 39 +++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/base_export_email/ir_actions.py b/base_export_email/ir_actions.py index 683b24de1..8f6831ee3 100644 --- a/base_export_email/ir_actions.py +++ b/base_export_email/ir_actions.py @@ -35,8 +35,9 @@ class actions_server(orm.Model): def __init__(self, pool, cr): super(actions_server, self).__init__(pool, cr) # add state 'export_email' - self._columns['state'].selection.append(('export_email', - _('Export data by email'))) + new_state = ('export_email', _('Export data by email')) + if new_state not in self._columns['state'].selection: + self._columns['state'].selection.append(new_state) return _columns = { @@ -114,7 +115,23 @@ class actions_server(orm.Model): cr, uid, obj_ids, export_fields, context=context).get('datas', []) - def _send_email(self, cr, uid, action, export_fields, export_data, + def _send_data_email(self, cr, uid, action, export_fields, export_data, + context=None): + """ + Prepare the exported data to send with the template + of the configuration + """ + if action.export_format == 'csv': + export = main.CSVExport() + else: + export = main.ExcelExport() + filename = export.filename(action.model) + content = export.from_data(export_fields, export_data) + + return self._send_email(cr, uid, action, filename, content, + context=context) + + def _send_email(self, cr, uid, action, filename, content, context=None): """ Prepare a message with the exported data to send with the @@ -128,17 +145,15 @@ class actions_server(orm.Model): (4, partner_id) for partner_id in values.pop('partner_ids', []) ] - if action.export_format == 'csv': - export = main.CSVExport() + if context and context.get('encoded_base_64'): + data = content else: - export = main.ExcelExport() - filename = export.filename(action.model) - content = export.from_data(export_fields, export_data) - if isinstance(content, unicode): - content = content.encode('utf-8') + if isinstance(content, unicode): + content = content.encode('utf-8') + data = base64.b64encode(str(content)) data_attach = { 'name': filename, - 'datas': base64.b64encode(str(content)), + 'datas': data, 'datas_fname': filename, 'description': filename, } @@ -162,7 +177,7 @@ class actions_server(orm.Model): cr, uid, obj_ids, action, context=context) # Prepare a message with the exported data to send with the # template of the configuration - self._send_email( + self._send_data_email( cr, uid, action, export_fields, export_data, context=context) return super(actions_server, self).run(cr, uid, ids, context=context) From 78b4e1e49e5fe29b607849f763486e2f500415e2 Mon Sep 17 00:00:00 2001 From: "Laetitia Gangloff (ACSONE)" Date: Mon, 3 Aug 2015 09:12:32 +0200 Subject: [PATCH 7/7] Add OCA in authors list --- base_export_email/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_export_email/__openerp__.py b/base_export_email/__openerp__.py index b2738e1f0..f3f6553e9 100755 --- a/base_export_email/__openerp__.py +++ b/base_export_email/__openerp__.py @@ -22,7 +22,7 @@ { "name": "Base export email addon", "version": "0.1", - "author": "ACSONE SA/NV", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "category": "Other", "website": "http://www.acsone.eu", "depends": ['email_template',