Accept Merge Request #1022: (feature/修改表面工艺外协位置 -> develop)

Merge Request: 修改表面工艺外协位置

Created By: @杨金灵
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @杨金灵
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1022
This commit is contained in:
杨金灵
2024-05-18 10:27:18 +08:00
committed by Coding
4 changed files with 28 additions and 26 deletions

View File

@@ -74,25 +74,25 @@
<field name="active">True</field> <field name="active">True</field>
<field name="sequence">11</field> <field name="sequence">11</field>
</record> </record>
<!-- <record id="rule_surface_technology_in" model="stock.rule">--> <!-- <record id="rule_surface_technology_in" model="stock.rule">-->
<!-- <field name="name">外协出库单</field>--> <!-- <field name="name">外协出库单</field>-->
<!-- <field name="route_id" ref="route_surface_technology_outsourcing"/>--> <!-- <field name="route_id" ref="route_surface_technology_outsourcing"/>-->
<!--&lt;!&ndash; <field name="action">push</field>&ndash;&gt;--> <!--&lt;!&ndash; <field name="action">push</field>&ndash;&gt;-->
<!-- <field name="pick_type_id" ref="outcontract_picking_in"/>--> <!-- <field name="pick_type_id" ref="outcontract_picking_in"/>-->
<!-- &lt;!&ndash; <field name="location_src_id" search="[('barcode','=','WH-PREPRODUCTION')]"/>&ndash;&gt;--> <!-- &lt;!&ndash; <field name="location_src_id" search="[('barcode','=','WH-PREPRODUCTION')]"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <field name="location_dest_id" ref="stock_location_locations_virtual_outcontract"/>&ndash;&gt;--> <!-- &lt;!&ndash; <field name="location_dest_id" ref="stock_location_locations_virtual_outcontract"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <field name="active">True</field>&ndash;&gt;--> <!-- &lt;!&ndash; <field name="active">True</field>&ndash;&gt;-->
<!-- &lt;!&ndash; <field name="sequence">11</field>&ndash;&gt;--> <!-- &lt;!&ndash; <field name="sequence">11</field>&ndash;&gt;-->
<!-- </record>--> <!-- </record>-->
<!-- <record id="rule_surface_technology_in" model="stock.rule">--> <!-- <record id="rule_surface_technology_in" model="stock.rule">-->
<!-- <field name="name">外协入库单</field>--> <!-- <field name="name">外协入库单</field>-->
<!-- <field name="route_id" ref="route_surface_technology_outsourcing"/>--> <!-- <field name="route_id" ref="route_surface_technology_outsourcing"/>-->
<!-- <field name="action">pull</field>--> <!-- <field name="action">pull</field>-->
<!-- <field name="pick_type_id" ref="outcontract_picking_out"/>--> <!-- <field name="pick_type_id" ref="outcontract_picking_out"/>-->
<!-- <field name="location_src_id" ref="stock_location_locations_virtual_outcontract"/>--> <!-- <field name="location_src_id" ref="stock_location_locations_virtual_outcontract"/>-->
<!-- <field name="location_dest_id" search="[('barcode','=','WH-PREPRODUCTION')]"/>--> <!-- <field name="location_dest_id" search="[('barcode','=','WH-PREPRODUCTION')]"/>-->
<!-- <field name="active">True</field>--> <!-- <field name="active">True</field>-->
<!-- <field name="sequence">11</field>--> <!-- <field name="sequence">11</field>-->
<!-- </record>--> <!-- </record>-->
</data> </data>
</odoo> </odoo>

View File

@@ -911,6 +911,8 @@ class ResMrpWorkOrder(models.Model):
}) })
tem_date_planned_finished = record.date_planned_finished tem_date_planned_finished = record.date_planned_finished
super().button_finish() super().button_finish()
# 表面工艺工单完成不走该修改
if record.routing_type != '表面工艺':
record.write({ record.write({
'date_planned_finished': tem_date_planned_finished # 保持原值 '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)]) [('workorder_id', '=', sorted_workorders.id), ('production_id', '=', item.id)])
if not outcontract_stock_move: if not outcontract_stock_move:
new_picking = True new_picking = True
location_id = self.env.ref( location_id = self.env['stock.location'].search(
'sf_manufacturing.stock_location_locations_virtual_outcontract').id, [('barcode', 'ilike', 'VL-SPOC')]).id,
location_dest_id = self.env['stock.location'].search( location_dest_id = self.env['stock.location'].search(
[('barcode', 'ilike', 'WH-PREPRODUCTION')]).id, [('barcode', 'ilike', 'WH-PREPRODUCTION')]).id,
outcontract_picking_type_in = self.env.ref( outcontract_picking_type_in = self.env.ref(

View File

@@ -112,7 +112,7 @@ access_stock_inventory_warning,stock.inventory.warning,stock.model_stock_invento
access_stock_inventory_adjustment_name,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_base.group_plan_dispatch,1,0,0,0 access_stock_inventory_adjustment_name,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_base.group_plan_dispatch,1,0,0,0
access_mrp_production_group_purchase,mrp_production_group_purchase,mrp.model_mrp_production,sf_base.group_purchase,1,0,0,0 access_mrp_production_group_purchase,mrp_production_group_purchase,mrp.model_mrp_production,sf_base.group_purchase,1,0,0,0
access_mrp_production_group_purchase_director,mrp_production_group_purchase_director,mrp.model_mrp_production,sf_base.group_purchase_director,1,0,0,0 access_mrp_production_group_purchase_director,mrp_production_group_purchase_director,mrp.model_mrp_production,sf_base.group_purchase_director,1,0,1,0
access_mrp_workorder_group_purchase,mrp_workorder_group_purchase,mrp.model_mrp_workorder,sf_base.group_purchase,1,0,0,0 access_mrp_workorder_group_purchase,mrp_workorder_group_purchase,mrp.model_mrp_workorder,sf_base.group_purchase,1,0,0,0
access_mrp_workorder_group_purchase_director,mrp_workorder_group_purchase_director,mrp.model_mrp_workorder,sf_base.group_purchase_director,1,0,0,0 access_mrp_workorder_group_purchase_director,mrp_workorder_group_purchase_director,mrp.model_mrp_workorder,sf_base.group_purchase_director,1,0,0,0
access_mrp_unbuild_group_purchase,mrp_unbuild_group_purchase,mrp.model_mrp_unbuild,sf_base.group_purchase,1,0,0,0 access_mrp_unbuild_group_purchase,mrp_unbuild_group_purchase,mrp.model_mrp_unbuild,sf_base.group_purchase,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
112 access_mrp_unbuild_group_purchase mrp_unbuild_group_purchase mrp.model_mrp_unbuild sf_base.group_purchase 1 0 0 0
113 access_mrp_unbuild_group_purchase_director mrp_unbuild_group_purchase_director mrp.model_mrp_unbuild sf_base.group_purchase_director 1 0 0 0
114 access_stock_scrap_group_purchase stock_scrap_group_purchase stock.model_stock_scrap sf_base.group_purchase 1 0 0 0
115 access_stock_scrap_group_purchase_director stock_scrap_group_purchase_director stock.model_stock_scrap sf_base.group_purchase_director 1 0 0 0
116 access_stock_lot_group_purchase stock_lot_group_purchase stock.model_stock_lot sf_base.group_purchase 1 0 0 0
117 access_stock_lot_group_purchase_director stock_lot_group_purchase_director stock.model_stock_lot sf_base.group_purchase_director 1 0 0 0
118 access_stock_lot_group_quality stock_lot_group_quality stock.model_stock_lot sf_base.group_quality 1 0 0 0