diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-09 13:59:43 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-08-09 13:59:43 +0700 |
| commit | 48159b92cfa466ff7df454aa3c860b79c7e18467 (patch) | |
| tree | 8f50df9b54dadac53d40d2f487de1b89c24ca561 /indoteknik_custom/models/stock_picking.py | |
| parent | b6ae7b2c9f1c564f3bf2a471f4871fda745d215d (diff) | |
| parent | 06b661f2fa9e07e4b3d1d2b5c7aa9f16f057a3a3 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 46bb6cee..82f81642 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1059,10 +1059,13 @@ class StockPicking(models.Model): return self.sale_id.date_doc_kirim = self.date_doc_kirim - from odoo import fields - def action_assign(self): - pickings_to_assign = self.filtered(lambda p: not (p.sale_id and p.sale_id.hold_outgoing)) + if self.env.context.get('default_picking_type_id'): + pickings_to_assign = self.filtered( + lambda p: not (p.sale_id and p.sale_id.hold_outgoing) + ) + else: + pickings_to_assign = self res = super(StockPicking, pickings_to_assign).action_assign() |
