mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[FIX] stock_picking_report_valued: division_by_zero when unrelated sale order
This commit is contained in:
committed by
Sergio Teruel
parent
ceb5634c8c
commit
9aacdc89d3
@@ -8,7 +8,7 @@
|
||||
{
|
||||
"name": "Valued Picking Report",
|
||||
"summary": "Adding Valued Picking on Delivery Slip report",
|
||||
"version": "11.0.1.0.2",
|
||||
"version": "11.0.1.0.3",
|
||||
"author": "Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://www.tecnativa.com",
|
||||
|
||||
@@ -63,9 +63,11 @@ class StockMoveLine(models.Model):
|
||||
records...).
|
||||
"""
|
||||
for line in self:
|
||||
price_unit = (
|
||||
line.sale_line.price_subtotal / line.sale_line.product_uom_qty
|
||||
if line.sale_line.product_uom_qty else 0.0)
|
||||
taxes = line.sale_tax_id.compute_all(
|
||||
price_unit=line.sale_line.price_subtotal / (
|
||||
line.sale_line.product_uom_qty or 0.0),
|
||||
price_unit=price_unit,
|
||||
currency=line.currency_id,
|
||||
quantity=line.qty_done or line.product_qty,
|
||||
product=line.product_id,
|
||||
|
||||
Reference in New Issue
Block a user