Merge lp:~openerp-dev/openobject-addons/6.1-opw-578235-rgo into lp:openobject-addons/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-578235-rgo
Merge into: lp:openobject-addons/6.1
Diff against target: 66 lines (+29/-2)
2 files modified
account_followup/i18n/account_followup.pot (+6/-0)
account_followup/wizard/account_followup_print.py (+23/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-578235-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+120331@code.launchpad.net

Description of the change

Hello,

Reminding mail sent to partners for account followup do not have .pdf in as attachment, This MP contains fix for this issue. Kindly review the fix.

Thanks.

To post a comment you must log in.
6953. By Quentin (OpenERP) <email address hidden>

[FIX] account_voucher: supplier payment, accounting entry generation

6954. By Xavier ALT

[MERGE] OPW 576484: account: fix invoice residual, avoid adding multiple times residual for same partial reconcile

6955. By Xavier ALT

[MERGE] OPW 577014: email_template: for not force mass_mail in mail.compose.message wizard, if user is working on a single resource

6956. By Xavier ALT

[MERGE] OPW 576491: edi + email_template: correctly generate edi_web_view_url when sending email from mail.compose.message wizard

 * edi: improve generation/usage of edi_web_url_view for template rendering

   - wrap edi_web_url_view generation to _edi_get_object_web_url_view() method.
   - automatically add 'edi_web_url_view' to all email.template rendering context

   - introduce LazyEdiWebUrlViewGetter class, to allow resolving record wihtin
     template rendering context - only when necessary. This to prevent generating
     unrequested edi_web_url_view links

 * mail & email_template: allow to modify render_template context

   - add _prepare_render_template_context() method to allow modifying context
     before rendering template.

6957. By Quentin (OpenERP) <email address hidden>

[MERGE] fixes in account_voucher

6958. By Xavier ALT

[FIX] OPW 577963: ir_attachment: speed up ir.attachment search for large databases

6959. By Olivier Dony (Odoo)

[FIX] document: complete previous fix, restore sort order after filtering

6960. By Xavier ALT

[MERGE] BUG 1039664: edi: fix wrong cursor when generating edi_web_url_view

  regression from revid: <email address hidden>

6961. By Xavier ALT

[MERGE] OPW 577140: stock: use float_compare() to check if initial and provided quantity equals - based on UoM rounding

6962. By Olivier Dony (Odoo)

[MERGE] OPW 576610: always reuse printed invoice instead of regenerating

Backport of trunk fix r.7215
revid:<email address hidden>

6963. By Xavier ALT

[MERGE] OPW 267641: crm/crm_action_rule: mail action are not sent to both action and current watchers

6964. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6965. By Quentin (OpenERP) <email address hidden>

[MERGE] staging branch with fixes

6966. By Xavier ALT

[MERGE] OPW 574251: account_voucher: voucher on bank statement, have to use period and date from bank statement / bank statement line - not today

6967. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6968. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6969. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6970. By Ravi Gohil (OpenERP)

[FIX] account_followup: mail sent using followup wizard do not have pdf attached: (Maintenance Case : 578235)

Unmerged revisions

6970. By Ravi Gohil (OpenERP)

[FIX] account_followup: mail sent using followup wizard do not have pdf attached: (Maintenance Case : 578235)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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-31 13:04:28 +0000
@@ -332,6 +332,12 @@
332msgstr ""332msgstr ""
333333
334#. module: account_followup334#. module: account_followup
335#: code:addons/account_followup/wizard/account_followup_print.py:303
336#, python-format
337msgid "Followup-"
338msgstr ""
339
340#. module: account_followup
335#: help:account.followup.print,date:0341#: help:account.followup.print,date:0
336msgid "This field allow you to select a forecast date to plan your follow-ups"342msgid "This field allow you to select a forecast date to plan your follow-ups"
337msgstr ""343msgstr ""
338344
=== 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-31 13:04:28 +0000
@@ -25,6 +25,8 @@
25import tools25import tools
26from osv import fields, osv26from osv import fields, osv
27from tools.translate import _27from tools.translate import _
28import base64
29import netsvc
2830
29class account_followup_print(osv.osv_memory):31class account_followup_print(osv.osv_memory):
30 _name = 'account.followup.print'32 _name = 'account.followup.print'
@@ -227,7 +229,16 @@
227 msg_sent = ''229 msg_sent = ''
228 msg_unsent = ''230 msg_unsent = ''
229 data_user = user_obj.browse(cr, uid, uid, context=context)231 data_user = user_obj.browse(cr, uid, uid, context=context)
230 for partner in self.pool.get('res.partner').browse(cr, uid, partners, context=context):232 line_ids = line_obj.search(cr,uid,[('partner_id', 'in', partners)])
233 partners = []
234 dict_lines = {}
235 for line in line_obj.browse(cr, uid, line_ids, context=context):
236 if line.partner_id.id not in dict_lines.keys():
237 partners.append(line.partner_id)
238 dict_lines[line.partner_id.id] = [line]
239 else:
240 dict_lines[line.partner_id.id].append(line)
241 for partner in partners:
231 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))])242 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))])
232 data_lines = move_obj.browse(cr, uid, ids_lines, context=context)243 data_lines = move_obj.browse(cr, uid, ids_lines, context=context)
233 total_amt = 0.0244 total_amt = 0.0
@@ -282,7 +293,17 @@
282 msg = ''293 msg = ''
283 if dest:294 if dest:
284 try:295 try:
285 mail_message.schedule_with_attach(cr, uid, src, dest, sub, body, context=context)296 company_id = context.get('company_id')
297 data_dict = {'form':{'partner_ids':[partner.id * 10000 + company_id], 'date': time.strftime('%Y-%m-%d'), 'followup_id': context.get('followup_id')}}
298 ctx = context.copy()
299 ctx['lang'] = partner.lang or ctx.get('lang')
300 datax,frmt = netsvc.LocalService('report.account_followup.followup.print').create(cr, uid, [], data_dict, ctx)
301 params = {
302 'datas': base64.encodestring( datax ),
303 'datas_fname': _('Followup-') + str(partner.name) + '.' + frmt,
304 }
305 attach = dict(map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), [params]))
306 mail_message.schedule_with_attach(cr, uid, src, dest, sub, body, attachments=attach, context=context)
286 msg_sent += partner.name + '\n'307 msg_sent += partner.name + '\n'
287 except Exception, e:308 except Exception, e:
288 raise osv.except_osv('Error !', e )309 raise osv.except_osv('Error !', e )