diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-18 13:42:09 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-18 13:42:09 +0700 |
| commit | 755e36e6fed87f787c2a0d31f4318a6eae97e55c (patch) | |
| tree | 29cb4d7f4f5f0a3b65d16628dc8a5470040a71a8 /indoteknik_api | |
| parent | dbbca494e13edce7ec6947b7bca6559b93c289f4 (diff) | |
<iman> add pengajuan tempo sales order id
Diffstat (limited to 'indoteknik_api')
| -rw-r--r-- | indoteknik_api/models/account_move.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_api/models/account_move.py b/indoteknik_api/models/account_move.py index 0855da2f..645c157a 100644 --- a/indoteknik_api/models/account_move.py +++ b/indoteknik_api/models/account_move.py @@ -7,6 +7,7 @@ class AccountMove(models.Model): def api_v1_single_response(self, account_move, context=False): sale_order = self.env['sale.order'].search([('name', '=', account_move.invoice_origin), ('state', '=', 'done')], limit=1) + sale_order_v2 = self.env['sale.order'].search([('name', '=', account_move.invoice_origin)],limit=1) amount_residual = account_move.amount_residual if sale_order.payment_status == 'settlement' or sale_order.payment_status == 'capture': amount_residual = 0 @@ -23,6 +24,7 @@ class AccountMove(models.Model): 'efaktur': True if account_move.efaktur_document else False, 'invoice_date_due': account_move.invoice_date_due.strftime('%d/%m/%Y') or '-', 'sales_order': account_move.invoice_origin, + 'sales_order_id': sale_order_v2.id, } if isinstance(object, datetime.date): data['invoice_date'] = account_move.invoice_date.strftime('%d/%m/%Y') |
