Skip to content
Snippets Groups Projects
Commit 3a6e84d6 authored by Mahamadasif Ansari's avatar Mahamadasif Ansari
Browse files

[FIX] account_edi_ubl_cii: prevent ZeroDivisionError log error

A float division by zero error is generated on the log, and nothing
is imported from the file when the user uploads an XML file like
https://drive.google.com/file/d/1_eZYfqMk2kLtPsEjv-13DRHnmoXkWYeE

.
This is because here in LineID 1, there is a value billed quantity is 0.0,
a charge amount is 0.0, and a total amount is 100.0. This is wrong;
the total amount is always 0.0 when the billed quantity is 0.0
(billed quantity * charge amount).

This commit solves the above issue by dividing a price subtotal
by one when the billed quantity is zero.

sentry-4157357719

closes odoo/odoo#121027

Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
parent b61d2ae5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment