From ae6bcc5ca57d1edb2ec35cb04dbf9d1bdd01c8d7 Mon Sep 17 00:00:00 2001 From: Harshad Modi Date: Wed, 24 Sep 2008 17:16:07 +0530 Subject: [PATCH] on account_followup , delay expressed in levels are agains maturity date, not date. If maturity date is null, checked against date. bzr revid: hmo@tinyerp.com-20080924114607-7jn3bupbyh3743fw --- addons/account_followup/wizard/wizard_followup_print.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py index 545108f578f..a1022881358 100644 --- a/addons/account_followup/wizard/wizard_followup_print.py +++ b/addons/account_followup/wizard/wizard_followup_print.py @@ -251,14 +251,17 @@ class followup_all_print(wizard.interface): partner_list = [] to_update = {} - for partner_id, followup_line_id, date, id in move_lines: + for partner_id, followup_line_id, date_maturity,date, id in move_lines: if not partner_id: continue if partner_id in partner_list: to_update[str(id)] = fups[followup_line_id][1] if followup_line_id not in fups: continue - if date <= fups[followup_line_id][0].strftime('%Y-%m-%d'): + if date_maturity and date_maturity <= fups[followup_line_id][0].strftime('%Y-%m-%d'): + partner_list.append(partner_id) + to_update[str(id)] = fups[followup_line_id][1] + elif date and date <= fups[followup_line_id][0].strftime('%Y-%m-%d'): partner_list.append(partner_id) to_update[str(id)] = fups[followup_line_id][1] return {'partner_ids': partner_list, 'to_update': to_update}