Commit 102bad65 authored by Cuauhtémoc Díaz Minor's avatar Cuauhtémoc Díaz Minor Committed by agb80

refactor(account.invoice): se elimina signal de la cancelacion de la factura

Closes #25
parent 6d491fa7
Pipeline #5545 passed with stage
in 49 seconds
......@@ -297,10 +297,10 @@ class AccountInvoice(models.Model):
)
cfdi.action_validate()
@signals.invoice_cancel.connect
def action_cancel(self, cr, uid, ids, context=None):
context = dict(context or {})
for account_invoice in self.browse(cr, uid, ids, context=context):
@api.multi
def action_cancel(self,):
res = super(AccountInvoice, self).action_cancel()
for account_invoice in self:
# Maybe a third test could review state, but since
# button cancel only is displayed in open state, we decided to not
# used third test
......@@ -309,6 +309,7 @@ class AccountInvoice(models.Model):
account_invoice.cfdi_folio_fiscal
):
account_invoice.cfdi_id.action_cancel()
return res
@staticmethod
def _sanitize(text):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment