~vauxoo/ingelub/Ingelub

« back to all changes in this revision

Viewing changes to ing_due_report/report/ing_due_report.py

  • Committer: Humberto Arocha
  • Date: 2012-07-03 15:20:45 UTC
  • mfrom: (20.1.4 ingelub_due_report_hbto)
  • Revision ID: humbertoarocha@gmail.com-20120703152045-eu4tz0x2skko5biv

[FIX] Fecha y Estados Faltantes en parser del reporte

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
        mun_obj  = self.pool.get('account.wh.munici.line')
53
53
        for rp_brw in rp_brws:
54
54
            inv_ids = inv_obj.search(self.cr,self.uid,[('partner_id','=',rp_brw.id),
55
 
                        ('type','=','out_invoice'),('residual','!=',0)])
 
55
                        ('type','=','out_invoice'),('residual','!=',0),('state','not in',('cancel','draft'))])
56
56
            if not inv_ids:
57
57
                continue
58
58
            res[rp_brw.id]={
99
99
                payment_left = self._get_aml(pay_left_ids)
100
100
                payment = wh_vat + wh_islr + wh_muni + wh_src + debit_note + credit_note + payment_left
101
101
                residual = inv_brw.amount_total + payment
102
 
                date_due = mx.DateTime.strptime(inv_brw.date_due, '%Y-%m-%d')
 
102
                date_due = mx.DateTime.strptime(inv_brw.date_due or inv_brw.date_invoice, '%Y-%m-%d')
103
103
                today = mx.DateTime.now()
104
104
                due_days = (today - date_due).day
105
105
                res[rp_brw.id]['inv_ids'].append({