[FIX] l10n_eg_edi_eta: derive rate from first product line
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines).
This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line.
opw-5208724
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#237535
This PR targets 19.0 and is part of the forward-port chain. Further PRs will be created up to master.
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port
@akr-odoo @alialfie WARNING: the update of odoo/odoo#239946 to 94c4fb9cab676a9b1e00812662b0b38ebbc978d7 has caused a conflict in this pull request, data may have been lost.
stdout:
Auto-merging addons/l10n_eg_edi_eta/models/account_edi_format.py
Auto-merging addons/l10n_eg_edi_eta/models/account_move.py
CONFLICT (content): Merge conflict in addons/l10n_eg_edi_eta/models/account_move.py
Auto-merging addons/l10n_eg_edi_eta/tests/test_edi_json.py
@akr-odoo @alialfie WARNING: the latest change (337bfff6ed2b4d639a3a7eaeb392950605fa11c3) triggered a conflict when updating the next forward-port (odoo/odoo#239951), and has been ignored.
You will need to update this pull request differently, or fix the issue by hand on odoo/odoo#239951.
@akr-odoo @alialfie ci/l10n failed on this forward-port PR
@akr-odoo @alialfie ci/l10n failed on this forward-port PR
@akr-odoo @alialfie this forward port of odoo/odoo#237535 is awaiting action (not merged or closed).
