From 404db39b3f80c538e202e1fe728fd043cecaf7c8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 5 Apr 2023 09:48:18 +0700 Subject: update api controller user and api model sale_order --- indoteknik_api/models/sale_order.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indoteknik_api/models') diff --git a/indoteknik_api/models/sale_order.py b/indoteknik_api/models/sale_order.py index 76532d20..2b6bef37 100644 --- a/indoteknik_api/models/sale_order.py +++ b/indoteknik_api/models/sale_order.py @@ -58,9 +58,10 @@ class SaleOrder(models.Model): for line in sale_order.order_line: product = self.env['product.product'].api_single_response(line.product_id) product['price'] = { - 'price': line.price_unit, + 'price': line.price_unit / 1.11, 'discount_percentage': line.discount, - 'price_discount': line.price_unit - (line.price_unit * (line.discount/100)) + 'price_discount': line.price_reduce_taxexcl, + 'subtotal': line.price_subtotal } product['quantity'] = line.product_uom_qty data_with_detail['products'].append(product) -- cgit v1.2.3