合并代码
This commit is contained in:
@@ -7,7 +7,7 @@ import math
|
||||
|
||||
|
||||
from io import BytesIO
|
||||
from odoo import api, fields, models
|
||||
from odoo import api, fields, models,SUPERUSER_ID
|
||||
from pystrich.code128 import Code128Encoder
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class MrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_description = '工单'
|
||||
|
||||
cnc_id = fields.Many2many('ir.attachment', 'cnc_attachment', string="cnc程序获取")
|
||||
|
||||
tray_ids = fields.One2many('sf.tray', 'workorder_id', string='托盘')
|
||||
# def get_tray_info(self):
|
||||
# @api.onchange('X_axis', 'Y_axis', 'Z_axis')
|
||||
@@ -191,11 +191,21 @@ class MrpWorkOrder(models.Model):
|
||||
# }
|
||||
# )
|
||||
def recreateManufacturing(self):
|
||||
|
||||
|
||||
# productions = self.env['mrp.production'].with_user(SUPERUSER_ID).sudo().with_company(self.company_id).create(self.production_id)
|
||||
# print(productions)
|
||||
return ""
|
||||
|
||||
def recreateWorkerOrder(self):
|
||||
self.env['stock.move'].sudo().create(self.production_id._get_moves_raw_values())
|
||||
self.env['stock.move'].sudo().create(self.production_id._get_moves_finished_values())
|
||||
self.production_id._create_workorder()
|
||||
return ""
|
||||
|
||||
cnc_id = fields.Many2many('ir.attachment', 'cnc_attachment', string="cnc程序获取")
|
||||
def fetchCNC(self):
|
||||
return ""
|
||||
|
||||
'''
|
||||
制造订单绑定托盘信息
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[last()]" position="after">
|
||||
<page string="获取CNC加工程序" attrs='{"invisible": [("routing_type","!=","获取CNC加工程序")]}'>
|
||||
<group>
|
||||
<field name="cnc_id" widget="many2many_binary"/>
|
||||
</group>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"
|
||||
|
||||
/>
|
||||
</div>
|
||||
</page>
|
||||
|
||||
</xpath>
|
||||
@@ -153,7 +155,25 @@
|
||||
<xpath expr="//page[last()]" position="after">
|
||||
<page string="CNC加工" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
|
||||
<group>
|
||||
<field name="cnc_ids" widget="one2many"/>
|
||||
|
||||
<field name="cnc_ids" widget="one2many">
|
||||
<tree>
|
||||
<field name="FNo" />
|
||||
<field name="FPGName" />
|
||||
<field name="FKnifeName" />
|
||||
<field name="FDNo" />
|
||||
<field name="FWorkType" />
|
||||
<field name="FXY" />
|
||||
<field name="FZ" />
|
||||
<field name="FJGSD" />
|
||||
<field name="FSCCD" />
|
||||
<field name="FDJSpec" />
|
||||
<field name="FJGDate" />
|
||||
<field name="FComment" />
|
||||
</tree>
|
||||
|
||||
</field>
|
||||
|
||||
|
||||
</group>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user