Skip to content

Commit

Permalink
[IMP] l10n_uy_edi: pre process errors
Browse files Browse the repository at this point in the history
Show message error "Debe indicar un tipo de documento Uruguayo para poder facturar a este cliente" not only for e-factura document, but for all generated documents
"
  • Loading branch information
zaoral committed May 23, 2023
1 parent f991459 commit 6cd5982
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions l10n_uy_edi/models/l10n_uy_cfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ def _l10n_uy_get_cfe_receptor(self):
if receptor_required:
if not self.partner_id.l10n_latam_identification_type_id and not self.partner_id.l10n_latam_identification_type_id.l10n_uy_dgi_code:
raise UserError(_('The partner of the CFE need to have a Uruguayan Identification Type'))
if tipo_doc == 0:
raise UserError(_('Debe indicar un tipo de documento Uruguayo para poder facturar a este cliente'))

if tipo_doc == 0:
raise UserError(_('Debe indicar un tipo de documento Uruguayo para poder facturar a este cliente'))

if cond_e_fact_expo or cond_e_fact or (cond_e_ticket and receptor_required):
if not all([self.partner_id.street, self.partner_id.city, self.partner_id.state_id, self.partner_id.country_id, self.partner_id.vat]):
Expand Down

0 comments on commit 6cd5982

Please sign in to comment.