智能工厂接口新增相关字段
This commit is contained in:
@@ -10,9 +10,8 @@
|
||||
""",
|
||||
'category': 'YZ',
|
||||
'website': 'https://www.sf.cs.jikimo.com',
|
||||
'depends': ['account', 'sf_base', 'base', 'sale'],
|
||||
'depends': [],
|
||||
'data': [
|
||||
'views/sale_process_order_view.xml'
|
||||
],
|
||||
'demo': [
|
||||
],
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from .import controllers
|
||||
@@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import logging
|
||||
from datetime import date, timedelta
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
from odoo.addons.mrs_gateway_api.models.common import Common
|
||||
from odoo.addons.mrs_gateway_api.models.basicdata_str import BasicDataStr
|
||||
|
||||
|
||||
class Sf_Bf_Connect(http.Controller):
|
||||
|
||||
@http.route('/api/bfm_process_order/list', type='json', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
cors="*")
|
||||
def get_bfm_process_order_list(self, **kw):
|
||||
"""
|
||||
获取业务平台传送来的业务平台订单
|
||||
:param kw:
|
||||
:return:
|
||||
"""
|
||||
result = json.loads('bfm_process_order_list')
|
||||
for item in result:
|
||||
self.env['mrs.production.process'].create({
|
||||
"id": item['id'],
|
||||
"model_file": item['model_file'],
|
||||
"model_name": item['model_name'],
|
||||
"type": item['type'],
|
||||
"surface_technics": item['surface_technics'],
|
||||
"unit_price": item['unit_price'],
|
||||
"amount": item['amount'],
|
||||
"money": item['money']
|
||||
})
|
||||
@@ -1,2 +0,0 @@
|
||||
from . import sf_process_order
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
from odoo import models,fields
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class bfmOrderLine(models.Model):
|
||||
_name = 'sf.bfm.order.line'
|
||||
_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='工艺参数')
|
||||
unit_price = fields.Float('单价')
|
||||
amount = fields.Integer('数量')
|
||||
money = fields.Float('金额')
|
||||
|
||||
|
||||
class sale(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
bfm_process_order_ids = fields.Many2one('sf.bfm.order.line', string='业务平台订单')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,6 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_sf_bfm_order_line,sf_bfm_order_line,model_sf_bfm_order_line,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="view_sf_form_inherit">
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='Customer Signature']" position="before">
|
||||
<page string="Bfm Line">
|
||||
<group>
|
||||
<field name="bfm_process_order_ids"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user