[FIX] account_followup: print followup button on res.partner now call the overdue report from account_followup module instead of the basic one

bzr revid: qdp-launchpad@openerp.com-20121228160704-z56vb5an236emygg
This commit is contained in:
Quentin (OpenERP) 2012-12-28 17:07:04 +01:00
parent b0e1872b3e
commit 8606185a23
1 changed files with 6 additions and 7 deletions

View 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):
'''