Skip to content
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

Open
wants to merge 2 commits into
base: 10.0
Choose a base branch
from
Open

NCF compras #45

wants to merge 2 commits into from

Conversation

NB5055
Copy link
Contributor

@NB5055 NB5055 commented Oct 15, 2017

Correccion de validacion NCF compras

Correccion de validacion NCF compras
@gustavovalverde gustavovalverde self-assigned this Oct 15, 2017
Copy link
Collaborator

@gustavovalverde gustavovalverde left a 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:
Copy link
Collaborator

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:
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants