质量模块的改造已完成,本地已测试
This commit is contained in:
File diff suppressed because it is too large
Load Diff
4
sf_quality/__init__.py
Normal file
4
sf_quality/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
34
sf_quality/__manifest__.py
Normal file
34
sf_quality/__manifest__.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
{
|
||||
'name': '机企猫智能工厂 质量管理',
|
||||
'version': '1.0',
|
||||
'summary': 'sf_quality',
|
||||
'sequence': 16,
|
||||
'description': """
|
||||
这是一个用于机企猫质量管理的模块
|
||||
====================
|
||||
""",
|
||||
'category': 'sf',
|
||||
'author': 'jikimo',
|
||||
'website': 'https://sf.cs.jikimo.com',
|
||||
# 此处依赖sf_manufacturing是因为我要重写其中的一个字段operation_id的string,故需要sf_manufacturing先安装
|
||||
'depends': ['quality_control', 'sf_manufacturing'],
|
||||
'data': [
|
||||
'views/view.xml'
|
||||
],
|
||||
|
||||
'assets': {
|
||||
|
||||
'web.assets_qweb': [
|
||||
],
|
||||
'web.assets_backend': [
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
'installable': True,
|
||||
'application': True,
|
||||
# 'auto_install': False,
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
4
sf_quality/models/__init__.py
Normal file
4
sf_quality/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import custom_quality
|
||||
15
sf_quality/models/custom_quality.py
Normal file
15
sf_quality/models/custom_quality.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SfQualityPoint(models.Model):
|
||||
_inherit = 'quality.point'
|
||||
|
||||
product_ids = fields.Many2many(
|
||||
'product.product', string='适用产品',
|
||||
domain="[('type', 'in', ('product', 'consu')), '|', ('company_id', '=', False), ('company_id', '=', company_id)]",
|
||||
help="Quality Point will apply to every selected Products.")
|
||||
# picking_type_ids = fields.Many2many(
|
||||
# 'stock.picking.type', string='执行节点', required=True, check_company=True)
|
||||
|
||||
|
||||
0
sf_quality/security/ir.model.access.csv
Normal file
0
sf_quality/security/ir.model.access.csv
Normal file
|
|
34
sf_quality/views/view.xml
Normal file
34
sf_quality/views/view.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="quality.quality_alert_view_tree" model="ir.ui.view">
|
||||
<field name="name">quality.alert.view.tree</field>
|
||||
<field name="model">quality.alert</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree sample="1">
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="product_tmpl_id" optional="show"/>
|
||||
<field name="product_id" optional="hide"/>
|
||||
<field name="lot_id" optional="hide"/>
|
||||
<field name="team_id" optional="hide"/> <!-- Change show to hide -->
|
||||
<field name="user_id" optional="hide" widget='many2one_avatar_user'/> <!-- Change show to hide -->
|
||||
<field name="tag_ids" optional="hide" widget="many2many_tags"/>
|
||||
<field name="reason_id" optional="hide"/>
|
||||
<field name="priority" optional="hide"/>
|
||||
<field name="date_assign" optional="show"/>
|
||||
<field name="partner_id" optional="hide"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="quality_control.quality_alert_action_check" model="ir.actions.act_window">
|
||||
<field name="name">质量缺陷单</field>
|
||||
<field name="res_model">quality.alert</field>
|
||||
<field name="view_mode">kanban,tree,form,pivot,graph,calendar</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new quality alert
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user