From 62088f63cc7904c07fa3e95d7dd487fb9cd4926c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 19 May 2025 15:54:45 +0700 Subject: bf minus delivered qty --- indoteknik_custom/models/stock_picking.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indoteknik_custom/models/stock_picking.py') diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 128efee6..0071bb1a 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1013,13 +1013,14 @@ class StockPicking(models.Model): def action_assign(self): if self.sale_id.hold_outgoing and self.location_id.id == 57 and self.location_dest_id.id == 60: - raise UserError("SO on hold") - res = super(StockPicking, self).action_assign() - # current_time = datetime.datetime.utcnow() - # self.real_shipping_id = self.sale_id.real_shipping_id - # self.date_availability = current_time + print(1) + else: + res = super(StockPicking, self).action_assign() + current_time = datetime.datetime.utcnow() + self.real_shipping_id = self.sale_id.real_shipping_id + self.date_availability = current_time # self.check_state_reserve() - return res + return res def ask_approval(self): if self.env.user.is_accounting: -- cgit v1.2.3