增加合并下发向导,增加cnc模型的缺省tree视图

This commit is contained in:
mgw
2023-02-23 08:52:56 +08:00
parent d81cf77bbe
commit 28659bfc95
13 changed files with 260 additions and 9 deletions

View File

@@ -431,6 +431,7 @@ class ResMrpWorkOrder(models.Model):
class CNCprocessing(models.Model):
_name = 'sf.cnc.processing'
_description = "CNC加工"
_rec_name = 'program_name'
cnc_id = fields.Many2one('ir.attachment')
sequence_number = fields.Char('序号')
@@ -446,6 +447,8 @@ class CNCprocessing(models.Model):
estimated_processing_time = fields.Char('预计加工时间')
remark = fields.Text('备注')
workorder_id = fields.Many2one('mrp.workorder', string="工单")
button_state = fields.Boolean(string='是否已经下发')
# mrs下发编程单创建CNC加工
def cnc_processing_create(self, cnc_workorder, ret):

View File

@@ -336,11 +336,11 @@
<xpath expr="//page[1]" position="before">
<page string="CNC程序" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
<field name="cnc_ids" widget="one2many" string="工作程序">
<tree>
<tree decoration-success="button_state" decoration-bf="button_state">
<field name="sequence_number"/>
<field name="program_name"/>
<field name="cnc_id" string="文件"/>
<field name="cutting_tool_name"/>
<field name="cutting_tool_name"/>
<field name="cutting_tool_no"/>
<field name="processing_type"/>
<field name="margin_x_y"/>
@@ -350,6 +350,7 @@
<field name="cutting_tool_handle_type"/>
<field name="estimated_processing_time"/>
<field name="remark"/>
<field name="button_state" invisible="1"/>
</tree>
</field>
<group>