summaryrefslogtreecommitdiff
path: root/indoteknik_api/models
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-04-05 09:48:18 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-04-05 09:48:18 +0700
commit404db39b3f80c538e202e1fe728fd043cecaf7c8 (patch)
tree1f5a8db6f609e73a32923a2998db6cb28617cacd /indoteknik_api/models
parent51a0a2319186bf8560f36d305f8e7ee573d956ab (diff)
update api controller user and api model sale_order
Diffstat (limited to 'indoteknik_api/models')
-rw-r--r--indoteknik_api/models/sale_order.py5
1 files changed, 3 insertions, 2 deletions
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)