上传NC文件
This commit is contained in:
@@ -74,6 +74,7 @@ class MrpProduction(models.Model):
|
|||||||
'operation_id': False,
|
'operation_id': False,
|
||||||
'name': route.route_workcenter_id.name,
|
'name': route.route_workcenter_id.name,
|
||||||
'processing_panel': k,
|
'processing_panel': k,
|
||||||
|
|
||||||
'workcenter_id': self.env['mrp.routing.workcenter'].get_workcenter(route.workcenter_ids.ids),
|
'workcenter_id': self.env['mrp.routing.workcenter'].get_workcenter(route.workcenter_ids.ids),
|
||||||
'date_planned_start': False,
|
'date_planned_start': False,
|
||||||
'date_planned_finished': False,
|
'date_planned_finished': False,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import base64
|
|||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
|
|
||||||
import qrcode
|
|
||||||
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from odoo import api, fields, models
|
from odoo import api, fields, models
|
||||||
@@ -84,7 +84,7 @@ class MrpWorkOrder(models.Model):
|
|||||||
_inherit = 'mrp.workorder'
|
_inherit = 'mrp.workorder'
|
||||||
_description = '工单'
|
_description = '工单'
|
||||||
|
|
||||||
cnc_id = fields.Many2one('ir.attachment', string='CNC程序')
|
cnc_id = fields.Many2many('ir.attachment', 'cnc_attachment', string="cnc程序获取")
|
||||||
tray_ids = fields.One2many('sf.tray', 'workorder_id', string='托盘')
|
tray_ids = fields.One2many('sf.tray', 'workorder_id', string='托盘')
|
||||||
# def get_tray_info(self):
|
# def get_tray_info(self):
|
||||||
# @api.onchange('X_axis', 'Y_axis', 'Z_axis')
|
# @api.onchange('X_axis', 'Y_axis', 'Z_axis')
|
||||||
|
|||||||
@@ -9,9 +9,7 @@
|
|||||||
<xpath expr="//page[last()]" position="after">
|
<xpath expr="//page[last()]" position="after">
|
||||||
<page string="获取CNC加工程序">
|
<page string="获取CNC加工程序">
|
||||||
<group>
|
<group>
|
||||||
<field name="cnc_id" />
|
<field name="cnc_id" widget="many2many_binary"/>
|
||||||
|
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
@@ -19,6 +17,8 @@
|
|||||||
<xpath expr="//page[last()]" position="after">
|
<xpath expr="//page[last()]" position="after">
|
||||||
<page string="装夹托盘">
|
<page string="装夹托盘">
|
||||||
<group>
|
<group>
|
||||||
|
|
||||||
|
|
||||||
<field name="processing_panel" readonly = "1"/>
|
<field name="processing_panel" readonly = "1"/>
|
||||||
<div class="col-12 col-lg-6 o_setting_box">
|
<div class="col-12 col-lg-6 o_setting_box">
|
||||||
<button type="object" class="oe_highlight" name="gettray" string="扫描托盘"
|
<button type="object" class="oe_highlight" name="gettray" string="扫描托盘"
|
||||||
|
|||||||
Reference in New Issue
Block a user