Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化客户
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
<record id="tool_assembly_in" model="ir.sequence">
|
||||
<field name="name">My Company 刀具组装入库</field>
|
||||
<field name="prefix">ZR/</field>
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_location_locations_virtual_outcontract" model="stock.location">
|
||||
<field name="name">外协</field>
|
||||
<field name="location_id" ref="stock.stock_location_locations_virtual"/>
|
||||
@@ -31,15 +37,6 @@
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
</record>
|
||||
|
||||
<!-- <record id="stock_location_locations_WH_tool_stock_area" model="stock.location">-->
|
||||
<!-- <field name="name">刀具存货区</field>-->
|
||||
<!-- <field name="location_id" ref="stock.stock_location_locations_virtual"/>-->
|
||||
<!-- <field name="usage">internal</field>-->
|
||||
<!-- <field name="barcode">WH-DJCHQ</field>-->
|
||||
<!-- <field name="active">true</field>-->
|
||||
<!-- <field name="company_id" ref="base.main_company"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="outcontract_picking_in" model="stock.picking.type">
|
||||
<field name="name">外协入库</field>
|
||||
<field name="code">internal</field>
|
||||
@@ -63,17 +60,5 @@
|
||||
search="[('barcode','=','WH-PREPRODUCTION')]"/>
|
||||
<field name="default_location_dest_id" ref="stock_location_locations_virtual_outcontract"/>
|
||||
</record>
|
||||
|
||||
<record id="after_assembly_picking_in" model="stock.picking.type">
|
||||
<field name="name">刀具组装入库</field>
|
||||
<field name="code">internal</field>
|
||||
<field name="active">true</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="sequence_code">ZR</field>
|
||||
<field name="default_location_src_id" ref="stock_location_locations_virtual_after_assembly"/>
|
||||
<field name="default_location_dest_id"
|
||||
search="[('barcode','=','WH-PREPRODUCTION')]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -105,6 +105,11 @@ class ResMrpWorkOrder(models.Model):
|
||||
picking_out_id = fields.Many2one('stock.picking', string='外协出库单')
|
||||
supplier_id = fields.Many2one('res.partner', string='外协供应商')
|
||||
equipment_id = fields.Many2one('maintenance.equipment', string='加工设备')
|
||||
is_ok = fields.Boolean(string='是否合格')
|
||||
# 加工人
|
||||
processing_user_id = fields.Many2one('res.users', string='加工人')
|
||||
# 检测人
|
||||
inspection_user_id = fields.Many2one('res.users', string='检测人')
|
||||
schedule_state = fields.Selection(related='production_id.schedule_state', store=True)
|
||||
# 工件装夹信息
|
||||
functional_fixture_code = fields.Char(string="功能夹具编码", readonly=True)
|
||||
@@ -127,6 +132,13 @@ class ResMrpWorkOrder(models.Model):
|
||||
production_line = fields.Char(string="生产线")
|
||||
preset_program_information = fields.Char(string="预调程序信息")
|
||||
|
||||
@api.onchange('is_ok')
|
||||
def _onchange_inspection_user_id(self):
|
||||
"""
|
||||
检测is_ok(是否合格)被修改的话,就将当前用户赋值给inspection_user_id
|
||||
"""
|
||||
self.inspection_user_id = self.env.user.id
|
||||
|
||||
@api.onchange('functional_fixture_id')
|
||||
def _onchange_functional_fixture_id(self):
|
||||
if self.functional_fixture_id:
|
||||
|
||||
@@ -13,6 +13,7 @@ access_sf_production_line,sf.production.line,model_sf_production_line,sf_base.gr
|
||||
access_sf_production_line_manager,sf.production.line,model_sf_production_line,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||
access_maintenance_equipment_tool,maintenance_equipment_tool,model_maintenance_equipment_tool,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_maintenance_equipment_tool_manager,maintenance_equipment_tool,model_maintenance_equipment_tool,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||
access_maintenance_equipment_tool_equipment_manager,maintenance_equipment_tool,model_maintenance_equipment_tool,sf_maintenance.sf_group_equipment_user,1,1,1,0
|
||||
access_mrp_production,mrp_production,model_mrp_production,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_mrp_production_manager,mrp_production,model_mrp_production,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||
access_mrp_workorder,mrp_workorder,model_mrp_workorder,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
@@ -101,6 +102,7 @@ access_sf_product_model_type_routing_sort,sf.product.model.type.routing.sort,mod
|
||||
access_sf_embryo_model_type_routing_sort,sf.embryo.model.type.routing.sort,model_sf_embryo_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_surface_technics_model_type_routing_sort,sf.surface_technics.model.type.routing.sort,model_sf_surface_technics_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_mrp_workcenter_capacity,mrp.workcenter.capacity,mrp.model_mrp_workcenter_capacity,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_cnc_processing,sf.cnc.processing,model_sf_cnc_processing,sf_base.group_plan_dispatch,1,0,0,0
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -61,10 +61,10 @@
|
||||
<xpath expr="//form//header//button[@name='action_confirm']" position="after">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="check_status" invisible="1"/>
|
||||
<button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/>
|
||||
<button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<button name="action_check" string="启用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
|
||||
<button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/>
|
||||
<!-- <button name="archive" type="object" string="归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', False)]}"/> -->
|
||||
<!-- <button name="unarchive" type="object" string="取消归档" icon="fa-archive" class="oe_highlight" attrs="{'invisible': [('active', '=', True)]}"/> -->
|
||||
<button name="action_check" string="审核" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', True)]}" groups="sf_base.group_plan_director"/>
|
||||
<!-- <button name="action_uncheck" string="禁用" type="object" class="oe_highlight" attrs="{'invisible': [('check_status', '=', False)]}" groups="sf_base.group_plan_director"/> -->
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
|
||||
@@ -453,6 +453,19 @@
|
||||
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//form//sheet//group//group//div[1]" position="after">
|
||||
<label for="date_start" string="实际开始时间"/>
|
||||
<div class="oe_inline">
|
||||
<field name="date_start" class="mr8 oe_inline"/>
|
||||
<strong class="mr8 oe_inline">到</strong>
|
||||
<field name="date_finished" class="oe_inline"/>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//form//sheet//group//group//div[3]" position="after">
|
||||
<field name="is_ok"/>
|
||||
<field name="processing_user_id"/>
|
||||
<field name="inspection_user_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user