新增质量团队和控制点的审核按钮
This commit is contained in:
@@ -7,10 +7,15 @@
|
|||||||
<field name="model">quality.point</field>
|
<field name="model">quality.point</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
|
<header>
|
||||||
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box"/>
|
<div class="oe_button_box" name="button_box"/>
|
||||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
<widget name="web_ribbon" title="Archived" bg_color="bg-danger"
|
||||||
<h2><field name="name" readonly="1"/></h2>
|
attrs="{'invisible': [('active', '=', True)]}"/>
|
||||||
|
<h2>
|
||||||
|
<field name="name" readonly="1"/>
|
||||||
|
</h2>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
@@ -33,7 +38,8 @@
|
|||||||
<field name="note" placeholder="Describe the quality check to do..."/>
|
<field name="note" placeholder="Describe the quality check to do..."/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Notes" name="Notes">
|
<page string="Notes" name="Notes">
|
||||||
<field name="reason" string="Note" placeholder="Describe why you need to perform this quality check..."/>
|
<field name="reason" string="Note"
|
||||||
|
placeholder="Describe why you need to perform this quality check..."/>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
@@ -95,7 +101,8 @@
|
|||||||
<filter string="Stage" name="groupby_stage" domain="[]" context="{'group_by': 'stage_id'}"/>
|
<filter string="Stage" name="groupby_stage" domain="[]" context="{'group_by': 'stage_id'}"/>
|
||||||
<filter string="Responsible" name="groupby_user" domain="[]" context="{'group_by': 'user_id'}"/>
|
<filter string="Responsible" name="groupby_user" domain="[]" context="{'group_by': 'user_id'}"/>
|
||||||
<filter string="Root Cause" name="groupby_reason" domain="[]" context="{'group_by': 'reason_id'}"/>
|
<filter string="Root Cause" name="groupby_reason" domain="[]" context="{'group_by': 'reason_id'}"/>
|
||||||
<filter string="Creation Date" name="groupby_createmonth" domain="[]" context="{'group_by': 'create_date'}"/>
|
<filter string="Creation Date" name="groupby_createmonth" domain="[]"
|
||||||
|
context="{'group_by': 'create_date'}"/>
|
||||||
<filter string="Quality Team" name="groupby_team_id" domain="[]" context="{'group_by': 'team_id'}"/>
|
<filter string="Quality Team" name="groupby_team_id" domain="[]" context="{'group_by': 'team_id'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
@@ -122,4 +129,4 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- js stuff -->
|
<!-- js stuff -->
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -602,6 +602,7 @@
|
|||||||
<field name="model">quality.alert.team</field>
|
<field name="model">quality.alert.team</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
|
<header></header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" string="Team Name"/>
|
<label for="name" string="Team Name"/>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import os
|
|||||||
from odoo import models, fields, api, _
|
from odoo import models, fields, api, _
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
'author': 'jikimo',
|
'author': 'jikimo',
|
||||||
'website': 'https://sf.cs.jikimo.com',
|
'website': 'https://sf.cs.jikimo.com',
|
||||||
# 此处依赖sf_manufacturing是因为我要重写其中的一个字段operation_id的string,故需要sf_manufacturing先安装
|
# 此处依赖sf_manufacturing是因为我要重写其中的一个字段operation_id的string,故需要sf_manufacturing先安装
|
||||||
'depends': ['quality_control', 'sf_manufacturing'],
|
'depends': ['quality_control'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'views/view.xml'
|
'views/view.xml'
|
||||||
|
|||||||
@@ -21,3 +21,16 @@ class SfQualityPoint(models.Model):
|
|||||||
self.check_state = 'enable'
|
self.check_state = 'enable'
|
||||||
# picking_type_ids = fields.Many2many(
|
# picking_type_ids = fields.Many2many(
|
||||||
# 'stock.picking.type', string='执行节点', required=True, check_company=True)
|
# 'stock.picking.type', string='执行节点', required=True, check_company=True)
|
||||||
|
|
||||||
|
|
||||||
|
class ResQualityAlertTeam(models.Model):
|
||||||
|
_inherit = 'quality.alert.team'
|
||||||
|
|
||||||
|
check_state = fields.Selection([
|
||||||
|
('enable', '启用'),
|
||||||
|
('close', '关闭')
|
||||||
|
], string='审核状态', default='close')
|
||||||
|
|
||||||
|
# 审核
|
||||||
|
def action_check(self):
|
||||||
|
self.check_state = 'enable'
|
||||||
|
|||||||
@@ -35,15 +35,29 @@
|
|||||||
<record model="ir.ui.view" id="quality_point_view_form_inherit_sf">
|
<record model="ir.ui.view" id="quality_point_view_form_inherit_sf">
|
||||||
<field name="name">quality.point.form.inherit.sf</field>
|
<field name="name">quality.point.form.inherit.sf</field>
|
||||||
<field name="model">quality.point</field>
|
<field name="model">quality.point</field>
|
||||||
<field name="inherit_id" ref="quality_control.quality_point_view_form_inherit_quality_control"/>
|
<field name="inherit_id" ref="quality.quality_point_view_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//form" position="inside">
|
<xpath expr="//header" position="inside">
|
||||||
<header>
|
|
||||||
<field name="check_state" invisible="1"/>
|
<field name="check_state" invisible="1"/>
|
||||||
<button name="action_check" string="审核" type="object"
|
<button name="action_check" string="审核" type="object"
|
||||||
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_base.group_quality_director"
|
||||||
|
class="oe_highlight"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="quality_alert_team_view_form_inherit_sf">
|
||||||
|
<field name="name">quality.alert.team.form.inherit.sf</field>
|
||||||
|
<field name="model">quality.alert.team</field>
|
||||||
|
<field name="inherit_id" ref="quality_control.quality_alert_team_view_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//header" position="inside">
|
||||||
|
<field name="check_state" invisible="1"/>
|
||||||
|
<button name="action_check" string="审核" type="object"
|
||||||
|
attrs="{'invisible': [('check_state','=', 'enable')]}"
|
||||||
|
groups="sf_base.group_quality_director"
|
||||||
class="oe_highlight"/>
|
class="oe_highlight"/>
|
||||||
</header>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo import fields, models, api
|
from odoo import fields, models, api
|
||||||
# from quatotion import readSql, feature_recognize, auto_quatotion
|
from quatotion import readSql, feature_recognize, auto_quatotion
|
||||||
|
|
||||||
__author__ = 'jinling.yang'
|
__author__ = 'jinling.yang'
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
@@ -24,14 +24,14 @@ class AutoQuatotion(models.Model):
|
|||||||
def get_process_time_db_path(self):
|
def get_process_time_db_path(self):
|
||||||
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
return get_resource_path('sf_sale', 'models', 'process_time.db')
|
||||||
|
|
||||||
# def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
def get_auto_quatotion(self, stp_url, feature_full_path, process_time_db_path, model_code):
|
||||||
# '''
|
'''
|
||||||
# 通过打包好的.so库,
|
通过打包好的.so库,
|
||||||
# 以调用autoQuatotion库中Quatotion类,
|
以调用autoQuatotion库中Quatotion类,
|
||||||
# 初始化后调用类的analyseShape方法对模型文件进行价格预测
|
初始化后调用类的analyseShape方法对模型文件进行价格预测
|
||||||
# '''
|
'''
|
||||||
# # 初始化自动报价类(输入特征数据库和加工时间数据库)
|
# 初始化自动报价类(输入特征数据库和加工时间数据库)
|
||||||
# reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
reader = auto_quatotion.Quatotion(feature_full_path, process_time_db_path)
|
||||||
# # 获取价格、加工时间、尺寸、XYZ、翻面次数
|
# 获取价格、加工时间、尺寸、XYZ、翻面次数
|
||||||
# feature_info = reader.analyseShape(stp_url, InfoJson={})
|
feature_info = reader.analyseShape(stp_url, InfoJson={})
|
||||||
# return feature_info
|
return feature_info
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import os
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
import requests
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
|
|||||||
Reference in New Issue
Block a user