Skip to content

Commit

Permalink
Merge PR #3323 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 27, 2023
2 parents fde55f1 + 7d1691b commit 963ecbe
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions l10n_es_payment_order_confirming_aef/models/confirming_aef.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def _aef_errors(self):
% line.partner_id.name
)
# Num Factura
if line.move_line_id.ref and len(line.move_line_id.ref) > 15:
if len(line.move_line_id.move_id.ref or "") > 15:
validation_errors.append(
_(
"- La referencia de factura %s de proveedor no puede ocupar "
"más de 15 caracteres."
)
% line.move_line_id.ref
% line.move_line_id.move_id.ref
)
# Ciudad
if not line.partner_id.city:
Expand Down Expand Up @@ -239,11 +239,7 @@ def _aef_registro_06(self, line):
# 1 Valor fijo
text = "6"
# 2 - 21 Num factura
referencia_factura = (
str(line.move_line_id.move_id.name)
if line.move_line_id.move_id.name
else line.communication
)
referencia_factura = line.move_line_id.move_id.ref or line.communication
text += self._aef_convert_text(referencia_factura.replace("-", ""), 20, "left")
# 22 - 22 signo
signo_factura = "+" if line.amount_currency >= 0 else "-"
Expand Down

0 comments on commit 963ecbe

Please sign in to comment.