Commit de783233 by 夏超

[fix] 入库问题

parent 10f1ad2f
......@@ -95,3 +95,18 @@ class InheritRokeResultPutWarehouseWizard(models.TransientModel):
cur.close()
conn.close()
return super(InheritRokeResultPutWarehouseWizard, self).confirm()
def _default_get_line_vals(self, result):
"""
获取明细内容
:return:
"""
res = super(InheritRokeResultPutWarehouseWizard, self)._default_get_line_vals(result)
if self._context.get('active_model') != "roke.production.result":
return res
picking_type_id = self.env.ref("roke_mes_stock.stock_picking_type_production_in", False)
if hasattr(result, "location_id") and result.location_id:
result.write({"location_id": picking_type_id.src_location_id.id})
else:
res.update({"src_location_id": picking_type_id.src_location_id.id})
return res
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment