Skip to content

NCF compras - #45

Open
NB5055 wants to merge 2 commits into
eneldoserrata:10.0from
NB5055:patch-1
Open

NB5055 wants to merge 2 commits into
eneldoserrata:10.0from
NB5055:patch-1

Conversation

@NB5055

@NB5055 NB5055 commented Oct 15, 2017

Copy link
Copy Markdown
Contributor

Correccion de validacion NCF compras

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

@gustavovalverde gustavovalverde left a comment

Copy link
Copy Markdown
Collaborator

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])

Comment thread ncf_manager/models/account_invoice.py Outdated
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
Copy Markdown
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

Comment thread ncf_manager/models/account_invoice.py Outdated
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
Copy Markdown
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

This branch has not been deployed

No deployments
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