~argilsoft/+junk/mexico-localization-7.0

« back to all changes in this revision

Viewing changes to l10n_mx_facturae_base/invoice.py

  • Committer: Israel CA
  • Date: 2014-04-07 23:53:41 UTC
  • Revision ID: israel.cruz@hesatecnica.com-20140407235341-6592puv2nustzcbf
Bug fix - Cancelar Facturas...

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
            'in_invoice': False,
140
140
            'in_refund': False}
141
141
        for inv in self.browse(cr, uid, ids, context=context):
 
142
            print "inv.type: ", inv.type
142
143
            if inv_type_facturae.get(inv.type, False):
143
144
                ir_attach_facturae_mx_ids = ir_attach_facturae_mx_obj.search(
144
145
                    cr, uid, [('id_source', '=', inv.id), ('model_source', '=', self._name)], context=context)
152
153
                                    self.write(cr, uid, ids, {'date_invoice_cancel': time.strftime('%Y-%m-%d %H:%M:%S')})
153
154
                        else:
154
155
                            res = super(account_invoice, self).action_cancel(cr, uid, ids, context=context)
155
 
                else:
156
 
                    res = super(account_invoice, self).action_cancel(cr, uid, ids, context=context)
 
156
            else:
 
157
                print "Se va directo a cancelar la Factura"
 
158
                res = super(account_invoice, self).action_cancel(cr, uid, ids, context=context)
157
159
        return res
158
160
 
159
161
    def create_ir_attachment_facturae(self, cr, uid, ids, context=None):