diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 16:35:49 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 16:35:49 +0700 |
| commit | 60d0b36cf33785c0cf6bea1d10b344dcdb37695a (patch) | |
| tree | 7dfaea6f94277c94a3308cfecf0d4dcee015ab41 /indoteknik_api/models/account_move.py | |
| parent | d9f3333103ff3190c4c6ccf2365ccbb41cdb16b4 (diff) | |
fix API get transaction, invoice
Diffstat (limited to 'indoteknik_api/models/account_move.py')
| -rw-r--r-- | indoteknik_api/models/account_move.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_api/models/account_move.py b/indoteknik_api/models/account_move.py index 9bbe8c94..54e06f84 100644 --- a/indoteknik_api/models/account_move.py +++ b/indoteknik_api/models/account_move.py @@ -37,6 +37,11 @@ class AccountMove(models.Model): } for line in account_move.invoice_line_ids: product = self.env['product.product'].api_single_response(line.product_id) + product['price'] = { + 'price': line.price_unit, + 'discount_percentage': line.discount, + 'price_discount': line.price_unit - (line.price_unit * (line.discount/100)) + } product['quantity'] = line.quantity data_with_detail['products'].append(product) data.update(data_with_detail) |
