[FIX] account_followup: print followup button on res.partner now call the overdue...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 28 Dec 2012 16:07:04 +0000 (17:07 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 28 Dec 2012 16:07:04 +0000 (17:07 +0100)
bzr revid: qdp-launchpad@openerp.com-20121228160704-z56vb5an236emygg

addons/account_followup/account_followup.py

index 6587fbf..9590777 100644 (file)
@@ -281,18 +281,17 @@ class res_partner(osv.osv):
     def do_button_print(self, cr, uid, ids, context=None):
         assert(len(ids) == 1)
         self.message_post(cr, uid, [ids[0]], body=_('Printed overdue payments report'), context=context)
+        data['partner_ids'] = [ids[0] * 10000 + company_id]
         datas = {
-             'ids': ids,
-             'model': 'res.partner',
-             'form': self.read(cr, uid, ids[0], context=context)
+             'ids': [],
+             'model': 'account_followup.followup',
+             'form': data
         }
         return {
             'type': 'ir.actions.report.xml',
-            'report_name': 'account.overdue',
+            'report_name': 'account_followup.followup.print',
             'datas': datas,
-            'nodestroy' : True
-        }
-
+            }
 
     def _get_amounts_and_date(self, cr, uid, ids, name, arg, context=None):
         '''