Skip to content

Commit

Permalink
ignora liniile fara valoare
Browse files Browse the repository at this point in the history
  • Loading branch information
dhongu committed Aug 13, 2024
1 parent 54db0eb commit 0266da9
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions l10n_ro_intrastat_xml/wizard/intrastat_xml_declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,17 @@ def _get_lines(self, decl_datas, dispatchmode, decl):

for inv_line in invoice_lines:
invoice = inv_line.move_id

amount = inv_line.price_subtotal
amount = invoice.currency_id._convert(
from_amount=amount,
to_currency=company.currency_id,
company=company,
date=invoice.invoice_date,
)
if not amount:
continue

# Check type of transaction
if "intrastat_transaction_id" in invoice._fields:
if invoice.intrastat_transaction_id:
Expand Down Expand Up @@ -373,13 +384,7 @@ def _get_lines(self, decl_datas, dispatchmode, decl):
_('Product "%s" has no intrastat code, please configure it') % inv_line.product_id.display_name
)

amount = inv_line.price_subtotal
amount = invoice.currency_id._convert(
from_amount=amount,
to_currency=company.currency_id,
company=company,
date=invoice.invoice_date,
)


supply_units = inv_line.product_uom_id._compute_quantity(inv_line.quantity, inv_line.product_id.uom_id)
weight = (inv_line.product_id.weight or 0.0) * supply_units
Expand Down

0 comments on commit 0266da9

Please sign in to comment.