修改智能工厂接收业务平台订单接口
This commit is contained in:
@@ -1,25 +1,52 @@
|
||||
from odoo import models,fields
|
||||
from odoo import models, fields
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class bfmOrder(models.Model):
|
||||
_name = 'sf.bfm.order'
|
||||
_description = '业务平台订单'
|
||||
|
||||
order_number = fields.Char('订单号')
|
||||
deadline_of_delivery = fields.Date('交货截止日期')
|
||||
order_line_ids = fields.One2many('sf.bfm.order.line', 'order_id', string='订单明细')
|
||||
|
||||
|
||||
class bfmOrderLine(models.Model):
|
||||
_name = 'sf.bfm.order.line'
|
||||
_description = '业务平台订单'
|
||||
_description = '业务平台订单明细'
|
||||
|
||||
model_file = fields.Binary('模型文件', attachment=False)
|
||||
model_name = fields.char('模型名称')
|
||||
type = fields.Many2one('mrs.materials.model', '型号')
|
||||
surface_technics = fields.Many2one('mrs.production.process', string='表面工艺')
|
||||
# technological_parameter = fields.Many2one('',string='工艺参数')
|
||||
# model_file = fields.Binary('模型文件')
|
||||
model_name = fields.Char('模型名称')
|
||||
model_length = fields.Float('长[mm]', digits=(16, 3))
|
||||
model_width = fields.Float('宽[mm]', digits=(16, 3))
|
||||
model_height = fields.Float('高[mm]', digits=(16, 3))
|
||||
model_volume = fields.Float('体积[mm³]', digits=(16, 3))
|
||||
materials_id = fields.Many2one('mrs.production.materials', string='材料')
|
||||
materials_type_id = fields.Many2one('mrs.materials.model', string='型号')
|
||||
surface_technics_id = fields.Many2one('mrs.production.process', string='表面工艺')
|
||||
technological_parameter_id = fields.Many2one('sf.surface.process.item', string='工艺参数')
|
||||
unit_price = fields.Float('单价')
|
||||
amount = fields.Integer('数量')
|
||||
money = fields.Float('金额')
|
||||
order_id = fields.Many2one('sf.bfm.order', string='业务平台订单')
|
||||
# sale_order_id = fields.Many2one('sale.order')
|
||||
|
||||
|
||||
class SurfaceProcessItem(models.Model):
|
||||
_name = 'sf.surface.process.item'
|
||||
_description = '表面工艺参数'
|
||||
|
||||
sequence = fields.Integer('排序', default=99)
|
||||
name = fields.Char('名称', index=True)
|
||||
surface_id = fields.Many2one('mrs.production.process', string='表面工艺')
|
||||
remark = fields.Text('说明')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class sale(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
bfm_process_order_ids = fields.Many2one('sf.bfm.order.line', string='业务平台订单')
|
||||
bfm_process_order_ids = fields.One2many('sf.bfm.order', 'sale_order_id', string='业务平台订单')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user