[MERGE] forward port of branch 7.0 up to b4d3701
[odoo/odoo.git] / addons / account_followup / wizard / account_followup_print.py
index 52593cc..e60d30d 100644 (file)
@@ -50,9 +50,9 @@ class account_followup_stat_by_partner(osv.osv):
         # to send him follow-ups separately . An assumption that the number of companies will not
         # reach 10 000 records is made, what should be enough for a time.
         cr.execute("""
-            create or replace view account_followup_stat_by_partner as (
+            create view account_followup_stat_by_partner as (
                 SELECT
-                    l.partner_id * 10000 + l.company_id as id,
+                    l.partner_id * 10000::bigint + l.company_id as id,
                     l.partner_id AS partner_id,
                     min(l.date) AS date_move,
                     max(l.date) AS date_move_last,
@@ -67,12 +67,10 @@ class account_followup_stat_by_partner(osv.osv):
                     a.active AND
                     a.type = 'receivable' AND
                     l.reconcile_id is NULL AND
-                    l.partner_id IS NOT NULL AND
-                    (l.blocked = False)
+                    l.partner_id IS NOT NULL
                     GROUP BY
                     l.partner_id, l.company_id
-            )""") #Blocked is to take into account litigation
-account_followup_stat_by_partner()
+            )""")
 
 
 class account_followup_sending_results(osv.osv_memory):
@@ -106,7 +104,6 @@ class account_followup_sending_results(osv.osv_memory):
         'description':_get_description,
     }
  
-account_followup_sending_results()
 
 
 class account_followup_print(osv.osv_memory):
@@ -315,6 +312,5 @@ class account_followup_print(osv.osv_memory):
                 to_update[str(id)]= {'level': fups[followup_line_id][1], 'partner_id': stat_line_id}
         return {'partner_ids': partner_list, 'to_update': to_update}
 
-account_followup_print()
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: