Merge branch 'feature/修改表面工艺外协位置' into develop

This commit is contained in:
jinling.yang
2024-05-18 10:27:50 +08:00
3 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,7 @@
<record id="stock_location_locations_virtual_outcontract" model="stock.location">
<field name="name">外协</field>
<field name="location_id" ref="stock.stock_location_locations_virtual"/>
<field name="usage">supplier</field>
<field name="usage">internal</field>
<field name="barcode">VL-OC</field>
<field name="active">true</field>
<field name="company_id" ref="base.main_company"/>

View File

@@ -911,6 +911,7 @@ class ResMrpWorkOrder(models.Model):
})
tem_date_planned_finished = record.date_planned_finished
super().button_finish()
# 表面工艺工单完成不走该修改
if record.routing_type != '表面工艺':
record.write({
'date_planned_finished': tem_date_planned_finished # 保持原值

View File

@@ -552,8 +552,8 @@ class StockPicking(models.Model):
[('workorder_id', '=', sorted_workorders.id), ('production_id', '=', item.id)])
if not outcontract_stock_move:
new_picking = True
location_id = self.env.ref(
'sf_manufacturing.stock_location_locations_virtual_outcontract').id,
location_id = self.env['stock.location'].search(
[('barcode', 'ilike', 'VL-SPOC')]).id,
location_dest_id = self.env['stock.location'].search(
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id,
outcontract_picking_type_in = self.env.ref(