diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2025-05-23 09:42:03 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2025-05-23 09:42:03 +0700 |
| commit | d27999cacee59a115ae3c6c46542c2e20cfe176b (patch) | |
| tree | a6fa743e29d1864c8c638031c56c700b51032de2 | |
| parent | f66710c029d678ecf580808b5aee3821c90d9598 (diff) | |
bf cant create invoice dp cause of custom method action assign stock picking
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 0071bb1a..0fcb7ca1 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1012,15 +1012,15 @@ class StockPicking(models.Model): self.sale_id.date_doc_kirim = self.date_doc_kirim def action_assign(self): - if self.sale_id.hold_outgoing and self.location_id.id == 57 and self.location_dest_id.id == 60: - print(1) - else: - res = super(StockPicking, self).action_assign() + res = super(StockPicking, self).action_assign() + for move in self: + # if not move.sale_id.hold_outgoing and move.location_id.id != 57 and move.location_dest_id.id != 60: + # TODO cant skip hold outgoing cause of not singleton method current_time = datetime.datetime.utcnow() - self.real_shipping_id = self.sale_id.real_shipping_id - self.date_availability = current_time + move.real_shipping_id = move.sale_id.real_shipping_id + move.date_availability = current_time # self.check_state_reserve() - return res + return res def ask_approval(self): if self.env.user.is_accounting: |
