1.工单,工件配送新增sns及给部分字段添加tracking(跟踪)及优化页面

2.优化agv:部分字段不可编辑
This commit is contained in:
jinling.yang
2024-06-11 16:56:20 +08:00
parent 7be5b53767
commit adafce85bd
11 changed files with 157 additions and 83 deletions

View File

@@ -6,8 +6,8 @@ import os
from datetime import datetime
from stl import mesh
# from OCC.Core.GProp import GProp_GProps
# from OCC.Extend.DataExchange import read_step_file
# from OCC.Extend.DataExchange import write_stl_file
from OCC.Extend.DataExchange import read_step_file
from OCC.Extend.DataExchange import write_stl_file
from odoo.addons.sf_base.commons.common import Common
from odoo import models, fields, api
from odoo.modules import get_resource_path
@@ -16,6 +16,7 @@ from odoo.exceptions import ValidationError, UserError
class QuickEasyOrder(models.Model):
_name = 'quick.easy.order'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = '简易下单'
_order = 'id desc'
@@ -32,13 +33,15 @@ class QuickEasyOrder(models.Model):
('0.03', '±0.03mm'),
('0.02', '±0.02mm'),
('0.01', '±0.01mm')], string='加工精度', default='0.10')
material_id = fields.Many2one('sf.production.materials', '材料')
material_model_id = fields.Many2one('sf.materials.model', '型号', domain="[('materials_id', '=', material_id)]")
material_id = fields.Many2one('sf.production.materials', '材料', tracking=True)
material_model_id = fields.Many2one('sf.materials.model', '型号', domain="[('materials_id', '=', material_id)]",
tracking=True)
# process_id = fields.Many2one('sf.production.process', string='表面工艺')
parameter_ids = fields.Many2many('sf.production.process.parameter', 'process_item_order_rel', string='可选参数')
quantity = fields.Integer('数量', default=1)
unit_price = fields.Float('单价')
price = fields.Float('')
parameter_ids = fields.Many2many('sf.production.process.parameter', 'process_item_order_rel', string='可选参数',
tracking=True)
quantity = fields.Integer('数量', default=1, tracking=True)
unit_price = fields.Float('', tracking=True)
price = fields.Float('总价', tracking=True)
model_file = fields.Binary('glb模型文件')
upload_model_file = fields.Many2many('ir.attachment', 'upload_qf_model_file_attachment_ref', string='上传模型文件')
delivery_time = fields.Date('交货日期')
@@ -46,10 +49,10 @@ class QuickEasyOrder(models.Model):
state = fields.Selection([('草稿', '草稿'), ('待派单', '待派单'),
('待接单', '待接单'), ('加工中', '加工中'),
('物流中', '物流中'), ('已交付', '已交付')], string='订单状态', default='草稿',
readonly=True)
readonly=True, tracking=True)
model_color_state = fields.Selection([
('success', '成功'),
('fail', '失败')], string='模型上色状态')
('fail', '失败')], string='模型上色状态', tracking=True)
processing_time = fields.Integer('加工时长(min)')
sale_order_id = fields.Many2one('sale.order', '销售订单号')