From 4c2325d4a983ced3a25a9d53d7613a9186360b17 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 16 Oct 2024 13:15:11 +0700 Subject: update ready stock picup quantity --- indoteknik_custom/models/sale_order_line.py | 1 + indoteknik_custom/models/website_user_cart.py | 2 ++ 2 files changed, 3 insertions(+) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py index 5e01067a..964b3ff2 100644 --- a/indoteknik_custom/models/sale_order_line.py +++ b/indoteknik_custom/models/sale_order_line.py @@ -31,6 +31,7 @@ class SaleOrderLine(models.Model): vendor_subtotal = fields.Float(string='Vendor Subtotal', compute="_compute_vendor_subtotal") amount_voucher_disc = fields.Float(string='Voucher Discount') qty_reserved = fields.Float(string='Qty Reserved', compute='_compute_qty_reserved') + product_available_quantity = fields.Float(string='Qty pickup by user',) reserved_from = fields.Char(string='Reserved From', copy=False) item_percent_margin_without_deduction = fields.Float('%Margin', compute='_compute_item_margin_without_deduction') weight = fields.Float(string='Weight') diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py index 26e217cb..9dadc40b 100644 --- a/indoteknik_custom/models/website_user_cart.py +++ b/indoteknik_custom/models/website_user_cart.py @@ -65,9 +65,11 @@ class WebsiteUserCart(models.Model): if stock_quant: res['is_in_bu'] = True res['on_hand_qty'] = sum(stock_quant.mapped('quantity')) + res['available_quantity'] = stock_quant.available_quantity else: res['is_in_bu'] = False res['on_hand_qty'] = 0 + res['available_quantity'] = 0 flashsales = self.product_id._get_active_flash_sale() res['has_flashsale'] = True if len(flashsales) > 0 else False -- cgit v1.2.3 From 0c6f047cab337f7463ef359bbb744a2be7145267 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 12 Nov 2024 08:34:52 +0700 Subject: change domain sale order in requisition --- indoteknik_custom/models/requisition.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 8ebdd31b..d53fc796 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -47,8 +47,7 @@ class Requisition(models.Model): notification = fields.Char(string='Notification') is_po = fields.Boolean(string='Is PO') requisition_match = fields.One2many('requisition.purchase.match', 'requisition_id', string='Matches', auto_join=True) - sale_order_id = fields.Many2one('sale.order', string='SO', help='harus diisi nomor SO yang ingin digenerate', - domain="[('state', '=', 'sale')]") + sale_order_id = fields.Many2one('sale.order', string='SO', help='harus diisi nomor SO yang ingin digenerate') sales_approve = fields.Boolean(string='Sales Approve', tracking=3, copy=False) merchandise_approve = fields.Boolean(string='Merchandise Approve', tracking=3, copy=False) -- cgit v1.2.3