Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化三次元检测报告
This commit is contained in:
@@ -687,6 +687,9 @@ class MrpProduction(models.Model):
|
||||
for work_id in work_ids:
|
||||
if panel_sequence_list.get(work_id.name):
|
||||
work_id.sequence = panel_sequence_list[work_id.name]
|
||||
if rec.tool_state in ['1', '2']:
|
||||
rec.workorder_ids.filtered(
|
||||
lambda a: a.routing_type == '装夹预调' and a.state in 'ready').compute_state()
|
||||
|
||||
# 创建工单并进行排序
|
||||
def _create_workorder(self, item):
|
||||
|
||||
@@ -988,6 +988,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
# elif workorder.production_id.reservation_state != 'assigned' and workorder.state == 'ready':
|
||||
# workorder.state = 'waiting'
|
||||
|
||||
def compute_state(self):
|
||||
self._compute_state()
|
||||
|
||||
# 重写工单开始按钮方法
|
||||
def button_start(self):
|
||||
if self.routing_type == '装夹预调':
|
||||
|
||||
@@ -603,6 +603,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
功能刀具组装
|
||||
:return:
|
||||
"""
|
||||
logging.info('功能刀具开始组装!')
|
||||
# 获取组装单对象
|
||||
functional_tool_assembly = self.env['sf.functional.tool.assembly'].search([
|
||||
('assembly_order_code', '=', self.assembly_order_code),
|
||||
@@ -649,6 +650,8 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
])
|
||||
cam_plan.write({'plan_execute_status': '2'})
|
||||
|
||||
logging.info('功能刀具组装完成!')
|
||||
|
||||
# 关闭弹出窗口
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
@@ -865,6 +868,7 @@ class StockPicking(models.Model):
|
||||
# 设置数量,并验证完成
|
||||
picking_id.action_set_quantities_to_reservation()
|
||||
picking_id.button_validate()
|
||||
logging.info(f'刀具物料调拨单状态:{picking_id.state}')
|
||||
|
||||
def _get_name_stock1(self, picking_type_id):
|
||||
name = f'{picking_type_id.sequence_id.prefix}DJ/{date.today().strftime("%y")}'
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record model="ir.actions.act_window" id="stock.stock_picking_type_action">
|
||||
<field name="context">{'search_default_groupby_code':1}</field>
|
||||
</record>
|
||||
|
||||
<record id="view_location_form_sf_inherit" model="ir.ui.view">
|
||||
<field name="name">stock.location.form.sf.inherit</field>
|
||||
|
||||
Reference in New Issue
Block a user