From cdd38f770a2b624b83e1e1fb072c2077db176aff Mon Sep 17 00:00:00 2001 From: Pratik Awasthi Date: Mon, 26 Sep 2022 05:55:40 +0000 Subject: [PATCH] [FIX] hr_expense: fix subtotal for journal items Steps: Create a expense with product having no cost and having the total amount directly added from expense sheet. then create an innvoice. Issue: While adding journal lines in hr expense the amount per unit was calculated as the total amount of product such as quantity into the price per unit inside the invoice. Cause: expense's total_amount was passed as price_unit instead of expense's unit_amount and due to that total amount was multiply by qty so wrong value was passed. Fix: If unit_amount of product is non-zero then pass the unit amoun for invoice or pass the total_amount if unit_amount does not exist. task-3000758 X-original-commit: d47ca52a2cb8eb7146094e7d172f41f6aa3621a2 Part-of: odoo/odoo#102768 --- addons/hr_expense/models/hr_expense.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_expense/models/hr_expense.py b/addons/hr_expense/models/hr_expense.py index 936701b79d3..50c0a136816 100644 --- a/addons/hr_expense/models/hr_expense.py +++ b/addons/hr_expense/models/hr_expense.py @@ -602,7 +602,7 @@ Or send your receipts at