Accept Merge Request #1886: (feature/外协优化_1 -> develop)
Merge Request: Merge branch 'feature/外协优化' into feature/外协优化_1 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1886
This commit is contained in:
@@ -625,12 +625,12 @@ class StockPicking(models.Model):
|
||||
workorder = move_in.subcontract_workorder_id
|
||||
workorders = workorder.production_id.workorder_ids
|
||||
subcontract_workorders = workorders.filtered(lambda wo: wo.is_subcontract == True and wo.state!='cancel').sorted('sequence')
|
||||
if workorder == subcontract_workorders[-1]:
|
||||
self.env['stock.quant']._update_reserved_quantity(
|
||||
move_in.product_id, move_in.location_dest_id, move_in.product_uom_qty,
|
||||
lot_id=move_in.move_line_ids.lot_id,
|
||||
package_id=False, owner_id=False, strict=False
|
||||
)
|
||||
# if workorder == subcontract_workorders[-1]:
|
||||
# self.env['stock.quant']._update_reserved_quantity(
|
||||
# move_in.product_id, move_in.location_dest_id, move_in.product_uom_qty,
|
||||
# lot_id=move_in.move_line_ids.lot_id,
|
||||
# package_id=False, owner_id=False, strict=False
|
||||
# )
|
||||
workorder.button_finish()
|
||||
picking_type_out = self.env.ref('sf_manufacturing.outcontract_picking_out').id
|
||||
if res and self.picking_type_id.id == picking_type_out:
|
||||
|
||||
Reference in New Issue
Block a user