Ravi Gohil (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-578236-rgo into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578236-rgo/+merge/120348

Hello,

This MP contains fix for below issues related to account_followup,

-> If we haven't configured smtp's '--email_from' parameter and sends email 
using 'Send followups' wizard, the email created in queue will not have any 
value for 'From', so the e-mail wont be sent. After adding an sender e-mail 
address the e-mail gets send,

-> The message appears when you try to send email without option 'Send email 
confirmation' ticket, is not translated,

-> The e-mail subject in wizard is not translated.

Kindly review the fix.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-578236-rgo/+merge/120348
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-578236-rgo.
=== modified file 'account_followup/i18n/account_followup.pot'
--- account_followup/i18n/account_followup.pot	2012-02-08 01:08:30 +0000
+++ account_followup/i18n/account_followup.pot	2012-08-20 09:01:25 +0000
@@ -332,6 +332,21 @@
 msgstr ""
 
 #. module: account_followup
+#: code:addons/account_followup/wizard/account_followup_print.py:229
+#, python-format
+msgid "E-Mail not available for user: %s"
+msgstr ""
+
+#. module: account_followup
+#: code:addons/account_followup/wizard/account_followup_print.py:301
+#, python-format
+msgid "\n"
+"\n"
+"\n"
+"E-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard."
+msgstr ""
+
+#. module: account_followup
 #: help:account.followup.print,date:0
 msgid "This field allow you to select a forecast date to plan your follow-ups"
 msgstr ""

=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py	2012-02-13 16:03:19 +0000
+++ account_followup/wizard/account_followup_print.py	2012-08-20 09:01:25 +0000
@@ -141,7 +141,7 @@
 
     _defaults = {
          'email_body': _get_msg,
-         'email_subject': _('Invoices Reminder'),
+         'email_subject': lambda self, cr, uid, context: _('Invoices Reminder'),
          'partner_lang': True,
          'partner_ids': _get_partners,
          'summary': _get_summary,
@@ -223,10 +223,13 @@
         partners = [stat_by_partner_line / 10000 for stat_by_partner_line in stat_by_partner_line_ids]
         model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context)
         resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
-        if data.email_conf:
+        data_user = user_obj.browse(cr, uid, uid, context=context)
+        src = tools.config.options['email_from'] or data_user.user_email
+        if not src:
+            context.update({'summary': _("E-Mail not available for user: %s") % data_user.name})
+        elif data.email_conf:
             msg_sent = ''
             msg_unsent = ''
-            data_user = user_obj.browse(cr, uid, uid, context=context)
             for partner in self.pool.get('res.partner').browse(cr, uid, partners, context=context):
                 ids_lines = move_obj.search(cr,uid,[('partner_id','=',partner.id),('reconcile_id','=',False),('account_id.type','in',['receivable']),('company_id','=',context.get('company_id', False))])
                 data_lines = move_obj.browse(cr, uid, ids_lines, context=context)
@@ -242,7 +245,6 @@
                         if (not dest) and adr.type=='default':
                             if adr.email:
                                 dest = [adr.email]
-                src = tools.config.options['email_from']
                 if not data.partner_lang:
                     body = data.email_body
                 else:
@@ -298,7 +300,7 @@
                 summary = msg_unsent + line + msg_sent
             context.update({'summary': summary})
         else:
-            context.update({'summary': '\n\n\nE-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard.'})
+            context.update({'summary': _("\n\n\nE-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard.")})
 
         return {
             'name': _('Followup Summary'),

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to