diff options
| author | Indoteknik . <it@fixcomart.co.id> | 2025-06-24 09:43:30 +0700 |
|---|---|---|
| committer | Indoteknik . <it@fixcomart.co.id> | 2025-06-24 09:43:30 +0700 |
| commit | edbad751e9f370285baa221ca26a683d202e8541 (patch) | |
| tree | d4bfd495a72a59ba01131e97970ab48246239af3 /indoteknik_custom/models/stock_picking.py | |
| parent | 05283d3ec0c49449e2ed7b14b2d824739db19174 (diff) | |
| parent | a6aa700b5016c98d579a52125e3686acc615ce88 (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 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index eabef37c..27046063 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1309,7 +1309,6 @@ class StockPicking(models.Model): self.final_seq = 0 self.set_picking_code_out() self.send_koli_to_so() - if (self.state_reserve == 'done' and self.picking_type_code == 'internal' and 'BU/PICK/' in self.name and self.linked_manual_bu_out): if not self.linked_manual_bu_out.date_reserved: @@ -1346,7 +1345,18 @@ class StockPicking(models.Model): 'target': 'new', } self.send_mail_bills() + if 'BU/PUT' in self.name: + self.automatic_reserve_product() return res + + def automatic_reserve_product(self): + if self.state == 'done': + po = self.env['purchase.order'].search([ + ('name', '=', self.group_id.name) + ]) + + for line in po.order_sales_match_line: + line.bu_pick.action_assign() def check_invoice_date(self): for picking in self: |
