-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NCF compras #45
base: 10.0
Are you sure you want to change the base?
NCF compras #45
Conversation
Correccion de validacion NCF compras
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verificar los comentarios, tambuén validar si tal vez sería más conveniente hacer una condición como esta:
res = self.env["marcos.api.tools"].invoice_ncf_validation(rec)
if res is not True:
raise exceptions.ValidationError(res[2])
elif rec.type in ( | ||
"in_invoice", "in_refund") and rec.journal_id.purchase_type == "normal" and rec.partner_id.vat: | ||
ncf_validation_result = self.env["marcos.api.tools"].invoice_ncf_validation(self) | ||
if ncf_validation_result != True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mejorar sintaxis de la condición pythonif ncf_validation_result is not True
@@ -234,7 +234,11 @@ def action_invoice_open(self): | |||
elif rec.type in ( | |||
"in_invoice", "in_refund") and rec.journal_id.purchase_type == "normal" and not rec.partner_id.vat: | |||
msg = u"El proveedor no tiene RNC y es requerido para este tipo de compra." | |||
|
|||
elif rec.type in ( | |||
"in_invoice", "in_refund") and rec.journal_id.purchase_type == "normal" and rec.partner_id.vat: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No solo son los normales, también los informales
Correccion de validacion NCF compras