[FIX] account_facturx: gross price must be subtotal not unit price
Facturx expects line price to be subtotal, not unit price. Odoo parser is also dividing the gross price by quantity. So before this commit, importing PDF invoice rendered by Odoo, results in: unit price / quantity. The bug was introduced in odoo/odoo#53894 closes odoo/odoo#77527 X-original-commit: 3769a6cdda259a839f00267d99a57f2aa3d89aa1 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount
|
||||
t-att-currencyID="record.currency_id.name"
|
||||
t-esc="format_monetary(line.price_unit, record.currency_id)"/>
|
||||
t-esc="format_monetary(line.price_subtotal, record.currency_id)"/>
|
||||
|
||||
<!-- Discount. -->
|
||||
<ram:AppliedTradeAllowanceCharge t-if="line.discount">
|
||||
|
||||
@@ -82,7 +82,7 @@ class TestAccountEdiFacturx(AccountEdiTestCommon):
|
||||
</SpecifiedTradeProduct>
|
||||
<SpecifiedLineTradeAgreement>
|
||||
<GrossPriceProductTradePrice>
|
||||
<ChargeAmount currencyID="Gol">275.000</ChargeAmount>
|
||||
<ChargeAmount currencyID="Gol">1100.000</ChargeAmount>
|
||||
<AppliedTradeAllowanceCharge>
|
||||
<ChargeIndicator>
|
||||
<Indicator>true</Indicator>
|
||||
@@ -164,7 +164,7 @@ class TestAccountEdiFacturx(AccountEdiTestCommon):
|
||||
|
||||
applied_xpath = '''
|
||||
<xpath expr="//GrossPriceProductTradePrice/ChargeAmount" position="replace">
|
||||
<ChargeAmount currencyID="Gol">275.000</ChargeAmount>
|
||||
<ChargeAmount currencyID="Gol">1000.000</ChargeAmount>
|
||||
</xpath>
|
||||
<xpath expr="//SpecifiedLineTradeSettlement" position="replace">
|
||||
<SpecifiedLineTradeSettlement>
|
||||
|
||||
Reference in New Issue
Block a user