Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-opw-578236-port-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578236-port-mma/+merge/132518
Hello,
This MP contains fix for below issues
- 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.
Code is forward port from 6.1
Thanks
Mayur
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-578236-port-mma/+merge/132518
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-opw-578236-port-mma.
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2012-10-02 10:29:15 +0000
+++ account_followup/wizard/account_followup_print.py 2012-11-01 11:28:33 +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,
@@ -221,10 +221,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)
@@ -294,7 +297,7 @@
summary = msg_unsent + line + msg_sent
context.update({'summary': summary})
else:
- context.update({'summary': '\n\n\nEmail 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