Merge branch refs/heads/develop into refs/heads/feature/前端样式修改
This commit is contained in:
@@ -4,6 +4,8 @@ import { registry } from "@web/core/registry";
|
||||
import { url } from "@web/core/utils/urls";
|
||||
import { ImageField, imageCacheKey } from '@web/views/fields/image/image_field';
|
||||
|
||||
const placeholder = "/web/static/img/placeholder.png";
|
||||
|
||||
export class CustomImageField extends ImageField {
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
@@ -90,7 +90,7 @@ class MrsProductionProcess(models.Model):
|
||||
code = fields.Char("编码")
|
||||
name = fields.Char('名称')
|
||||
remark = fields.Text("备注")
|
||||
processing_order_ids = fields.One2many('sf.processing.order', 'production_process_id', string='工序')
|
||||
# processing_order_ids = fields.One2many('sf.processing.order', 'production_process_id', string='工序')
|
||||
partner_process_ids = fields.Many2many('res.partner', 'process_ids', '加工工厂')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
parameter_ids = fields.One2many('sf.production.process.parameter', 'process_id', string='可选参数')
|
||||
@@ -98,25 +98,25 @@ class MrsProductionProcess(models.Model):
|
||||
# workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_process', required=True)
|
||||
|
||||
|
||||
class MrsProcessingTechnology(models.Model):
|
||||
_name = 'sf.processing.technology'
|
||||
_description = '加工工艺'
|
||||
|
||||
name = fields.Char('名称', index=True)
|
||||
remark = fields.Text('备注', index=True)
|
||||
code = fields.Char("编码")
|
||||
processing_order_ids = fields.Many2many('sf.processing.order', 'sf_associated_processes',
|
||||
index=True, string='工序')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
# class MrsProcessingTechnology(models.Model):
|
||||
# _name = 'sf.processing.technology'
|
||||
# _description = '加工工艺'
|
||||
#
|
||||
# name = fields.Char('名称', index=True)
|
||||
# remark = fields.Text('备注', index=True)
|
||||
# code = fields.Char("编码")
|
||||
# processing_order_ids = fields.Many2many('sf.processing.order', 'sf_associated_processes',
|
||||
# index=True, string='工序')
|
||||
# active = fields.Boolean('有效', default=True)
|
||||
|
||||
|
||||
class MrsProcessingOrder(models.Model):
|
||||
_name = 'sf.processing.order'
|
||||
_description = '工序'
|
||||
sequence = fields.Integer('Sequence')
|
||||
processing_technology_ids = fields.Many2many('sf.processing.technology', 'sf_associated_processes',
|
||||
index=True, string='加工工艺')
|
||||
production_process_id = fields.Many2one('sf.production.process', string="表面工艺")
|
||||
# class MrsProcessingOrder(models.Model):
|
||||
# _name = 'sf.processing.order'
|
||||
# _description = '工序'
|
||||
# sequence = fields.Integer('Sequence')
|
||||
# processing_technology_ids = fields.Many2many('sf.processing.technology', 'sf_associated_processes',
|
||||
# index=True, string='加工工艺')
|
||||
# production_process_id = fields.Many2one('sf.production.process', string="表面工艺")
|
||||
|
||||
|
||||
class SupplierSort(models.Model):
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import requests
|
||||
from datetime import date
|
||||
from odoo import fields, models, api
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.addons.sf_base.commons.common import Common
|
||||
|
||||
|
||||
class CuttingToolMaterial(models.Model):
|
||||
@@ -113,6 +110,24 @@ class CuttingToolModel(models.Model):
|
||||
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz(整体式刀具)')
|
||||
feed_per_tooth_ids_3 = fields.One2many('sf.feed.per.tooth', 'standard_library_id', '每齿走刀量fz(刀片)')
|
||||
material_model_id = fields.Many2one('sf.materials.model', '材料型号')
|
||||
|
||||
@api.onchange('cutting_tool_material_id')
|
||||
def _get_code(self):
|
||||
if self.is_cloud is False:
|
||||
today = date.today().strftime("%Y%m%d")
|
||||
today_code = 'T-DJWL-%s-%s' % (self.cutting_tool_material_id.code, today)
|
||||
cutting_tool_model = self.search(
|
||||
[('code', 'ilike', today_code), ('is_cloud', '=', False),
|
||||
('active', 'in', [True, False])],
|
||||
limit=1,
|
||||
order="id desc")
|
||||
if not cutting_tool_model:
|
||||
num = "%03d" % 1
|
||||
else:
|
||||
m = int(today_code[-3:]) + 1
|
||||
num = "%03d" % m
|
||||
self.code = "%s%s" % (today_code, num)
|
||||
|
||||
# 适用夹头型号可以多选
|
||||
# chuck_ids = fields.Many2many(
|
||||
# 'sf.cutting_tool.standard.library',
|
||||
|
||||
@@ -10,6 +10,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
standard_library_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀具标准库')
|
||||
cutting_tool_type = fields.Char(related='standard_library_id.cutting_tool_type', string='刀具物料类型',
|
||||
store=True)
|
||||
is_cloud = fields.Boolean(related='standard_library_id.is_cloud', string='云端数据')
|
||||
|
||||
# 整体式刀具参数
|
||||
total_length = fields.Float('总长度(mm)')
|
||||
@@ -21,7 +22,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
handle_diameter = fields.Float('柄部直径(mm)')
|
||||
handle_length = fields.Float('柄部长度(mm)')
|
||||
blade_tip_diameter = fields.Integer('刀尖直径(mm)')
|
||||
blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角)', size=20)
|
||||
blade_tip_working_size = fields.Char('刀尖处理尺寸(R半径mm/倒角度)', size=20)
|
||||
blade_tip_taper = fields.Integer('刀尖锥度(°)')
|
||||
blade_diameter = fields.Float('刃部直径(mm)')
|
||||
blade_length = fields.Float('刃部长度(mm)')
|
||||
@@ -37,7 +38,7 @@ class ToolMaterialsBasicParameters(models.Model):
|
||||
cutting_blade_length = fields.Float('切削刃长(mm)')
|
||||
relief_angle = fields.Integer('后角(°)')
|
||||
blade_tip_circular_arc_radius = fields.Char('刀尖圆弧半径(mm)', size=20)
|
||||
inscribed_circle_diameter = fields.Float('内接圆直径(mm)')
|
||||
inscribed_circle_diameter = fields.Float('内接圆直径IC/D(mm)')
|
||||
install_aperture_diameter = fields.Float('安装孔直径(mm)')
|
||||
chip_breaker_groove = fields.Selection([('无', '无'), ('单面', '单面'), ('双面', '双面')],
|
||||
string='有无断屑槽')
|
||||
@@ -170,8 +171,6 @@ class FeedPerTooth(models.Model):
|
||||
feed_per_tooth = fields.Char('每齿走刀量 (mm/z)', size=20)
|
||||
active = fields.Boolean(string='有效', default=True)
|
||||
|
||||
|
||||
|
||||
# @api.depends('product_template_id')
|
||||
# def _compute_product_template_id(self):
|
||||
# if self.product_template_id is not None:
|
||||
|
||||
@@ -9,16 +9,13 @@ access_sf_machine_brand_tags,sf_machine_brand_tags,model_sf_machine_brand_tags,b
|
||||
access_sf_machine_brand_tags_admin,sf_machine_brand_tags_admin,model_sf_machine_brand_tags,base.group_system,1,1,1,0
|
||||
access_sf_machine_control_system,sf_machine_control_system,model_sf_machine_control_system,base.group_user,1,1,1,0
|
||||
access_sf_machine_control_system_admin,sf_machine_control_system_admin,model_sf_machine_control_system,base.group_system,1,1,1,0
|
||||
access_sf_processing_order,sf_processing_order,model_sf_processing_order,base.group_user,1,1,1,0
|
||||
access_sf_processing_order_admin,sf_processing_order_admin,model_sf_processing_order,base.group_system,1,1,1,0
|
||||
|
||||
access_sf_production_process,sf_production_process,model_sf_production_process,base.group_user,1,1,1,0
|
||||
access_sf_production_process_admin,sf_production_process_admin,model_sf_production_process,base.group_system,1,1,1,0
|
||||
access_sf_production_materials,sf_production_materials,model_sf_production_materials,base.group_user,1,1,1,0
|
||||
access_sf_production_materials_admin,sf_production_materials_admin,model_sf_production_materials,base.group_system,1,1,1,0
|
||||
access_sf_materials_model,sf_materials_model,model_sf_materials_model,base.group_user,1,1,1,0
|
||||
access_sf_materials_model_admin,sf_materials_model_admin,model_sf_materials_model,base.group_system,1,1,1,0
|
||||
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,base.group_user,1,1,1,0
|
||||
access_sf_processing_technology_admin,sf_processing_technology_admin,model_sf_processing_technology,base.group_system,1,1,1,0
|
||||
access_sf_supplier_sort,sf_supplier_sort,model_sf_supplier_sort,base.group_user,1,1,1,0
|
||||
access_sf_supplier_sort_admin,sf_supplier_sort_admin,model_sf_supplier_sort,base.group_system,1,1,1,0
|
||||
access_sf_production_process_parameter,sf_production_process_parameter,model_sf_production_process_parameter,base.group_user,1,1,1,0
|
||||
@@ -75,11 +72,15 @@ access_sf_cutting_speed_group_purchase_director,sf_cutting_speed_group_purchase_
|
||||
access_sf_cutting_speed_group_sale_director,sf_cutting_speed_group_sale_director,model_sf_cutting_speed,sf_base.group_sale_director,1,1,1,0
|
||||
access_sf_cutting_speed_group_plan_dispatch,sf_cutting_speed_group_plan_dispatch,model_sf_cutting_speed,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_cutting_speed_group_plan_director,sf_cutting_speed_group_plan_director,model_sf_cutting_speed,sf_base.group_plan_director,1,1,1,0
|
||||
access_sf_cutting_speed_group_quality_director,sf_cutting_speed_group_quality_director,model_sf_cutting_speed,sf_base.group_quality_director,1,1,1,0
|
||||
access_sf_cutting_speed_group_quality,sf_cutting_speed_group_quality,model_sf_cutting_speed,sf_base.group_quality,1,1,1,0
|
||||
access_sf_feed_per_tooth_group_purchase_director,sf_feed_per_tooth_group_purchase_director,model_sf_feed_per_tooth,sf_base.group_purchase_director,1,1,0,0
|
||||
access_sf_feed_per_tooth_group_sale_director,sf_feed_per_tooth_group_sale_director,model_sf_feed_per_tooth,sf_base.group_sale_director,1,1,0,0
|
||||
access_sf_feed_per_tooth_group_plan_dispatch,sf_feed_per_tooth_group_plan_dispatch,model_sf_feed_per_tooth,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_feed_per_tooth_group_plan_director,sf_feed_per_tooth_group_plan_director,model_sf_feed_per_tooth,sf_base.group_plan_director,1,1,0,0
|
||||
access_sf_feed_per_tooth_group_sale_salemanager,sf_feed_per_tooth_group_sale_salemanager,model_sf_feed_per_tooth,sf_base.group_sale_salemanager,1,0,0,0
|
||||
access_sf_feed_per_tooth_group_quality,sf_feed_per_tooth_group_quality,model_sf_feed_per_tooth,sf_base.group_quality,1,1,1,0
|
||||
access_sf_feed_per_tooth_group_quality_director,sf_feed_per_tooth_group_quality_director,model_sf_feed_per_tooth,sf_base.group_quality_director,1,1,1,0
|
||||
access_sf_feed_per_tooth,sf_feed_per_tooth,model_sf_feed_per_tooth,base.group_user,1,1,1,0
|
||||
access_sf_feed_per_tooth_admin,sf_feed_per_tooth_admin,model_sf_feed_per_tooth,base.group_system,1,1,1,0
|
||||
access_sf_ramping_angle,sf_ramping_angle,model_sf_ramping_angle,base.group_user,1,1,1,1
|
||||
@@ -94,7 +95,6 @@ access_sf_machine_brand_group_purchase_director,sf_machine_brand_group_purchase_
|
||||
access_sf_machine_brand_group_sale_director,sf_machine_brand_group_sale_director,model_sf_machine_brand,sf_base.group_sale_director,1,0,0,0
|
||||
access_sf_machine_brand_tags,sf_machine_brand_tags,model_sf_machine_brand_tags,base.group_user,1,1,1,1
|
||||
access_sf_machine_control_system,sf_machine_control_system,model_sf_machine_control_system,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_processing_order,sf_processing_order,model_sf_processing_order,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_production_process,sf_production_process,model_sf_production_process,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_production_materials,sf_production_materials,model_sf_production_materials,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_production_materials_group_plan_director,sf_production_materials_group_plan_director,model_sf_production_materials,sf_base.group_plan_director,1,1,0,0
|
||||
@@ -104,7 +104,6 @@ access_sf_materials_model,sf_materials_model,model_sf_materials_model,sf_base.gr
|
||||
access_sf_materials_model_group_plan_director,sf_materials_model_group_plan_director,model_sf_materials_model,sf_base.group_plan_director,1,0,0,0
|
||||
access_sf_materials_model_group_purchase_director,sf_materials_model_group_purchase_director,model_sf_materials_model,sf_base.group_purchase_director,1,0,0,0
|
||||
access_sf_materials_model_group_sale_director,sf_materials_model_group_sale_director,model_sf_materials_model,sf_base.group_sale_director,1,0,0,0
|
||||
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_supplier_sort,sf_supplier_sort,model_sf_supplier_sort,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_production_process_parameter,sf_production_process_parameter,model_sf_production_process_parameter,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
access_sf_production_process_category,sf_production_process_category,model_sf_production_process_category,sf_base.group_sf_mrp_user,1,0,0,0
|
||||
@@ -143,9 +142,7 @@ access_sf_cutting_width_depth,sf_cutting_width_depth,model_sf_cutting_width_dept
|
||||
access_sf_cutting_width_depth_group_purchase,sf_cutting_width_depth_group_purchase,model_sf_cutting_width_depth,sf_base.group_purchase,1,0,0,0
|
||||
access_maintenance_equipment_image,maintenance_equipment_image,model_maintenance_equipment_image,base.group_user,1,1,1,1
|
||||
access_purchase_order_group_purchase,access_purchase_order_group_purchase,purchase.model_purchase_order,sf_base.group_purchase,1,1,1,0
|
||||
access_purchase_order_group_purchase_director,access_purchase_order_group_purchase_director,purchase.model_purchase_order,sf_base.group_purchase_director,1,1,1,0
|
||||
access_purchase_order_line_group_purchase,access_purchase_order_line_group_purchase,purchase.model_purchase_order_line,sf_base.group_purchase,1,1,1,0
|
||||
access_purchase_order_line_group_purchase_director,access_purchase_order_line_group_purchase_director,purchase.model_purchase_order_line,sf_base.group_purchase_director,1,1,1,0
|
||||
access_spindle_taper_type,spindle_taper_type,model_spindle_taper_type,base.group_user,1,1,1,1
|
||||
access_sf_tool_groups_group_plan_dispatch,sf_tool_groups,model_sf_tool_groups,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_tool_groups_group_sf_tool_user,sf_tool_groups,model_sf_tool_groups,sf_base.group_sf_tool_user,1,1,1,1
|
||||
@@ -161,11 +158,9 @@ access_sf_machine_tool_type,sf_machine_tool_type,model_sf_machine_tool_type,sf_b
|
||||
access_sf_machine_brand,sf_machine_brand,model_sf_machine_brand,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_machine_brand_tags,sf_machine_brand_tags,model_sf_machine_brand_tags,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_machine_control_system,sf_machine_control_system,model_sf_machine_control_system,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_processing_order,sf_processing_order,model_sf_processing_order,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_production_process,sf_production_process,model_sf_production_process,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_production_materials,sf_production_materials,model_sf_production_materials,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_materials_model,sf_materials_model,model_sf_materials_model,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_processing_technology,sf_processing_technology,model_sf_processing_technology,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_supplier_sort,sf_supplier_sort,model_sf_supplier_sort,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_production_process_parameter,sf_production_process_parameter,model_sf_production_process_parameter,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
access_sf_production_process_category,sf_production_process_category,model_sf_production_process_category,sf_base.group_sf_mrp_user,1,1,0,0
|
||||
|
||||
|
@@ -1,6 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!--表面工艺可选参数-->
|
||||
<record model="ir.ui.view" id="mrs_production_process_parameter_tree">
|
||||
<field name="model">sf.production.process.parameter</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="表面工艺可选参数" delete="0">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="mrs_production_process_parameter_form">
|
||||
<field name="model">sf.production.process.parameter</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="表面工艺可选参数" edit="0" delete="0">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" required="1" placeholder="名称" />
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="code" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="process_id" required="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="适用材料">
|
||||
<field name="materials_model_ids"></field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="search_mrs_production_process_parameter_view">
|
||||
<field name="name">search.mrs.production.process.parameter</field>
|
||||
<field name="model">sf.production.process.parameter</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
<field name="name" string="名称" filter_domain="[('name','ilike',self)]"/>
|
||||
<field name="code" string="编码" filter_domain="[('codeNum','ilike',self)]"/>
|
||||
<searchpanel class="account_root">
|
||||
<field name="process_id" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--加工工艺-->
|
||||
<!-- <record model="ir.ui.view" id="sf_processing_technology_form">-->
|
||||
<!-- <field name="model">sf.processing.technology</field>-->
|
||||
@@ -20,26 +74,26 @@
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<record model="ir.ui.view" id="sf_processing_technology_tree">
|
||||
<field name="model">sf.processing.technology</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="加工工艺" create="0" edit="0" delete="1">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="search_sf_processing_technology_view">
|
||||
<field name="name">search.sf.processing.technology.type</field>
|
||||
<field name="model">sf.processing.technology</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>
|
||||
<field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>
|
||||
<filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <record model="ir.ui.view" id="sf_processing_technology_tree">-->
|
||||
<!-- <field name="model">sf.processing.technology</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree string="加工工艺" create="0" edit="0" delete="1">-->
|
||||
<!-- <field name="code"/>-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <record model="ir.ui.view" id="search_sf_processing_technology_view">-->
|
||||
<!-- <field name="name">search.sf.processing.technology.type</field>-->
|
||||
<!-- <field name="model">sf.processing.technology</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <search>-->
|
||||
<!-- <field name="name" string="名称搜索" filter_domain="[('name','ilike',self)]"/>-->
|
||||
<!-- <field name="code" string="编码搜索" filter_domain="[('code','ilike',self)]"/>-->
|
||||
<!-- <filter name="filter_active" string="已归档" domain="[('active','=',False)]"/>-->
|
||||
<!-- </search>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!--表面工艺类别-->
|
||||
<record model="ir.ui.view" id="sf_production_process_category_form">
|
||||
@@ -156,19 +210,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="工序">
|
||||
<field name='processing_order_ids' options="{'no_create':True}" widget="one2many">
|
||||
<tree editable='bottom'>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="processing_technology_ids" widget="many2many_tags">
|
||||
</field>
|
||||
</tree>
|
||||
<form>
|
||||
<field name="processing_technology_ids" widget="many2many">
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</group>
|
||||
<group>
|
||||
@@ -350,12 +392,12 @@
|
||||
<field name="res_model">sf.materials.model</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="sf_processing_technology" model="ir.actions.act_window">
|
||||
<field name="name">加工工艺</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.processing.technology</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<!-- <record id="sf_processing_technology" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">加工工艺</field>-->
|
||||
<!-- <field name="type">ir.actions.act_window</field>-->
|
||||
<!-- <field name="res_model">sf.processing.technology</field>-->
|
||||
<!-- <field name="view_mode">tree</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="sf_production_process_category" model="ir.actions.act_window">
|
||||
<field name="name">表面工艺类别</field>
|
||||
@@ -363,6 +405,12 @@
|
||||
<field name="res_model">sf.production.process.category</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="mrs_production_process_parameter_action" model="ir.actions.act_window">
|
||||
<field name="name">表面工艺可选参数</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.production.process.parameter</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
@@ -111,13 +111,19 @@
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_sf_processing_technology"
|
||||
name="加工工艺"
|
||||
id="mrs_production_process_parameter_view"
|
||||
name="表面工艺可选参数"
|
||||
parent="menu_sf_production_process_1"
|
||||
sequence="3"
|
||||
action="sf_processing_technology"/>
|
||||
sequence="2"
|
||||
action="mrs_production_process_parameter_action"
|
||||
/>
|
||||
<!-- <menuitem-->
|
||||
<!-- id="menu_sf_processing_technology"-->
|
||||
<!-- name="加工工艺"-->
|
||||
<!-- parent="menu_sf_production_process_1"-->
|
||||
<!-- sequence="3"-->
|
||||
<!-- action="sf_processing_technology"/>-->
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="menu_sf_partner_views"-->
|
||||
@@ -143,5 +149,6 @@
|
||||
sequence="1"
|
||||
action="action_sf_machine_control_system"/>
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -7,20 +7,20 @@
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="基础参数" delete="0" create="0" edit="0" sample="1">
|
||||
<field name="total_length" />
|
||||
<field name="blade_number" />
|
||||
<field name="total_length"/>
|
||||
<field name="blade_number"/>
|
||||
<field name="neck_diameter"/>
|
||||
<field name="neck_length"/>
|
||||
<field name="handle_diameter" />
|
||||
<field name="handle_length" />
|
||||
<field name="handle_diameter"/>
|
||||
<field name="handle_length"/>
|
||||
<field name="blade_tip_diameter"/>
|
||||
<field name="blade_tip_working_size"/>
|
||||
<field name="blade_tip_taper" />
|
||||
<field name="blade_diameter" />
|
||||
<field name="blade_tip_taper"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="blade_length"/>
|
||||
<field name="blade_helix_angle"/>
|
||||
<field name="blade_width" />
|
||||
<field name="blade_width" />
|
||||
<field name="blade_width"/>
|
||||
<field name="blade_width"/>
|
||||
<field name="pitch"/>
|
||||
<field name="cutting_depth"/>
|
||||
</tree>
|
||||
@@ -32,23 +32,23 @@
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="基础参数" delete="0" create="0">
|
||||
<field name="total_length" />
|
||||
<field name="length" />
|
||||
<field name="total_length"/>
|
||||
<field name="length"/>
|
||||
<field name="thickness"/>
|
||||
<field name="width"/>
|
||||
<field name="cutting_blade_length" />
|
||||
<field name="relief_angle" />
|
||||
<field name="cutting_blade_length"/>
|
||||
<field name="relief_angle"/>
|
||||
<field name="blade_tip_circular_arc_radius"/>
|
||||
<field name="inscribed_circle_diameter"/>
|
||||
<field name="install_aperture_diameter" />
|
||||
<field name="chip_breaker_groove" />
|
||||
<field name="install_aperture_diameter"/>
|
||||
<field name="chip_breaker_groove"/>
|
||||
<field name="blade_teeth_model"/>
|
||||
<field name="blade_blade_number"/>
|
||||
<field name="main_included_angle" />
|
||||
<field name="top_angle" />
|
||||
<field name="main_included_angle"/>
|
||||
<field name="top_angle"/>
|
||||
<field name="thread_model"/>
|
||||
<field name="thread_num" />
|
||||
<field name="blade_tip_height_tolerance" />
|
||||
<field name="thread_num"/>
|
||||
<field name="blade_tip_height_tolerance"/>
|
||||
<field name="inscribed_circle_tolerance"/>
|
||||
<field name="thickness_tolerance"/>
|
||||
</tree>
|
||||
@@ -60,23 +60,23 @@
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="基础参数" delete="0" create="0">
|
||||
<field name="total_length" />
|
||||
<field name="height" />
|
||||
<field name="total_length"/>
|
||||
<field name="height"/>
|
||||
<field name="blade_height"/>
|
||||
<field name="cut_depth_max"/>
|
||||
<field name="cutter_arbor_diameter" />
|
||||
<field name="min_machining_aperture" />
|
||||
<field name="cutter_arbor_diameter"/>
|
||||
<field name="min_machining_aperture"/>
|
||||
<field name="install_blade_tip_num"/>
|
||||
<field name="cutting_blade_model"/>
|
||||
<field name="is_cooling_hole" />
|
||||
<field name="locating_slot_code" />
|
||||
<field name="is_cooling_hole"/>
|
||||
<field name="locating_slot_code"/>
|
||||
<field name="installing_structure"/>
|
||||
<field name="blade_id"/>
|
||||
<field name="tool_shim" />
|
||||
<field name="cotter_pin" />
|
||||
<field name="tool_shim"/>
|
||||
<field name="cotter_pin"/>
|
||||
<field name="pressing_plate"/>
|
||||
<field name="screw"/>
|
||||
<field name="spanner" />
|
||||
<field name="spanner"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -86,21 +86,21 @@
|
||||
<field name="name">sf.tool.materials.basic.parameters.tree</field>
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="基础参数" >
|
||||
<field name="total_length" />
|
||||
<field name="blade_number" />
|
||||
<tree string="基础参数">
|
||||
<field name="total_length"/>
|
||||
<field name="blade_number"/>
|
||||
<field name="neck_diameter"/>
|
||||
<field name="neck_length"/>
|
||||
<field name="handle_diameter" />
|
||||
<field name="handle_length" />
|
||||
<field name="handle_diameter"/>
|
||||
<field name="handle_length"/>
|
||||
<field name="blade_tip_diameter"/>
|
||||
<field name="blade_tip_working_size"/>
|
||||
<field name="blade_tip_taper" />
|
||||
<field name="blade_diameter" />
|
||||
<field name="blade_tip_taper"/>
|
||||
<field name="blade_diameter"/>
|
||||
<field name="blade_length"/>
|
||||
<field name="blade_helix_angle"/>
|
||||
<field name="blade_width" />
|
||||
<field name="blade_width" />
|
||||
<field name="blade_width"/>
|
||||
<field name="blade_width"/>
|
||||
<field name="pitch"/>
|
||||
<field name="cutting_depth"/>
|
||||
</tree>
|
||||
@@ -118,14 +118,184 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_sf_tool_materials_basic_parameters_form" model="ir.ui.view">
|
||||
<field name="name">sf.tool.materials.basic.parameters.form</field>
|
||||
<field name="model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="规则">
|
||||
<sheet>
|
||||
<field name="cutting_tool_type" invisible="0"/>
|
||||
<field name="standard_library_id" invisible="1"/>
|
||||
<group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="total_length"/>
|
||||
<field name="blade_diameter" class="diameter"/>
|
||||
<field name="blade_length"/>
|
||||
<field name="blade_number"/>
|
||||
<field name="neck_length"/>
|
||||
<field name="neck_diameter" class="diameter"/>
|
||||
<field name="handle_diameter" class="diameter"/>
|
||||
<field name="handle_length"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}">
|
||||
<field name="blade_tip_working_size"/>
|
||||
<field name="blade_tip_diameter" class="diameter"/>
|
||||
<field name="blade_tip_taper"/>
|
||||
<field name="blade_helix_angle"/>
|
||||
<field name="pitch"/>
|
||||
<field name="blade_width"/>
|
||||
<field name="blade_depth"/>
|
||||
<field name="cut_depth_max"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||
<field name="length"/>
|
||||
<field name="thickness"/>
|
||||
<field name="inscribed_circle_diameter" class="diameter"/>
|
||||
<field name="install_aperture_diameter" class="diameter" string="安装孔直径D1(mm)"/>
|
||||
<field name="blade_tip_circular_arc_radius" string="刀尖圆弧半径RE(mm)"/>
|
||||
<field name="cutting_blade_length"/>
|
||||
<field name="relief_angle"/>
|
||||
<field name="chip_breaker_groove"/>
|
||||
<field name="chip_breaker_type_code"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀片')]}">
|
||||
<field name="blade_teeth_model"/>
|
||||
<field name="thread_model"/>
|
||||
<field name="pitch"/>
|
||||
<field name="thread_num"/>
|
||||
<field name="cut_depth_max"/>
|
||||
<field name="blade_blade_number" string="刃数"/>
|
||||
<field name="blade_width" string="刃宽"/>
|
||||
<field name="main_included_angle"/>
|
||||
<field name="top_angle"/>
|
||||
<field name="blade_tip_height_tolerance"/>
|
||||
<field name="inscribed_circle_tolerance"/>
|
||||
<field name="thickness_tolerance"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||
<field name="total_length"/>
|
||||
<field name="width"/>
|
||||
<field name="height"/>
|
||||
<label for="knife_head_length" string="刀头尺寸"/>
|
||||
<div class="test_model">
|
||||
<label for="knife_head_length" string="长"/>
|
||||
<field name="knife_head_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="knife_head_width" string="宽"/>
|
||||
<field name="knife_head_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<label for="knife_head_height" string="高"/>
|
||||
<field name="knife_head_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="blade_diameter" class="diameter"/>
|
||||
<field name="cutter_arbor_diameter" class="diameter"/>
|
||||
<field name="is_cooling_hole"/>
|
||||
<field name="locating_slot_code"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')]}">
|
||||
<field name="main_included_angle"/>
|
||||
<field name="relief_angle"/>
|
||||
<field name="cutting_blade_length"/>
|
||||
<field name="cut_depth_max"/>
|
||||
<field name="min_machining_aperture"/>
|
||||
<field name="install_blade_tip_num"/>
|
||||
<field name="installing_structure"/>
|
||||
<field name="blade_id" options="{'no_create': True}"/>
|
||||
<field name="tool_shim"/>
|
||||
<field name="cotter_pin"/>
|
||||
<field name="pressing_plate"/>
|
||||
<field name="screw"/>
|
||||
<field name="spanner"/>
|
||||
</group>
|
||||
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}">
|
||||
<field name="install_blade_tip_num"/>
|
||||
<field name="blade_diameter" class="diameter"/>
|
||||
<field name="cutter_head_diameter" class="diameter"/>
|
||||
<field name="interface_diameter" class="diameter"/>
|
||||
<field name="total_length"/>
|
||||
<field name="blade_length"/>
|
||||
<field name="cutting_blade_length"/>
|
||||
<field name="cut_depth_max"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀盘')]}">
|
||||
<field name="main_included_angle"/>
|
||||
<field name="installing_structure"/>
|
||||
<field name="blade_id" options="{'no_create': True}"/>
|
||||
<field name="screw"/>
|
||||
<field name="spanner"/>
|
||||
<field name="is_cooling_hole"/>
|
||||
<field name="locating_slot_code"/>
|
||||
</group>
|
||||
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}">
|
||||
<field name="er_size_model" string="尺寸型号"/>
|
||||
<label for="min_clamping_diameter" string="夹持直径"/>
|
||||
<div class="test_model">
|
||||
<label for="min_clamping_diameter" string="最小"/>
|
||||
<field name="min_clamping_diameter" class="o_address_zip diameter"
|
||||
options="{'format': false}"/>
|
||||
<label for="max_clamping_diameter" string="最大"/>
|
||||
<field name="max_clamping_diameter" class="o_address_zip diameter"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="total_length"/>
|
||||
<field name="outer_diameter" class="diameter"/>
|
||||
<field name="inner_diameter" class="diameter"/>
|
||||
<field name="taper"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')]}">
|
||||
<field name="run_out_accuracy"/>
|
||||
<field name="top_diameter" class="diameter"/>
|
||||
<field name="weight"/>
|
||||
<field name="max_load_capacity"/>
|
||||
<field name="cooling_jacket"/>
|
||||
</group>
|
||||
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}">
|
||||
<field name="taper_shank_model"/>
|
||||
<field name="total_length"/>
|
||||
<field name="shank_length"/>
|
||||
<field name="shank_diameter" class="diameter"/>
|
||||
<field name="flange_shank_length"/>
|
||||
<field name="flange_diameter" class="diameter"/>
|
||||
<field name="diameter_slip_accuracy"/>
|
||||
<field name="dynamic_balance_class"/>
|
||||
</group>
|
||||
<group attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}">
|
||||
<label for="min_clamping_diameter" string="夹持直径"/>
|
||||
<div class="test_model">
|
||||
<label for="min_clamping_diameter" string="最小"/>
|
||||
<field name="min_clamping_diameter" class="o_address_zip diameter"
|
||||
options="{'format': false}"/>
|
||||
<label for="max_clamping_diameter" string="最大"/>
|
||||
<field name="max_clamping_diameter" class="o_address_zip diameter"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="max_rotate_speed"/>
|
||||
<field name="fit_chuck_size"/>
|
||||
<field name="nut"/>
|
||||
<field name="spanner"/>
|
||||
<field name="clamping_mode"/>
|
||||
<field name="tool_changing_time"/>
|
||||
<field name="cooling_model"/>
|
||||
<field name="is_quick_cutting"/>
|
||||
<field name="is_safe_lock"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_sf_tool_materials_basic_parameters" model="ir.actions.act_window">
|
||||
<field name="name">基础参数</field>
|
||||
<field name="res_model">sf.tool.materials.basic.parameters</field>
|
||||
<field name="view_mode">tree</field>
|
||||
|
||||
<!-- <field name="context">{'selection_mode': 'single'}</field>-->
|
||||
<field name="view_mode">form</field>
|
||||
<field name="context">{'default_cutting_tool_type': cutting_tool_type}</field>
|
||||
<field name="domain">[]</field>
|
||||
<!-- <field name="multi">false</field>-->
|
||||
<!-- <field name="multi">false</field>-->
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<field name="name">刀具标准库</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.cutting_tool.standard.library</field>
|
||||
<!-- <field name="context">{'default_cutting_tool_material_id': cutting_tool_material_id}</field>-->
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- 功能刀具action -->
|
||||
|
||||
@@ -123,19 +123,19 @@
|
||||
<form string="刀具标准库" delete="0" create="0" edit="0">
|
||||
<sheet>
|
||||
<field name="image" widget='image' class="oe_avatar"
|
||||
options="{'zoom': true, 'preview_image':'image_128'}"/>
|
||||
options="{'zoom': true, 'preview_image':'image_128'}" required="1"/>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="code"/>
|
||||
<field name="code" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="cutting_tool_material_id"/>
|
||||
<field name="cutting_tool_type"/>
|
||||
<field name="cutting_tool_type_id"/>
|
||||
<field name="brand_id"/>
|
||||
<field name="cutting_tool_material_id" readonly="1"/>
|
||||
<field name="cutting_tool_type" invisible="1"/>
|
||||
<field name="cutting_tool_type_id" required="1"/>
|
||||
<field name="brand_id" required="1"/>
|
||||
<label for="integral_run_out_accuracy_min" string="端跳精度"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '整体式刀具')]}"/>
|
||||
<div class="o_address_format"
|
||||
@@ -165,8 +165,7 @@
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="material_model_id" placeholder="请选择" string="材质"
|
||||
attrs="{'required': [('cutting_tool_type', 'not in', ['刀柄', '夹头'])]}"/>
|
||||
<field name="material_model_id" placeholder="请选择" string="材质"/>
|
||||
<field name="tool_hardness" string="硬度(hrc)" options="{'format': false}"
|
||||
widget="integer"/>
|
||||
<field name="coating_material"/>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<field name="materials_id" string="材料" placeholder="请选择" options="{'no_create': True}"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="materials_type_id" string="型号" placeholder="请选择" options="{'no_create': True}"
|
||||
domain="[('materials_id', '=', materials_id)]"
|
||||
attrs="{'invisible': [('categ_type', 'not in', ['成品','坯料', '原材料'])],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="server_product_process_parameters_id" string="表面工艺参数"
|
||||
options="{'no_create': True}"
|
||||
@@ -32,9 +31,14 @@
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||
placeholder="请选择"/>
|
||||
<field name="cutting_tool_model_id" placeholder="请选择" class="custom_required"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"/>
|
||||
domain="[('cutting_tool_material_id','=',cutting_tool_material_id)]"
|
||||
context="{'default_cutting_tool_material_id': cutting_tool_material_id}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}">
|
||||
</field>
|
||||
<!-- <button name="%(sf_base.action_sf_cutting_tool_standard_library)d" string="新建" type="action"-->
|
||||
<!-- context="{'default_cutting_tool_material_id': cutting_tool_material_id}"/>-->
|
||||
<field name="specification_id" placeholder="请选择" class="custom_required"
|
||||
context="{'default_cutting_tool_type': cutting_tool_type,'default_standard_library_id':cutting_tool_model_id}"
|
||||
attrs="{'invisible': [('categ_type', '!=', '刀具')],'required': [('categ_type', '=', '刀具')],'readonly': [('id', '!=', False)]}"
|
||||
domain="[('standard_library_id','=',cutting_tool_model_id)]"/>
|
||||
<field name="fixture_material_id" attrs="{'invisible': [('categ_type', '!=', '夹具')]}"
|
||||
@@ -90,7 +94,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
|
||||
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
||||
<field name="name">product.template.only.form.inherit.sf</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
@@ -104,7 +108,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_product_template_only_form_inherit_sf">
|
||||
<record model="ir.ui.view" id="view_product_template_only_dlm_form_inherit_sf">
|
||||
<field name="name">product.template.only.form.inherit.sf</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="sf_dlm_management.view_sale_product_template_form_inherit_sf"/>
|
||||
@@ -142,6 +146,10 @@
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="tool_height"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀杆')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_shank_length" string="刀柄长度(mm)"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_shank_diameter" string="刀柄直径(mm)" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_flange_diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_flange_length"
|
||||
@@ -258,7 +266,7 @@
|
||||
<span>(mm)&nbsp;</span>
|
||||
</div>
|
||||
<field name="cutting_tool_clamping_way"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('刀柄','夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_top_diameter" class="diameter"
|
||||
attrs="{'invisible': [('cutting_tool_type','not in',('夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_outer_diameter" class="diameter"
|
||||
@@ -297,7 +305,7 @@
|
||||
<field name="tool_weight"
|
||||
attrs='{"invisible": [("cutting_tool_type","not in",("夹头","刀柄"))],"readonly": [("id", "!=", False)]}'/>
|
||||
<field name="cutting_tool_taper"
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头','刀柄'))],'readonly': [('id', '!=', False)]}"/>
|
||||
attrs="{'invisible': [('cutting_tool_type', 'not in', ('夹头'))],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_taper_shank_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '刀柄')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_dynamic_balance_class"
|
||||
@@ -340,9 +348,9 @@
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_er_size_model"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="cutting_tool_handle_id"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!-- <field name="cutting_tool_handle_id"-->
|
||||
<!-- options="{'no_create': True}"-->
|
||||
<!-- attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>-->
|
||||
<field name="cooling_suit_type_ids"
|
||||
attrs="{'invisible': [('cutting_tool_type', '!=', '夹头')],'readonly': [('id', '!=', False)]}"/>
|
||||
<!-- 刀杆 -->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_equipment_maintenance_standards,equipment_maintenance_standards,model_equipment_maintenance_standards,sf_maintenance.sf_group_equipment_user,1,1,1,0
|
||||
access_equipment_maintenance_standards_manager,equipment_maintenance_standards,model_equipment_maintenance_standards,sf_maintenance.sf_group_equipment_manager,1,1,1,1
|
||||
access_equipment_maintenance_standards,equipment_maintenance_standards,model_equipment_maintenance_standards,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_maintenance_logs_sf_group_equipment_user,sf_maintenance_logs,model_sf_maintenance_logs,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_maintenance_logs_sf_group_equipment_manager,sf_maintenance_logs,model_sf_maintenance_logs,sf_maintenance.sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_equipment_sf_group_equipment_user,maintenance_equipment,model_maintenance_equipment,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
@@ -9,7 +10,7 @@ access_maintenance_equipment_oee,maintenance_equipment_oee,model_maintenance_equ
|
||||
access_maintenance_equipment_oee_logs_sf_group_equipment_user,maintenance_equipment_oee_logs,model_maintenance_equipment_oee_logs,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_equipment_oee_logs,maintenance_equipment_oee_logs,model_maintenance_equipment_oee_logs,sf_maintenance.sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_standards_sf_group_equipment_user,maintenance_standards,model_maintenance_standards,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,sf_maintenance.sf_group_equipment_manager,1,1,1,0
|
||||
access_maintenance_standards,maintenance_standards,model_maintenance_standards,sf_maintenance.sf_group_equipment_manager,1,1,1,1
|
||||
access_maintenance_standard_image_sf_group_equipment_user,maintenance_standard_image,model_maintenance_standard_image,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_maintenance_standard_image,maintenance_standard_image,model_maintenance_standard_image,sf_maintenance.sf_group_equipment_manager,1,1,1,0
|
||||
access_sf_robot_axis_num_sf_group_equipment_user,sf_robot_axis_num,model_sf_robot_axis_num,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
@@ -41,16 +42,13 @@ access_sf_machine_brand_tags_sf_group_equipment_user,sf_machine_brand_tags,sf_ba
|
||||
access_sf_machine_brand_tags_admin_sf_group_equipment_user,sf_machine_brand_tags_admin,sf_base.model_sf_machine_brand_tags,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_machine_control_system_sf_group_equipment_user,sf_machine_control_system,sf_base.model_sf_machine_control_system,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_machine_control_system_admin_sf_group_equipment_user,sf_machine_control_system_admin,sf_base.model_sf_machine_control_system,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_processing_order_sf_group_equipment_user,sf_processing_order,sf_base.model_sf_processing_order,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_processing_order_admin_sf_group_equipment_user,sf_processing_order_admin,sf_base.model_sf_processing_order,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_production_process_sf_group_equipment_user,sf_production_process,sf_base.model_sf_production_process,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_production_process_admin_sf_group_equipment_user,sf_production_process_admin,sf_base.model_sf_production_process,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_production_materials_sf_group_equipment_user,sf_production_materials,sf_base.model_sf_production_materials,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_production_materials_admin_sf_group_equipment_user,sf_production_materials_admin,sf_base.model_sf_production_materials,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_materials_model_sf_group_equipment_user,sf_materials_model,sf_base.model_sf_materials_model,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_materials_model_admin_sf_group_equipment_user,sf_materials_model_admin,sf_base.model_sf_materials_model,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_processing_technology_sf_group_equipment_user,sf_processing_technology,sf_base.model_sf_processing_technology,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_processing_technology_admin_sf_group_equipment_user,sf_processing_technology_admin,sf_base.model_sf_processing_technology,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
|
||||
access_sf_supplier_sort_sf_group_equipment_user,sf_supplier_sort,sf_base.model_sf_supplier_sort,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_supplier_sort_admin_sf_group_equipment_user,sf_supplier_sort_admin,sf_base.model_sf_supplier_sort,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
access_sf_production_process_parameter_sf_group_equipment_user,sf_production_process_parameter,sf_base.model_sf_production_process_parameter,sf_maintenance.sf_group_equipment_user,1,0,0,0
|
||||
|
||||
|
@@ -31,7 +31,7 @@
|
||||
<notebook>
|
||||
<page string="维保项目">
|
||||
|
||||
<field name="maintenance_standards_ids" >
|
||||
<field name="maintenance_standards_ids" delete="1">
|
||||
<tree editable="bottom" >
|
||||
<field name="name" />
|
||||
<field name="fault_type" />
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_category_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='technician_user_id']" position="before">
|
||||
<field name="equipment_type"/>
|
||||
<field name="equipment_type_code" required='1'/>
|
||||
<field name="equipment_type" class="custom_required"/>
|
||||
<field name="equipment_type_code" required='1' class="custom_required"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
<field name="equipment_maintenance_id"/>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="replace">
|
||||
<field name="user_id" string="维保人"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='close_date']" position="replace">
|
||||
<field name="close_date" attrs="{'invisible': [('done', '!=', True)]}" readonly="True" string="维保日期"/>
|
||||
</xpath>
|
||||
|
||||
<sheet>
|
||||
|
||||
<notebook>
|
||||
@@ -92,6 +99,7 @@
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
|
||||
</sheet>
|
||||
|
||||
|
||||
|
||||
@@ -982,16 +982,16 @@
|
||||
|
||||
<xpath expr="//field[@name='next_action_date']" position="before">
|
||||
|
||||
<field name='eq_maintenance_id' force_save="1" widget="many2one"/>
|
||||
<field name='eq_maintenance_id' force_save="1" widget="many2one" class="custom_required"/>
|
||||
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[hasclass('o_row')][field[@name='maintenance_duration']]" position="after">
|
||||
|
||||
|
||||
<field name='overhaul_id'/>
|
||||
<field name='overhaul_id' class="custom_required"/>
|
||||
<field name="overhaul_date" string="下次预防检修"/>
|
||||
<label for="overhaul_period" string="预防检修频次"/>
|
||||
<label for="overhaul_period" string="预防检修频次" class="custom_required"/>
|
||||
<div class="o_row">
|
||||
<field name="overhaul_period"/>
|
||||
days
|
||||
@@ -1188,7 +1188,7 @@
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="type" readonly="1"/>
|
||||
<field name="image" widget="image" readonly="1"/>
|
||||
<field name="equipment_id"/>
|
||||
<!-- <field name="equipment_id"/>-->
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from . import controllers
|
||||
from . import workpiece
|
||||
|
||||
40
sf_manufacturing/controllers/workpiece.py
Normal file
40
sf_manufacturing/controllers/workpiece.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
import json
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
|
||||
|
||||
class Workpiece(http.Controller):
|
||||
|
||||
@http.route('/agvApi/backfeed', type='json', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
cors="*")
|
||||
def backfeed(self, **kw):
|
||||
"""
|
||||
agv小车反馈工单(工件)结果
|
||||
:param kw:
|
||||
:return:
|
||||
"""
|
||||
logging.info('backfeed:%s' % kw)
|
||||
try:
|
||||
res = {'Succeed': True}
|
||||
datas = request.httprequest.data
|
||||
ret = json.loads(datas)
|
||||
logging.info('backfeed-ret:%s' % ret)
|
||||
if 'reqCode' in ret:
|
||||
if 'method' in ret:
|
||||
if ret['method'] == 'end':
|
||||
workpiece_delivery = request.env['sf.workpiece.delivery'].sudo().search(
|
||||
[('production_id.name', '=', ret['reqCode'])])
|
||||
if workpiece_delivery:
|
||||
workpiece_delivery.write({'status': '已配送', 'task_completion_time': ret['reqTime']})
|
||||
else:
|
||||
res = {'Succeed': False, 'ErrorCode': 203, 'Error': '该reqCode暂未查到对应的工件配送记录'}
|
||||
else:
|
||||
res = {'Succeed': False, 'ErrorCode': 204, 'Error': '未传method字段'}
|
||||
else:
|
||||
res = {'Succeed': False, 'ErrorCode': 201, 'Error': '未传reqCode字段'}
|
||||
except Exception as e:
|
||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||
logging.info('backfeed error:%s' % e)
|
||||
return json.JSONEncoder().encode(res)
|
||||
@@ -236,7 +236,16 @@ class ResMrpWorkOrder(models.Model):
|
||||
# if not item.workpiece_code:
|
||||
# raise UserError('请对【同运工件】进行扫描')
|
||||
else:
|
||||
item.write({'task_delivery_time': fields.Datetime.now(), 'status': '待配送'})
|
||||
if item.status == '待下发':
|
||||
return {
|
||||
'name': _('确认'),
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'sf.workpiece.delivery.wizard',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_workorder_id': self.id,
|
||||
}}
|
||||
|
||||
# 拼接工单对象属性值
|
||||
def json_workorder_str(self, k, production, route):
|
||||
@@ -899,7 +908,25 @@ class WorkPieceDelivery(models.Model):
|
||||
|
||||
# 配送至avg小车
|
||||
def _delivery_avg(self):
|
||||
res = {'reqCode': self.production_id.name, 'reqTime': '', 'clientCode': '', 'tokenCode': '',
|
||||
'taskTyp': 'F01', 'ctnrTyp': '', 'ctnrCode': '', 'wbCode': '', 'positionCodePath': [], 'podCode': '',
|
||||
'podDir': '', 'materialLot': '', 'priority': '', 'taskCode': '', 'agvCode': '', 'materialLot': '',
|
||||
'data': ''}
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
try:
|
||||
logging.info('config-AGV请求路径:%s' % config['agv_rcms_url'])
|
||||
logging.info('config-json:%s' % res)
|
||||
ret = requests.post((config['agv_rcms_url']), json=res)
|
||||
ret = ret.json()
|
||||
logging.info('config-ret:%s' % ret)
|
||||
if ret['code'] == 0:
|
||||
if self.production_id.name == ret['reqCode']:
|
||||
self.write({'task_delivery_time': fields.Datetime.now(), 'status': '待配送'})
|
||||
else:
|
||||
raise UserError(ret['message'])
|
||||
except Exception as e:
|
||||
logging.info('config-e:%s' % e)
|
||||
raise UserError("工件配送请求agv失败")
|
||||
|
||||
@api.depends('production_id.production_line_id')
|
||||
def _compute_production_line_id(self):
|
||||
|
||||
@@ -6,6 +6,8 @@ import os
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.modules import get_resource_path
|
||||
|
||||
|
||||
from OCC.Extend.DataExchange import read_step_file
|
||||
from OCC.Extend.DataExchange import write_stl_file
|
||||
|
||||
@@ -39,7 +41,8 @@ class ResProductMo(models.Model):
|
||||
product_model_type_id = fields.Many2one('sf.model.type', string='产品模型类型')
|
||||
embryo_model_type_id = fields.Many2one('sf.model.type', string='坯料模型类型')
|
||||
materials_id = fields.Many2one('sf.production.materials', string='材料')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号')
|
||||
materials_type_id = fields.Many2one('sf.materials.model', string='材料型号',
|
||||
domain="[('materials_id', '=', materials_id)]")
|
||||
server_product_process_parameters_id = fields.Many2one('sf.production.process.parameter',
|
||||
string='表面工艺参数(服务产品)')
|
||||
model_process_parameters_ids = fields.Many2many('sf.production.process.parameter', 'process_parameter_rel',
|
||||
@@ -68,7 +71,8 @@ class ResProductMo(models.Model):
|
||||
cutting_tool_shank_length = fields.Float('柄部长度(mm)', digits=(6, 1))
|
||||
cutting_tool_blade_length = fields.Float('刃部长度(mm)')
|
||||
cutting_tool_blade_number = fields.Selection(
|
||||
[('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')], '刃数(个)')
|
||||
[('0', '0'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5'), ('6', '6'), ('7', '7'), ('8', '8')],
|
||||
string='刃数(个)', default='0')
|
||||
# 整体式刀具新增字段
|
||||
cutting_tool_neck_length = fields.Float('颈部长度(mm)', digits=(6, 1))
|
||||
cutting_tool_neck_diameter = fields.Float('颈部直径(mm)', digits=(6, 1))
|
||||
@@ -101,6 +105,10 @@ class ResProductMo(models.Model):
|
||||
compaction_way_id = fields.Many2one('maintenance.equipment.image',
|
||||
'压紧方式', domain=[('type', '=', '压紧方式')])
|
||||
|
||||
@api.onchange('cutting_tool_model_id')
|
||||
def _onchange_cutting_tool_model_id(self):
|
||||
self.specification_id = False
|
||||
|
||||
@api.onchange('cutting_tool_material_id')
|
||||
def _onchange_cutting_tool_material_id(self):
|
||||
for item in self:
|
||||
@@ -190,20 +198,24 @@ class ResProductMo(models.Model):
|
||||
self.cutting_tool_blade_number = self.specification_id.blade_number
|
||||
self.cutting_tool_blade_type = self.cutting_tool_model_id.blade_type
|
||||
self.cutting_tool_shank_diameter = self.specification_id.handle_diameter
|
||||
self.cutting_tool_shank_length = self.specification_id.handle_length
|
||||
self.cutting_tool_neck_length = self.specification_id.neck_length
|
||||
self.cutting_tool_neck_diameter = self.specification_id.neck_diameter
|
||||
self.cutting_tool_blade_tip_diameter = self.specification_id.blade_tip_diameter
|
||||
self.cutting_tool_blade_tip_taper = self.specification_id.blade_tip_taper
|
||||
self.cutting_tool_blade_helix_angle = self.specification_id.blade_helix_angle
|
||||
self.cutting_tool_blade_tip_working_size = self.specification_id.blade_tip_working_size
|
||||
self.cutting_tool_pitch = self.specification_id.pitch
|
||||
self.cutting_tool_blade_width = self.specification_id.blade_width
|
||||
self.cutting_tool_blade_depth = self.specification_id.blade_depth
|
||||
self.cutting_tool_cut_depth = self.specification_id.cutting_depth
|
||||
self.cutting_tool_cut_depth_max = self.specification_id.cut_depth_max
|
||||
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
|
||||
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids.filtered(
|
||||
lambda r: int(r.blade_diameter) == int(self.specification_id.blade_diameter))
|
||||
elif self.cutting_tool_type == '夹头':
|
||||
self.cutting_tool_clamping_diameter_min = self.specification_id.min_clamping_diameter
|
||||
self.cutting_tool_clamping_diameter_min = self.specification_id.max_clamping_diameter
|
||||
self.cutting_tool_clamping_way = self.specification_id.clamping_mode
|
||||
self.cutting_tool_clamping_diameter_max = self.specification_id.max_clamping_diameter
|
||||
self.cutting_tool_taper = self.specification_id.taper
|
||||
self.cutting_tool_top_diameter = self.specification_id.top_diameter
|
||||
self.cutting_tool_outer_diameter = self.specification_id.outer_diameter
|
||||
self.cutting_tool_inner_diameter = self.specification_id.inner_diameter
|
||||
@@ -241,6 +253,7 @@ class ResProductMo(models.Model):
|
||||
self.cutting_speed_ids = self.cutting_tool_model_id.cutting_speed_ids
|
||||
self.feed_per_tooth_ids = self.cutting_tool_model_id.feed_per_tooth_ids
|
||||
elif self.cutting_tool_type in ('刀盘', '刀杆'):
|
||||
self.cutting_tool_blade_diameter = self.specification_id.blade_diameter
|
||||
self.cutting_tool_total_length = self.specification_id.total_length
|
||||
self.tool_length = self.specification_id.length
|
||||
self.tool_thickness = self.specification_id.thickness
|
||||
@@ -271,14 +284,19 @@ class ResProductMo(models.Model):
|
||||
self.cutting_tool_cutter_head_diameter = self.specification_id.cutter_head_diameter
|
||||
self.cutting_tool_interface_diameter = self.specification_id.interface_diameter
|
||||
else:
|
||||
self.cutting_tool_cutter_arbor_diameter = self.specification_id.cutter_arbor_diameter
|
||||
self.cutting_tool_knife_head_height = self.specification_id.knife_head_height
|
||||
self.cutting_tool_knife_head_width = self.specification_id.knife_head_width
|
||||
self.cutting_tool_knife_head_length = self.specification_id.knife_head_length
|
||||
self.cutting_tool_tool_shim = self.specification_id.tool_shim
|
||||
self.cutting_tool_cotter_pin = self.specification_id.cotter_pin
|
||||
self.cutting_tool_pressing_plate = self.specification_id.pressing_plate
|
||||
self.cutting_tool_min_machining_aperture = self.specification_id.min_machining_aperture
|
||||
self.cutting_tool_rear_angle = self.specification_id.relief_angle
|
||||
elif self.cutting_tool_type == '刀柄':
|
||||
self.cutting_tool_total_length = self.specification_id.total_length
|
||||
self.cutting_tool_shank_diameter = self.specification_id.shank_diameter
|
||||
self.cutting_tool_shank_length = self.specification_id.shank_length
|
||||
self.cutting_tool_speed_max = self.specification_id.max_rotate_speed
|
||||
self.cutting_tool_change_time = self.specification_id.tool_changing_time
|
||||
self.cutting_tool_total_length = self.specification_id.total_length
|
||||
@@ -295,6 +313,8 @@ class ResProductMo(models.Model):
|
||||
self.cutting_tool_chuck_id = self.specification_id.chuck_id.id
|
||||
self.cutting_tool_jump_accuracy = self.specification_id.diameter_slip_accuracy
|
||||
self.cutting_tool_taper_shank_model = self.specification_id.taper_shank_model
|
||||
self.cutting_tool_cooling_type = self.specification_id.cooling_model
|
||||
self.cutting_tool_clamping_way = self.specification_id.clamping_mode
|
||||
self.suitable_machining_method_ids = [(6, 0, [])] if not \
|
||||
self.cutting_tool_model_id.suitable_machining_method_ids \
|
||||
else [(6, 0, self.cutting_tool_model_id.suitable_machining_method_ids.ids)]
|
||||
@@ -350,30 +370,30 @@ class ResProductMo(models.Model):
|
||||
self.cutting_speed_ids = False
|
||||
self.feed_per_tooth_ids = False
|
||||
|
||||
@api.constrains('fit_blade_shape_id', 'suitable_machining_method_ids', 'blade_tip_characteristics_id',
|
||||
'handle_type_id', 'cutting_direction_ids', 'suitable_coolant_ids', 'compaction_way_id')
|
||||
def _check_cutting_tool_ability(self):
|
||||
if self.cutting_tool_type in ['整体式刀具', '刀片', '刀杆', '刀盘']:
|
||||
if self.cutting_tool_type in ['刀片', '刀杆', '刀盘']:
|
||||
if not self.fit_blade_shape_id:
|
||||
raise ValidationError("请选择适配刀片形状")
|
||||
if self.cutting_tool_type in ['刀杆', '刀盘']:
|
||||
if not self.compaction_way_id:
|
||||
raise ValidationError("请选择压紧方式")
|
||||
if self.cutting_tool_type == '刀片':
|
||||
if not self.suitable_coolant_ids:
|
||||
raise ValidationError("请选择适合冷却方式")
|
||||
elif self.cutting_tool_type == '整体式刀具':
|
||||
if not self.handle_type_id:
|
||||
raise ValidationError("请选择柄部类型")
|
||||
if not self.suitable_coolant_ids:
|
||||
raise ValidationError("请选择适合冷却方式")
|
||||
if not self.suitable_machining_method_ids:
|
||||
raise ValidationError("请选择适合加工方式")
|
||||
if not self.blade_tip_characteristics_id:
|
||||
raise ValidationError("请选择刀尖特征")
|
||||
if not self.cutting_direction_ids:
|
||||
raise ValidationError("请选择走刀方向")
|
||||
# @api.constrains('fit_blade_shape_id', 'suitable_machining_method_ids', 'blade_tip_characteristics_id',
|
||||
# 'handle_type_id', 'cutting_direction_ids', 'suitable_coolant_ids', 'compaction_way_id')
|
||||
# def _check_cutting_tool_ability(self):
|
||||
# if self.cutting_tool_type in ['整体式刀具', '刀片', '刀杆', '刀盘']:
|
||||
# if self.cutting_tool_type in ['刀片', '刀杆', '刀盘']:
|
||||
# if not self.fit_blade_shape_id:
|
||||
# raise ValidationError("请选择适配刀片形状")
|
||||
# if self.cutting_tool_type in ['刀杆', '刀盘']:
|
||||
# if not self.compaction_way_id:
|
||||
# raise ValidationError("请选择压紧方式")
|
||||
# if self.cutting_tool_type == '刀片':
|
||||
# if not self.suitable_coolant_ids:
|
||||
# raise ValidationError("请选择适合冷却方式")
|
||||
# elif self.cutting_tool_type == '整体式刀具':
|
||||
# if not self.handle_type_id:
|
||||
# raise ValidationError("请选择柄部类型")
|
||||
# if not self.suitable_coolant_ids:
|
||||
# raise ValidationError("请选择适合冷却方式")
|
||||
# if not self.suitable_machining_method_ids:
|
||||
# raise ValidationError("请选择适合加工方式")
|
||||
# if not self.blade_tip_characteristics_id:
|
||||
# raise ValidationError("请选择刀尖特征")
|
||||
# if not self.cutting_direction_ids:
|
||||
# raise ValidationError("请选择走刀方向")
|
||||
|
||||
cutting_speed_ids = fields.One2many('sf.cutting.speed', 'product_template_id', string='切削速度Vc')
|
||||
feed_per_tooth_ids = fields.One2many('sf.feed.per.tooth', 'product_template_id', string='每齿走刀量fz')
|
||||
|
||||
@@ -108,9 +108,9 @@ access_sf_production_line_group_plan_dispatch,sf.production.line,model_sf_produc
|
||||
access_sf_production_line_group_plan_director,sf.production.line,model_sf_production_line,sf_base.group_plan_director,1,1,1,0
|
||||
access_sf_production_line,sf.production.line,model_sf_production_line,sf_maintenance.sf_group_equipment_user,1,1,1,0
|
||||
access_mrp_workcenter,mrp_workcenter,model_mrp_workcenter,sf_base.group_plan_dispatch,1,1,1,0
|
||||
access_mrp_bom,mrp.bom,mrp.model_mrp_bom,sf_base.group_plan_dispatch,1,1,1,0
|
||||
access_mrp_bom_group_plan_dispatch,mrp.bom,mrp.model_mrp_bom,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_mrp_bom_line,mrp.bom.line,mrp.model_mrp_bom_line,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_mrp_unbuild,mrp.unbuild,mrp.model_mrp_unbuild,sf_base.group_plan_dispatch,1,1,1,0
|
||||
access_mrp_unbuild_group_plan_dispatch,mrp.unbuild,mrp.model_mrp_unbuild,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_stock_scrap_group_plan_dispatch,stock.scrap,stock.model_stock_scrap,sf_base.group_plan_dispatch,1,0,0,0
|
||||
|
||||
access_sf_model_type,sf.model.type,model_sf_model_type,sf_base.group_plan_dispatch,1,1,1,0
|
||||
|
||||
|
@@ -542,7 +542,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="工件配送">
|
||||
<header>
|
||||
<button name="button_delivery" type="object" string="配送"/>
|
||||
<button name="button_delivery" type="object" string="配送" class="oe_highlight"/>
|
||||
</header>
|
||||
<field name="status" widget="badge"
|
||||
decoration-success="status == '已配送'"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<field name="delivery_id" invisible="True"/>
|
||||
<field name="workorder_id" invisible="True"/>
|
||||
|
||||
<div>
|
||||
是否确定配送?
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,11 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
||||
_description = '工件配送'
|
||||
|
||||
delivery_id = fields.Many2one('sf.workpiece.delivery', string='配送')
|
||||
workorder_id = fields.Many2one('mrp.workorder', string='工单')
|
||||
|
||||
def confirm(self):
|
||||
if self.workorder_id:
|
||||
self.workorder_id.workpiece_delivery_ids._delivery_avg()
|
||||
else:
|
||||
self.delivery_id._delivery_avg()
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@ class ResConfigSettings(models.TransientModel):
|
||||
token = fields.Char(string='TOKEN', default='b811ac06-3f00-11ed-9aed-0242ac110003')
|
||||
sf_secret_key = fields.Char(string='密钥', default='wBmxej38OkErKhD6')
|
||||
sf_url = fields.Char(string='访问地址', default='https://sf.cs.jikimo.com')
|
||||
agv_url = fields.Char(string='avg访问地址', default='http://IP:PORT/rcms/services/rest')
|
||||
agv_rcms_url = fields.Char(string='avg_rcms访问地址',
|
||||
default='http://IP:PORT/rcms/services/rest/hikRpcService/genAgvSchedulingTask')
|
||||
agv_rcs_url = fields.Char(string='avg_rcs访问地址', default='http://IP:PORT/xxx/agv/agvCallbackService/agvCallback')
|
||||
model_parser_url = fields.Char('特征识别路径')
|
||||
ftp_host = fields.Char(string='FTP的ip')
|
||||
ftp_port = fields.Char(string='FTP端口')
|
||||
@@ -34,8 +36,8 @@ class ResConfigSettings(models.TransientModel):
|
||||
_logger.info("同步资源库表面工艺类别完成")
|
||||
self.env['sf.production.process'].sync_all_production_process()
|
||||
_logger.info("同步资源库表面工艺完成")
|
||||
self.env['sf.processing.technology'].sync_all_processing_technology()
|
||||
_logger.info("同步资源库加工工艺")
|
||||
# self.env['sf.processing.technology'].sync_all_processing_technology()
|
||||
# _logger.info("同步资源库加工工艺")
|
||||
self.env['sf.machine.brand.tags'].sync_all_machine_brand_tags()
|
||||
_logger.info("同步资源库品牌类别完成")
|
||||
self.env['sf.machine.brand'].sync_all_machine_brand()
|
||||
@@ -90,6 +92,8 @@ class ResConfigSettings(models.TransientModel):
|
||||
token = config.get_param('token', default='')
|
||||
sf_secret_key = config.get_param('sf_secret_key', default='')
|
||||
sf_url = config.get_param('sf_url', default='')
|
||||
agv_rcms_url = config.get_param('agv_rcms_url', default='')
|
||||
agv_rcs_url = config.get_param('agv_rcs_url', default='')
|
||||
ftp_host = config.get_param('ftp_host', default='')
|
||||
ftp_port = config.get_param('ftp_port', default='')
|
||||
ftp_user = config.get_param('ftp_user', default='')
|
||||
@@ -99,6 +103,8 @@ class ResConfigSettings(models.TransientModel):
|
||||
token=token,
|
||||
sf_secret_key=sf_secret_key,
|
||||
sf_url=sf_url,
|
||||
agv_rcms_url=agv_rcms_url,
|
||||
agv_rcs_url=agv_rcs_url,
|
||||
ftp_host=ftp_host,
|
||||
ftp_port=ftp_port,
|
||||
ftp_user=ftp_user,
|
||||
@@ -112,6 +118,8 @@ class ResConfigSettings(models.TransientModel):
|
||||
ir_config.set_param("token", self.token or "")
|
||||
ir_config.set_param("sf_secret_key", self.sf_secret_key or "")
|
||||
ir_config.set_param("sf_url", self.sf_url or "")
|
||||
ir_config.set_param("agv_rcms_url", self.agv_rcms_url or "")
|
||||
ir_config.set_param("agv_rcs_url", self.agv_rcs_url or "")
|
||||
ir_config.set_param("ftp_host", self.ftp_host or "")
|
||||
ir_config.set_param("ftp_port", self.ftp_port or "")
|
||||
ir_config.set_param("ftp_user", self.ftp_user or "")
|
||||
|
||||
@@ -40,10 +40,10 @@ class MrStaticResourceDataSync(models.Model):
|
||||
logging.info("表面工艺已每日同步成功")
|
||||
self.env['sf.production.process.parameter'].sync_production_process_parameter_yesterday()
|
||||
logging.info("表面工艺可选参数已每日同步成功")
|
||||
self.env['sf.processing.technology'].sync_processing_technology_yesterday()
|
||||
logging.info("加工工艺已每日同步成功")
|
||||
self.env['sf.processing.order'].sync_processing_order_yesterday()
|
||||
logging.info("工序已同步已每日同步成功")
|
||||
# self.env['sf.processing.technology'].sync_processing_technology_yesterday()
|
||||
# logging.info("加工工艺已每日同步成功")
|
||||
# self.env['sf.processing.order'].sync_processing_order_yesterday()
|
||||
# logging.info("工序已同步已每日同步成功")
|
||||
self.env['sf.fixture.material'].sync_fixture_material_yesterday()
|
||||
logging.info("夹具物料已每日同步成功")
|
||||
self.env['sf.multi_mounting.type'].sync_multi_mounting_type_yesterday()
|
||||
@@ -367,64 +367,64 @@ class sfProductionProcess(models.Model):
|
||||
raise ValidationError("表面工艺认证未通过")
|
||||
|
||||
|
||||
class sfProcessingTechnology(models.Model):
|
||||
_inherit = 'sf.processing.technology'
|
||||
_description = '加工工艺'
|
||||
url = '/api/processing_technology/list'
|
||||
|
||||
# 定时同步加工工艺
|
||||
def sync_processing_technology_yesterday(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['processing_technology_yesterday_list']:
|
||||
if item:
|
||||
processing_technology = self.search(
|
||||
[("code", '=', item['process_encode']), ('active', 'in', [True, False])])
|
||||
if processing_technology:
|
||||
processing_technology.name = item['name']
|
||||
processing_technology.remark = item['remark']
|
||||
processing_technology.active = item['active']
|
||||
else:
|
||||
self.create({
|
||||
"name": item['name'],
|
||||
"code": item['process_encode'],
|
||||
"remark": item['remark'],
|
||||
"active": item['active'],
|
||||
})
|
||||
else:
|
||||
raise ValidationError("加工工艺认证未通过")
|
||||
|
||||
# 同步所有加工工艺
|
||||
def sync_all_processing_technology(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['processing_technology_all_list']:
|
||||
if item:
|
||||
processing_technology = self.search(
|
||||
[("code", '=', item['process_encode']), ('active', 'in', [True, False])])
|
||||
if not processing_technology:
|
||||
self.create({
|
||||
"name": item['name'],
|
||||
"code": item['process_encode'],
|
||||
"remark": item['remark'],
|
||||
"active": item['active'],
|
||||
})
|
||||
else:
|
||||
processing_technology.name = item['name']
|
||||
processing_technology.remark = item['remark']
|
||||
processing_technology.active = item['active']
|
||||
else:
|
||||
raise ValidationError("加工工艺认证未通过")
|
||||
# class sfProcessingTechnology(models.Model):
|
||||
# _inherit = 'sf.processing.technology'
|
||||
# _description = '加工工艺'
|
||||
# url = '/api/processing_technology/list'
|
||||
#
|
||||
# # 定时同步加工工艺
|
||||
# def sync_processing_technology_yesterday(self):
|
||||
# config = self.env['res.config.settings'].get_values()
|
||||
# headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
# strUrl = config['sf_url'] + self.url
|
||||
# r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
# r = r.json()
|
||||
# result = json.loads(r['result'])
|
||||
# if result['status'] == 1:
|
||||
# for item in result['processing_technology_yesterday_list']:
|
||||
# if item:
|
||||
# processing_technology = self.search(
|
||||
# [("code", '=', item['process_encode']), ('active', 'in', [True, False])])
|
||||
# if processing_technology:
|
||||
# processing_technology.name = item['name']
|
||||
# processing_technology.remark = item['remark']
|
||||
# processing_technology.active = item['active']
|
||||
# else:
|
||||
# self.create({
|
||||
# "name": item['name'],
|
||||
# "code": item['process_encode'],
|
||||
# "remark": item['remark'],
|
||||
# "active": item['active'],
|
||||
# })
|
||||
# else:
|
||||
# raise ValidationError("加工工艺认证未通过")
|
||||
#
|
||||
# # 同步所有加工工艺
|
||||
# def sync_all_processing_technology(self):
|
||||
# config = self.env['res.config.settings'].get_values()
|
||||
# headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
# strUrl = config['sf_url'] + self.url
|
||||
# r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
# r = r.json()
|
||||
# result = json.loads(r['result'])
|
||||
# if result['status'] == 1:
|
||||
# for item in result['processing_technology_all_list']:
|
||||
# if item:
|
||||
# processing_technology = self.search(
|
||||
# [("code", '=', item['process_encode']), ('active', 'in', [True, False])])
|
||||
# if not processing_technology:
|
||||
# self.create({
|
||||
# "name": item['name'],
|
||||
# "code": item['process_encode'],
|
||||
# "remark": item['remark'],
|
||||
# "active": item['active'],
|
||||
# })
|
||||
# else:
|
||||
# processing_technology.name = item['name']
|
||||
# processing_technology.remark = item['remark']
|
||||
# processing_technology.active = item['active']
|
||||
# else:
|
||||
# raise ValidationError("加工工艺认证未通过")
|
||||
|
||||
|
||||
class MachineBrandTags(models.Model):
|
||||
@@ -1000,50 +1000,50 @@ class MachineToolType(models.Model):
|
||||
raise ValidationError("机床型号认证未通过")
|
||||
|
||||
|
||||
class sfProcessingOrder(models.Model):
|
||||
_inherit = 'sf.processing.order'
|
||||
_description = '工序'
|
||||
url = '/api/processing_order/list'
|
||||
|
||||
# 定时同步工序
|
||||
def sync_processing_order_yesterday(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['processing_order_yesterday_list']:
|
||||
processing_order = self.search([("id", '=', item['id']), ('active', 'in', [True, False])])
|
||||
if processing_order:
|
||||
processing_order.sequence = item['sequence']
|
||||
else:
|
||||
self.create({
|
||||
"sequence": item['sequence'],
|
||||
})
|
||||
else:
|
||||
raise ValidationError("工序认证未通过")
|
||||
|
||||
# 同步所有工序
|
||||
def sync_all_processing_order(self):
|
||||
config = self.env['res.config.settings'].get_values()
|
||||
headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
strUrl = config['sf_url'] + self.url
|
||||
r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
r = r.json()
|
||||
result = json.loads(r['result'])
|
||||
if result['status'] == 1:
|
||||
for item in result['processing_order_all_list']:
|
||||
processing_order = self.search([("id", '=', item['id']), ('active', 'in', [True, False])])
|
||||
if not processing_order:
|
||||
self.create({
|
||||
"sequence": item['sequence'],
|
||||
})
|
||||
else:
|
||||
processing_order.sequence = item['sequence']
|
||||
else:
|
||||
raise ValidationError("工序认证未通过")
|
||||
# class sfProcessingOrder(models.Model):
|
||||
# _inherit = 'sf.processing.order'
|
||||
# _description = '工序'
|
||||
# url = '/api/processing_order/list'
|
||||
#
|
||||
# # 定时同步工序
|
||||
# def sync_processing_order_yesterday(self):
|
||||
# config = self.env['res.config.settings'].get_values()
|
||||
# headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
# strUrl = config['sf_url'] + self.url
|
||||
# r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
# r = r.json()
|
||||
# result = json.loads(r['result'])
|
||||
# if result['status'] == 1:
|
||||
# for item in result['processing_order_yesterday_list']:
|
||||
# processing_order = self.search([("id", '=', item['id']), ('active', 'in', [True, False])])
|
||||
# if processing_order:
|
||||
# processing_order.sequence = item['sequence']
|
||||
# else:
|
||||
# self.create({
|
||||
# "sequence": item['sequence'],
|
||||
# })
|
||||
# else:
|
||||
# raise ValidationError("工序认证未通过")
|
||||
#
|
||||
# # 同步所有工序
|
||||
# def sync_all_processing_order(self):
|
||||
# config = self.env['res.config.settings'].get_values()
|
||||
# headers = Common.get_headers(self, config['token'], config['sf_secret_key'])
|
||||
# strUrl = config['sf_url'] + self.url
|
||||
# r = requests.post(strUrl, json={}, data=None, headers=headers)
|
||||
# r = r.json()
|
||||
# result = json.loads(r['result'])
|
||||
# if result['status'] == 1:
|
||||
# for item in result['processing_order_all_list']:
|
||||
# processing_order = self.search([("id", '=', item['id']), ('active', 'in', [True, False])])
|
||||
# if not processing_order:
|
||||
# self.create({
|
||||
# "sequence": item['sequence'],
|
||||
# })
|
||||
# else:
|
||||
# processing_order.sequence = item['sequence']
|
||||
# else:
|
||||
# raise ValidationError("工序认证未通过")
|
||||
|
||||
|
||||
class sfProductionProcessParameter(models.Model):
|
||||
|
||||
@@ -74,9 +74,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>AGV参数配置</h2>
|
||||
<div class="row mt16 o_settings_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="text-muted">
|
||||
<label for="agv_rcms_url" string="调度系统(cms)访问地址"/>
|
||||
<field name="agv_rcms_url"/>
|
||||
</div>
|
||||
<div class="text-muted">
|
||||
<label for="agv_rcs_url" string="RCS-2000系统访问地址"/>
|
||||
<field name="agv_rcs_url"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -1,7 +1,12 @@
|
||||
import datetime
|
||||
import base64
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
READONLY_FIELD_STATES = {
|
||||
state: [('readonly', True)]
|
||||
for state in {'sale', 'done', 'cancel'}
|
||||
}
|
||||
|
||||
|
||||
class ReSaleOrder(models.Model):
|
||||
@@ -39,6 +44,12 @@ class ReSaleOrder(models.Model):
|
||||
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]")
|
||||
remark = fields.Text('备注')
|
||||
|
||||
validity_date = fields.Date(
|
||||
string="Expiration",
|
||||
compute='_compute_validity_date',
|
||||
store=True, readonly=False, copy=False, precompute=True,
|
||||
states=READONLY_FIELD_STATES, default=fields.Datetime.now)
|
||||
|
||||
# 业务平台分配工厂后在智能工厂先创建销售订单
|
||||
def sale_order_create(self, company_id, delivery_name, delivery_telephone, delivery_address,
|
||||
deadline_of_delivery, payments_way, pay_way):
|
||||
@@ -99,7 +110,7 @@ class ReSaleOrder(models.Model):
|
||||
def check_order_line(self):
|
||||
for item in self:
|
||||
if not item.order_line:
|
||||
raise UserError('请选择【订单行】中的【产品】')
|
||||
raise ValidationError('请选择【订单行】中的【产品】')
|
||||
for line in item.order_line:
|
||||
if not line.product_template_id:
|
||||
raise UserError('请对【订单行】中的【产品】进行选择')
|
||||
|
||||
@@ -24,6 +24,9 @@ access_stock_picking_group_sale_salemanager,stock_picking_group_sale_salemanager
|
||||
access_stock_picking_group_sale_director,stock_picking_group_sale_director,stock.model_stock_picking,sf_base.group_sale_director,1,0,0,0
|
||||
access_stock_picking_group_purchase,stock_picking_group_purchase,stock.model_stock_picking,sf_base.group_purchase,1,1,1,0
|
||||
access_stock_picking_group_purchase_director,stock_picking_group_purchase_director,stock.model_stock_picking,sf_base.group_purchase_director,1,1,1,0
|
||||
access_stock_picking_group_quality,stock_picking_group_quality,stock.model_stock_picking,sf_base.group_quality,1,0,0,0
|
||||
access_stock_picking_group_quality_director,stock_picking_group_quality_director,stock.model_stock_picking,sf_base.group_quality_director,1,0,0,0
|
||||
|
||||
access_account_move_group_sale_salemanager,account_move_group_sale_salemanager,account.model_account_move,sf_base.group_sale_salemanager,1,0,0,0
|
||||
access_account_move_group_sale_director,account_move_group_sale_director,account.model_account_move,sf_base.group_sale_director,1,0,0,0
|
||||
access_resource_resource_group_sale_director,resource_resource_group_sale_director,resource.model_resource_resource,sf_base.group_sale_director,1,1,1,0
|
||||
|
||||
|
@@ -23,7 +23,8 @@
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='button_confirm'][2]" position="replace">
|
||||
<button name="button_confirm" type="object" context="{'validate_analytic': True}"
|
||||
string="确认订单" id="draft_confirm" groups="sf_base.group_purchase,sf_base.group_purchase_director"
|
||||
string="确认订单" id="draft_confirm"
|
||||
groups="sf_base.group_purchase,sf_base.group_purchase_director"
|
||||
attrs="{'invisible': ['|','&','&', ('state', 'in', ['purchase','draft']), ('check_status', 'in', ['approved']), ('date_approve', '!=', False),'&', '&',('state', 'in', ['purchase', 'draft']),('check_status', 'in', [False, 'pending', 'fail']),('date_approve', '=', False)]}"
|
||||
/>
|
||||
<button name="button_confirming" type="object"
|
||||
@@ -32,13 +33,19 @@
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_rfq_send'][1]" position="replace">
|
||||
<button name="action_rfq_send" states="draft" string="通过Email发送采购单" type="object" context="{'send_rfq':True}" class="oe_highlight" data-hotkey="g" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
<button name="action_rfq_send" states="draft" string="通过Email发送采购单" type="object"
|
||||
context="{'send_rfq':True}" class="oe_highlight" data-hotkey="g"
|
||||
groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_rfq_send'][2]" position="replace">
|
||||
<button name="action_rfq_send" states="sent" string="通过Email重新发送采购单" type="object" context="{'send_rfq':True}" data-hotkey="g" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
<button name="action_rfq_send" states="sent" string="通过Email重新发送采购单" type="object"
|
||||
context="{'send_rfq':True}" data-hotkey="g"
|
||||
groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_rfq_send'][3]" position="replace">
|
||||
<button name="action_rfq_send" states="purchase" string="通过Email发送订单" type="object" context="{'send_rfq':False}" data-hotkey="g" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
<button name="action_rfq_send" states="purchase" string="通过Email发送订单" type="object"
|
||||
context="{'send_rfq':False}" data-hotkey="g"
|
||||
groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
</xpath>
|
||||
|
||||
<!-- <xpath expr="//form/header/button[@name='print_quotation[1]']" position="attributes">-->
|
||||
@@ -52,15 +59,18 @@
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//form/header/button[@name='action_create_invoice']" position="replace">
|
||||
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute> -->
|
||||
<button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute> -->
|
||||
<button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight"
|
||||
context="{'create_bill':True}"
|
||||
attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}"
|
||||
data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_create_invoice'][2]" position="attributes">
|
||||
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='button_confirm']" position="attributes">
|
||||
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
|
||||
<!-- <button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/> -->
|
||||
<!-- <button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/> -->
|
||||
</xpath>
|
||||
<!-- <xpath expr="//form/header/button[@name='action_create_invoice[2]']" position="attributes">-->
|
||||
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
|
||||
@@ -171,5 +181,16 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase_order_search_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">purchase.order.list.select.inherit.sf</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.view_purchase_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="replace">
|
||||
<field name="name" string="单据编码" filter_domain="[('name', 'ilike', self)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -243,6 +243,10 @@
|
||||
<form position="attributes">
|
||||
<attribute name="delete">False</attribute>
|
||||
</form>
|
||||
<field name="name" position="replace">
|
||||
<field name='name' placeholder="例如:奶酪汉堡" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
|
||||
</field>
|
||||
<field name="categ_id" position="replace">
|
||||
<field name='categ_id' invisible="1"/>
|
||||
</field>
|
||||
|
||||
@@ -16,7 +16,7 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', related='functional_tool_name_id.tool_groups_id')
|
||||
code = fields.Char('编码', related='functional_tool_name_id.code')
|
||||
rfid = fields.Char('rfid', readonly=True)
|
||||
name = fields.Char(related='functional_tool_name_id.name')
|
||||
name = fields.Char('名称')
|
||||
functional_tool_name_id = fields.Many2one('sf.functional.tool.assembly', string='功能刀具名称', readonly=True)
|
||||
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号', readonly=True)
|
||||
sf_cutting_tool_model_id = fields.Many2one('sf.cutting_tool.standard.library', string='刀具型号')
|
||||
@@ -69,22 +69,15 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
"""
|
||||
for obj in self:
|
||||
if obj.current_location_id:
|
||||
obj.tool_room_num = 0
|
||||
obj.line_edge_knife_library_num = 0
|
||||
obj.machine_knife_library_num = 0
|
||||
if obj.current_location in ['刀具房']:
|
||||
obj.tool_room_num = 1
|
||||
obj.line_edge_knife_library_num = 0
|
||||
obj.machine_knife_library_num = 0
|
||||
elif "线边刀库" in obj.current_location:
|
||||
obj.tool_room_num = 0
|
||||
obj.line_edge_knife_library_num = 1
|
||||
obj.machine_knife_library_num = 0
|
||||
elif "机内刀库" in obj.current_location:
|
||||
obj.tool_room_num = 0
|
||||
obj.line_edge_knife_library_num = 0
|
||||
obj.machine_knife_library_num = 1
|
||||
else:
|
||||
obj.tool_room_num = 0
|
||||
obj.line_edge_knife_library_num = 0
|
||||
obj.machine_knife_library_num = 0
|
||||
|
||||
@api.model
|
||||
def _read_group_mrs_cutting_tool_type_id(self, categories, domain, order):
|
||||
@@ -136,7 +129,6 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
@api.depends('cutting_tool_integral_model_id', 'cutting_tool_blade_model_id')
|
||||
def _compute_maintenance_equipment_image(self):
|
||||
for record in self:
|
||||
print('111')
|
||||
if record.cutting_tool_integral_model_id:
|
||||
print(record.cutting_tool_integral_model_id)
|
||||
record.sudo().suitable_machining_method_ids = record.cutting_tool_integral_model_id.suitable_machining_method_ids.ids
|
||||
@@ -194,36 +186,35 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
stock_location_id = self.env['stock.location'].search([('name', '=', '制造前')])
|
||||
# 创建功能刀具该批次/序列号 库存移动和移动历史
|
||||
self.barcode_id.create_stock_quant(location_inventory_id, stock_location_id,
|
||||
self.functional_tool_name_id.id, '机床装刀')
|
||||
self.functional_tool_name_id.id, '机床装刀', self.functional_tool_name_id)
|
||||
|
||||
# ==========刀具组接口==========
|
||||
# def _register_functional_tool_groups(self, obj):
|
||||
# create_url = '/AutoDeviceApi/ToolGroup'
|
||||
# sf_sync_config = self.env['res.config.settings'].get_values()
|
||||
# token = sf_sync_config['token']
|
||||
# sf_secret_key = sf_sync_config['sf_secret_key']
|
||||
# headers = Common.get_headers(obj, token, sf_secret_key)
|
||||
# strurl = sf_sync_config['sf_url'] + create_url
|
||||
# val = {
|
||||
# 'ToolName': obj.name,
|
||||
# 'GroupName': obj.tool_groups_id.name,
|
||||
# 'ToolId': obj.code
|
||||
# }
|
||||
# kw = json.dumps(val, ensure_ascii=False)
|
||||
# r = requests.post(strurl, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
# ret = r.json()
|
||||
# if r == 200:
|
||||
# return "刀具组发送成功"
|
||||
# else:
|
||||
# raise ValidationError("刀具组发送失败")
|
||||
|
||||
# ==========刀具组接口==========
|
||||
# def _register_functional_tool_groups(self, obj):
|
||||
# create_url = '/AutoDeviceApi/ToolGroup'
|
||||
# sf_sync_config = self.env['res.config.settings'].get_values()
|
||||
# token = sf_sync_config['token']
|
||||
# sf_secret_key = sf_sync_config['sf_secret_key']
|
||||
# headers = Common.get_headers(obj, token, sf_secret_key)
|
||||
# strurl = sf_sync_config['sf_url'] + create_url
|
||||
# val = {
|
||||
# 'ToolName': obj.name,
|
||||
# 'GroupName': obj.tool_groups_id.name,
|
||||
# 'ToolId': obj.code
|
||||
# }
|
||||
# kw = json.dumps(val, ensure_ascii=False)
|
||||
# r = requests.post(strurl, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
# ret = r.json()
|
||||
# if r == 200:
|
||||
# return "刀具组发送成功"
|
||||
# else:
|
||||
# raise ValidationError("刀具组发送失败")
|
||||
|
||||
# @api.model_create_multi
|
||||
# def create(self, vals):
|
||||
# obj = super(FunctionalCuttingToolEntity, self).create(vals)
|
||||
# # 调用刀具组接口
|
||||
# self._register_functional_tool_groups(obj)
|
||||
# return obj
|
||||
# @api.model_create_multi
|
||||
# def create(self, vals):
|
||||
# obj = super(FunctionalCuttingToolEntity, self).create(vals)
|
||||
# # 调用刀具组接口
|
||||
# self._register_functional_tool_groups(obj)
|
||||
# return obj
|
||||
|
||||
|
||||
class FunctionalToolWarning(models.Model):
|
||||
@@ -239,7 +230,8 @@ class FunctionalToolWarning(models.Model):
|
||||
group_expand='_read_group_machine_table_name_ids')
|
||||
maintenance_equipment_id = fields.Many2one('maintenance.equipment', string='CNC机床')
|
||||
machine_tool_code = fields.Char(string='机台号', related='maintenance_equipment_id.name')
|
||||
machine_table_type_id = fields.Many2one('maintenance.equipment.category', string='机床类型')
|
||||
machine_table_type_id = fields.Many2one('maintenance.equipment.category', string='机床类型',
|
||||
related='maintenance_equipment_id.category_id')
|
||||
cutter_spacing_code_id = fields.Many2one('maintenance.equipment.tool', string='刀位号',
|
||||
domain="[('equipment_id', '=', maintenance_equipment_id)]")
|
||||
# 功能刀具信息
|
||||
@@ -298,14 +290,14 @@ class StockMoveLine(models.Model):
|
||||
|
||||
functional_tool_name_id = fields.Many2one('sf.functional.tool.assembly', string='功能刀具名称')
|
||||
functional_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型', store=True,
|
||||
group_expand='_read_group_functional_tool_type_id',
|
||||
related='functional_tool_name_id.functional_tool_type_id')
|
||||
diameter = fields.Integer(string='刀具直径(mm)', related='functional_tool_name_id.functional_tool_diameter')
|
||||
knife_tip_r_angle = fields.Float(string='刀尖R角(mm)', related='functional_tool_name_id.knife_tip_r_angle')
|
||||
install_tool_time = fields.Datetime("刀具组装时间", related='functional_tool_name_id.tool_loading_time')
|
||||
code = fields.Char('编码', related='functional_tool_name_id.code')
|
||||
rfid = fields.Char('rfid', related='functional_tool_name_id.rfid')
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组', related='functional_tool_name_id.tool_groups_id')
|
||||
group_expand='_read_group_functional_tool_type_id')
|
||||
functional_tool_name = fields.Char('刀具名称')
|
||||
diameter = fields.Integer(string='刀具直径(mm)')
|
||||
knife_tip_r_angle = fields.Float(string='刀尖R角(mm)')
|
||||
install_tool_time = fields.Datetime("刀具组装时间", default=fields.Datetime.now())
|
||||
code = fields.Char('编码')
|
||||
rfid = fields.Char('rfid')
|
||||
tool_groups_id = fields.Many2one('sf.tool.groups', '刀具组')
|
||||
|
||||
@api.model
|
||||
def _read_group_functional_tool_type_id(self, categories, domain, order):
|
||||
@@ -442,17 +434,17 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
||||
计算刀具房数量、线边刀库数量、机内刀库数量
|
||||
"""
|
||||
if tool:
|
||||
tool.sudo().tool_stock_num = 0
|
||||
tool.sudo().side_shelf_num = 0
|
||||
tool.sudo().on_tool_stock_num = 0
|
||||
tool.tool_stock_num = 0
|
||||
tool.side_shelf_num = 0
|
||||
tool.on_tool_stock_num = 0
|
||||
if tool.sf_functional_cutting_tool_entity_ids:
|
||||
for cutting_tool in tool.sf_functional_cutting_tool_entity_ids:
|
||||
if cutting_tool.tool_room_num > 0:
|
||||
tool.sudo().tool_stock_num += 1
|
||||
tool.tool_stock_num += 1
|
||||
elif cutting_tool.line_edge_knife_library_num > 0:
|
||||
tool.sudo().side_shelf_num += 1
|
||||
tool.side_shelf_num += 1
|
||||
elif cutting_tool.machine_knife_library_num > 0:
|
||||
tool.sudo().on_tool_stock_num += 1
|
||||
tool.on_tool_stock_num += 1
|
||||
|
||||
def create_or_edit_safety_stock(self, vals, sf_functional_cutting_tool_entity_ids):
|
||||
"""
|
||||
@@ -479,6 +471,14 @@ class RealTimeDistributionOfFunctionalTools(models.Model):
|
||||
records = super(RealTimeDistributionOfFunctionalTools, self).create(vals_list)
|
||||
return records
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
for item in self:
|
||||
if item:
|
||||
if vals.get('min_stock_num') or vals.get('max_stock_num'):
|
||||
item.enroll_functional_tool_real_time_distribution()
|
||||
return res
|
||||
|
||||
|
||||
class MachineTableToolChangingApply(models.Model):
|
||||
_name = 'sf.machine.table.tool.changing.apply'
|
||||
|
||||
@@ -6,6 +6,30 @@ from odoo.addons.sf_base.commons.common import Common
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
def get_suitable_machining_method_names(item):
|
||||
suitable_machining_method_names = []
|
||||
for suitable_machining_method_id in item.suitable_machining_method_ids:
|
||||
if suitable_machining_method_id:
|
||||
suitable_machining_method_names.append(suitable_machining_method_id.name)
|
||||
return suitable_machining_method_names
|
||||
|
||||
|
||||
def get_cutting_direction_names(item):
|
||||
cutting_direction_names = []
|
||||
for cutting_direction_id in item.cutting_direction_ids:
|
||||
if cutting_direction_id:
|
||||
cutting_direction_names.append(cutting_direction_id.name)
|
||||
return cutting_direction_names
|
||||
|
||||
|
||||
def get_suitable_coolant_names(item):
|
||||
suitable_coolant_names = []
|
||||
for suitable_coolant_id in item.suitable_coolant_ids:
|
||||
if suitable_coolant_id:
|
||||
suitable_coolant_names.append(suitable_coolant_id.name)
|
||||
return suitable_coolant_names
|
||||
|
||||
|
||||
class StockLot(models.Model):
|
||||
_inherit = 'stock.lot'
|
||||
_description = '刀具物料序列号注册'
|
||||
@@ -25,28 +49,24 @@ class StockLot(models.Model):
|
||||
val = {
|
||||
'name': item.name,
|
||||
'tool_material_status': item.tool_material_status,
|
||||
'location': item.quant_ids[-1].location_id.name
|
||||
'location': [] if not item.quant_ids else item.quant_ids[-1].location_id.name,
|
||||
'tool_material_search_id': item.tool_material_search_id.id,
|
||||
}
|
||||
tool_material_stock_list.append(val)
|
||||
kw = json.dumps(tool_material_stock_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return '刀具物料序列号注册成功'
|
||||
else:
|
||||
raise UserError("没有注册刀具物料序列号信息")
|
||||
|
||||
@api.onchange('quant_ids')
|
||||
def _onchange_quant_ids(self):
|
||||
for item in self:
|
||||
if item.product_id.categ_id == '刀具':
|
||||
item.enroll_tool_material_stock()
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(StockLot, self).create(vals_list)
|
||||
for record in records:
|
||||
if record.product_id.categ_id == '刀具':
|
||||
if record.product_id.categ_id.name == '刀具':
|
||||
record.tool_material_status = '可用'
|
||||
record.enroll_tool_material_stock()
|
||||
return records
|
||||
|
||||
@@ -73,11 +93,11 @@ class ToolMaterial(models.Model):
|
||||
barcode_names.append(barcode_id.name)
|
||||
val = {
|
||||
'name': item.name,
|
||||
'code': item.code,
|
||||
'id': item.id,
|
||||
'cutting_tool_material_code': item.cutting_tool_material_id.code,
|
||||
'cutting_tool_standard_library_code': item.cutting_tool_standard_library_id.code,
|
||||
'specification_name': item.specification_id.name,
|
||||
'image': item.image,
|
||||
'image': '' if not item.image else base64.b64encode(item.image).decode('utf-8'),
|
||||
'number': item.number,
|
||||
'usable_num': item.usable_num,
|
||||
'have_been_used_num': item.have_been_used_num,
|
||||
@@ -89,11 +109,19 @@ class ToolMaterial(models.Model):
|
||||
kw = json.dumps(tool_material_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return '刀具物料注册成功'
|
||||
else:
|
||||
raise UserError("没有注册刀具物料信息")
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(ToolMaterial, self).create(vals_list)
|
||||
for record in records:
|
||||
if record:
|
||||
record.enroll_tool_material()
|
||||
return records
|
||||
|
||||
|
||||
class FunctionalCuttingToolEntity(models.Model):
|
||||
_inherit = 'sf.functional.cutting.tool.entity'
|
||||
@@ -116,6 +144,7 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
'id': item.id,
|
||||
'code': item.code,
|
||||
'name': item.name,
|
||||
'rfid': item.rfid,
|
||||
'tool_groups_name': item.tool_groups_id.name,
|
||||
'barcode': item.barcode_id.name,
|
||||
'cutting_tool_type_code': item.sf_cutting_tool_type_id.code,
|
||||
@@ -126,9 +155,6 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
'tool_loading_length': item.tool_loading_length,
|
||||
'functional_tool_length': item.functional_tool_length,
|
||||
'effective_length': item.effective_length,
|
||||
'tool_room_num': item.tool_room_num,
|
||||
'line_edge_knife_library_num': item.line_edge_knife_library_num,
|
||||
'machine_knife_library_num': item.machine_knife_library_num,
|
||||
'max_lifetime_value': item.max_lifetime_value,
|
||||
'alarm_value': item.alarm_value,
|
||||
'used_value': item.used_value,
|
||||
@@ -141,21 +167,24 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
'cut_time': item.cut_time,
|
||||
'cut_length': item.cut_length,
|
||||
'cut_number': item.cut_number,
|
||||
'cutting_tool_integral_model_code': item.cutting_tool_integral_model_id.code,
|
||||
'cutting_tool_blade_model_code': item.cutting_tool_blade_model_id.code,
|
||||
'cutting_tool_cutterbar_model_code': item.cutting_tool_cutterbar_model_id.code,
|
||||
'cutting_tool_cutterpad_model_code': item.cutting_tool_cutterpad_model_id.code,
|
||||
'cutting_tool_cutterhandle_model_code': item.cutting_tool_cutterhandle_model_id.code,
|
||||
'cutting_tool_cutterhead_model_code': item.cutting_tool_cutterhead_model_id.code,
|
||||
'cutting_tool_integral_model_id': item.cutting_tool_integral_model_id.tool_material_id,
|
||||
'cutting_tool_blade_model_id': item.cutting_tool_blade_model_id.tool_material_id,
|
||||
'cutting_tool_cutterbar_model_id': item.cutting_tool_cutterbar_model_id.tool_material_id,
|
||||
'cutting_tool_cutterpad_model_id': item.cutting_tool_cutterpad_model_id.tool_material_id,
|
||||
'cutting_tool_cutterhandle_model_id': item.cutting_tool_cutterhandle_model_id.tool_material_id,
|
||||
'cutting_tool_cutterhead_model_id': item.cutting_tool_cutterhead_model_id.tool_material_id,
|
||||
'suitable_machining_method_names': get_suitable_machining_method_names(item),
|
||||
'blade_tip_characteristics_name': item.blade_tip_characteristics_id.name,
|
||||
'handle_type_name': item.handle_type_id.name,
|
||||
'cutting_direction_names': get_cutting_direction_names(item),
|
||||
'suitable_coolant_names': get_suitable_coolant_names(item),
|
||||
'active': item.active,
|
||||
}
|
||||
functional_tool_list.append(val)
|
||||
kw = json.dumps(functional_tool_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
# self.code = ret['data']
|
||||
# self.state_zc = "已注册"
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具信息")
|
||||
@@ -190,11 +219,11 @@ class FunctionalToolWarning(models.Model):
|
||||
'id': item.id,
|
||||
'name': item.name,
|
||||
'code': item.code,
|
||||
'rfid': item.rfid,
|
||||
'tool_groups_name': item.tool_groups_id.name,
|
||||
'production_line': item.production_line_id.name,
|
||||
'machine_tool_id': item.maintenance_equipment_id.code,
|
||||
'machine_tool_code': item.machine_tool_code,
|
||||
'machine_table_type_code': item.machine_table_type_id.code,
|
||||
'cutter_spacing_code': item.cutter_spacing_code_id.code,
|
||||
'functional_tool_name': item.name,
|
||||
'barcode': item.barcode_id.name,
|
||||
@@ -207,18 +236,16 @@ class FunctionalToolWarning(models.Model):
|
||||
'alarm_value': item.alarm_value,
|
||||
'used_value': item.used_value,
|
||||
'functional_tool_status': item.functional_tool_status,
|
||||
'alarm_time': item.alarm_time,
|
||||
'alarm_time': item.alarm_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'dispose_user': item.dispose_user,
|
||||
'dispose_time': item.dispose_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'dispose_time': item.dispose_time,
|
||||
'dispose_func': item.dispose_func,
|
||||
}
|
||||
tool_warning_list.append(val)
|
||||
kw = json.dumps(tool_warning_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
# self.code = ret['data']
|
||||
# self.state_zc = "已注册"
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具预警注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具预警信息")
|
||||
@@ -251,8 +278,9 @@ class StockMoveLine(models.Model):
|
||||
for item in objs_all:
|
||||
val = {
|
||||
'id': item.id,
|
||||
'name': item.functional_tool_name_id.name,
|
||||
'name': item.functional_tool_name,
|
||||
'code': item.code,
|
||||
'rfid': item.rfid,
|
||||
'tool_groups_name': item.tool_groups_id.name,
|
||||
'reference': item.reference,
|
||||
'barcode': item.lot_id.name,
|
||||
@@ -269,9 +297,7 @@ class StockMoveLine(models.Model):
|
||||
kw = json.dumps(tool_stock_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
# self.code = ret['data']
|
||||
# self.state_zc = "已注册"
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具出入库记录注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具出入库记录信息")
|
||||
@@ -309,7 +335,7 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
||||
'id': item.id,
|
||||
'name': item.name,
|
||||
'tool_groups_name': item.tool_groups_id.name,
|
||||
'sf_cutting_tool_type_code': item.sf_cutting_tool_type_id.code,
|
||||
'cutting_tool_type_code': item.sf_cutting_tool_type_id.code,
|
||||
'diameter': item.diameter,
|
||||
'knife_tip_r_angle': item.knife_tip_r_angle,
|
||||
'tool_stock_num': item.tool_stock_num,
|
||||
@@ -322,17 +348,20 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
||||
'unit': item.unit,
|
||||
'image': '' if not item.image else base64.b64encode(item.image).decode('utf-8'),
|
||||
'functional_tool_codes': str(functional_tool_codes),
|
||||
'whether_standard_knife': item.whether_standard_knife,
|
||||
'coarse_middle_thin': item.coarse_middle_thin,
|
||||
'whether_standard_knife': item.whether_standard_knife,
|
||||
'suitable_machining_method_names': get_suitable_machining_method_names(item),
|
||||
'blade_tip_characteristics_name': item.blade_tip_characteristics_id.name,
|
||||
'handle_type_name': item.handle_type_id.name,
|
||||
'cutting_direction_names': get_cutting_direction_names(item),
|
||||
'suitable_coolant_names': get_suitable_coolant_names(item),
|
||||
'active': item.active
|
||||
}
|
||||
tool_distribution_list.append(val)
|
||||
kw = json.dumps(tool_distribution_list, ensure_ascii=False)
|
||||
r = requests.post(str_url, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
# self.code = ret['data']
|
||||
# self.state_zc = "已注册"
|
||||
if r == 200:
|
||||
if ret.get('code') == 200:
|
||||
return "功能刀具出入库记录注册成功"
|
||||
else:
|
||||
raise UserError("没有注册功能刀具出入库记录信息")
|
||||
@@ -341,11 +370,6 @@ class RealTimeDistributionFunctionalTools(models.Model):
|
||||
def create(self, vals_list):
|
||||
records = super(RealTimeDistributionFunctionalTools, self).create(vals_list)
|
||||
for record in records:
|
||||
if record.functional_tool_name_id:
|
||||
record.enroll_functional_tool_move()
|
||||
if record:
|
||||
record.enroll_functional_tool_real_time_distribution()
|
||||
return records
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
self.enroll_functional_tool_move()
|
||||
return res
|
||||
|
||||
@@ -98,7 +98,7 @@ class StockLot(models.Model):
|
||||
|
||||
tool_material_search_id = fields.Many2one('sf.tool.material.search', string='刀具物料搜索')
|
||||
tool_material_status = fields.Selection([('可用', '可用'), ('在用', '在用'), ('报废', '报废')], string='状态',
|
||||
compute='_compute_tool_material_status')
|
||||
compute='_compute_tool_material_status', store=True)
|
||||
|
||||
@api.depends('quant_ids')
|
||||
def _compute_tool_material_status(self):
|
||||
@@ -110,6 +110,13 @@ class StockLot(models.Model):
|
||||
else:
|
||||
record.tool_material_status = '可用'
|
||||
|
||||
@api.onchange('tool_material_status')
|
||||
def _onchange_tool_material_status(self):
|
||||
for obj in self:
|
||||
if obj:
|
||||
# 注册刀具物料状态到cloud平台
|
||||
obj.enroll_tool_material_stock()
|
||||
|
||||
@api.model
|
||||
def name_search(self, name='', args=None, operator='ilike', limit=100):
|
||||
# 调用父类的name_search方法
|
||||
@@ -137,9 +144,7 @@ class StockLot(models.Model):
|
||||
for record in records:
|
||||
if record.product_id.categ_id.name == '刀具':
|
||||
tool_material_search = self.env['sf.tool.material.search'].sudo().search(
|
||||
[('cutting_tool_material_id', '=', record.product_id.cutting_tool_material_id.id),
|
||||
('cutting_tool_standard_library_id', '=', record.product_id.cutting_tool_model_id.id),
|
||||
('specification_id', '=', record.product_id.specification_id.id)])
|
||||
[('id', '=', record.product_id.tool_material_id)])
|
||||
if tool_material_search:
|
||||
record.tool_material_search_id = tool_material_search
|
||||
return records
|
||||
@@ -148,12 +153,15 @@ class StockLot(models.Model):
|
||||
class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
|
||||
tool_material_id = fields.Char('刀具物料搜索模型ID')
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(ProductProduct, self).create(vals_list)
|
||||
for record in records:
|
||||
if record.categ_id.name == '刀具':
|
||||
self.env['sf.tool.material.search'].sudo().create({
|
||||
tool_material = self.env['sf.tool.material.search'].sudo().create({
|
||||
'product_id': record.id
|
||||
})
|
||||
record.tool_material_id = tool_material.id
|
||||
return records
|
||||
|
||||
@@ -311,7 +311,7 @@ class ToolMaterial(models.Model):
|
||||
product_id = fields.Many2one('product.product', string='刀具物料产品')
|
||||
|
||||
name = fields.Char('名称', related='product_id.name')
|
||||
code = fields.Char('编码', store=True)
|
||||
code = fields.Char('编码')
|
||||
cutting_tool_material_id = fields.Many2one('sf.cutting.tool.material', '刀具物料',
|
||||
related='product_id.cutting_tool_material_id',
|
||||
store=True,
|
||||
@@ -331,14 +331,6 @@ class ToolMaterial(models.Model):
|
||||
|
||||
active = fields.Boolean(string='已归档', default=True)
|
||||
|
||||
@api.depends('product_id')
|
||||
def _compute_code(self):
|
||||
for record in self:
|
||||
if record:
|
||||
code = '%s_%s' % (record.cutting_tool_standard_library_id.code, record.specification_id.name)
|
||||
obj = self.search([('code', 'like', code)], limit=1, order="id desc")
|
||||
record.code = '%s_%03d' % (code, 1 if obj else int(obj.code[-3:]) + 1)
|
||||
|
||||
@api.depends('barcode_ids')
|
||||
def _compute_number(self):
|
||||
for record in self:
|
||||
|
||||
@@ -29,6 +29,3 @@ access_sf_tool_transfer_request_information_group_plan_dispatch,sf.tool.transfer
|
||||
access_sf_functional_tool_assembly_group_plan_dispatch,sf.functional.tool.assembly,model_sf_functional_tool_assembly,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_functional_tool_assembly_order_group_plan_dispatch,sf.functional.tool.assembly.order,model_sf_functional_tool_assembly_order,sf_base.group_plan_dispatch,1,0,0,0
|
||||
access_sf_tool_material_search_group_plan_dispatch,sf.tool.material.search,model_sf_tool_material_search,sf_base.group_plan_dispatch,1,0,0,0
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -40,8 +40,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<form create="0" edit="0" delete="0">
|
||||
<header>
|
||||
<button name="enroll_functional_tool_entity" string="功能刀具注册" type="object"
|
||||
class="btn-primary"/>
|
||||
<!-- <button name="enroll_functional_tool_entity" string="功能刀具注册" type="object"-->
|
||||
<!-- class="btn-primary"/>-->
|
||||
<field name="functional_tool_status" widget="statusbar" statusbar_visible="正常,报警,已拆除"/>
|
||||
</header>
|
||||
<sheet>
|
||||
@@ -245,8 +245,8 @@
|
||||
<field name="dispose_user"/>
|
||||
<field name="dispose_time"/>
|
||||
<field name="dispose_func"/>
|
||||
<button name="enroll_functional_tool_warning" string="刀具预警注册" type="object"
|
||||
class="btn-primary"/>
|
||||
<!-- <button name="enroll_functional_tool_warning" string="刀具预警注册" type="object"-->
|
||||
<!-- class="btn-primary"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -322,10 +322,10 @@
|
||||
<field name="model">sf.real.time.distribution.of.functional.tools</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="enroll_functional_tool_real_time_distribution" string="安全库存注册" type="object"
|
||||
class="btn-primary"/>
|
||||
</header>
|
||||
<!-- <header>-->
|
||||
<!-- <button name="enroll_functional_tool_real_time_distribution" string="安全库存注册" type="object"-->
|
||||
<!-- class="btn-primary"/>-->
|
||||
<!-- </header>-->
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
@@ -462,7 +462,7 @@
|
||||
<field name="date"/>
|
||||
<field name="qty_done" string="数量"/>
|
||||
<field name="functional_tool_type_id" invisible="True"/>
|
||||
<button name="enroll_functional_tool_move" string="安全库存注册" type="object" class="btn-primary"/>
|
||||
<!-- <button name="enroll_functional_tool_move" string="安全库存注册" type="object" class="btn-primary"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="tool_material_status"/>
|
||||
<button name="enroll_tool_material_stock" string="序列号注册" type="object" class="btn-primary"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -481,9 +481,9 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
product_id = self.env['product.product'].search([('name', '=', '功能刀具')])
|
||||
# 创建组装入库单
|
||||
# 创建功能刀具批次/序列号记录
|
||||
stock_lot = product_id.create_assemble_warehouse_receipt(self.id, functional_tool_assembly)
|
||||
stock_lot = product_id.create_assemble_warehouse_receipt(self.id, functional_tool_assembly, self)
|
||||
# 创建刀具组装入库单
|
||||
self.env['stock.picking'].create_stocking_picking(stock_lot, functional_tool_assembly)
|
||||
self.env['stock.picking'].create_stocking_picking(stock_lot, functional_tool_assembly, self)
|
||||
# 刀具物料出库
|
||||
if self.integral_code_id:
|
||||
product_id.tool_material_stock_moves(self.integral_code_id)
|
||||
@@ -583,6 +583,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
return {
|
||||
'barcode_id': stock_lot.id,
|
||||
'code': self.tool_code,
|
||||
'name': self.after_assembly_functional_tool_name,
|
||||
'rfid': self.rfid,
|
||||
'tool_groups_id': self.tool_groups_id.id,
|
||||
'functional_tool_name_id': functional_tool_assembly_id.id,
|
||||
@@ -618,7 +619,7 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
|
||||
class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
def create_stocking_picking(self, stock_lot, functional_tool_assembly):
|
||||
def create_stocking_picking(self, stock_lot, functional_tool_assembly, obj):
|
||||
"""
|
||||
创建刀具组装入库单
|
||||
"""
|
||||
@@ -639,7 +640,14 @@ class StockPicking(models.Model):
|
||||
'location_dest_id': picking_id.location_dest_id.id,
|
||||
'lot_id': stock_lot.id,
|
||||
'qty_done': 1,
|
||||
'functional_tool_name_id': functional_tool_assembly.id
|
||||
'functional_tool_name_id': functional_tool_assembly.id,
|
||||
'functional_tool_type_id': obj.functional_tool_type_id.id,
|
||||
'diameter': obj.after_assembly_functional_tool_diameter,
|
||||
'knife_tip_r_angle': obj.after_assembly_knife_tip_r_angle,
|
||||
'code': obj.tool_code,
|
||||
'rfid': obj.rfid,
|
||||
'functional_tool_name': obj.after_assembly_functional_tool_name,
|
||||
'tool_groups_id': obj.tool_groups_id.id
|
||||
})
|
||||
# 将刀具组装入库单的状态更改为就绪
|
||||
picking_id.action_confirm()
|
||||
@@ -664,7 +672,7 @@ class StockPicking(models.Model):
|
||||
class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
|
||||
def create_assemble_warehouse_receipt(self, tool_assembly_order_id, functional_tool_assembly):
|
||||
def create_assemble_warehouse_receipt(self, tool_assembly_order_id, functional_tool_assembly, obj):
|
||||
"""
|
||||
创建功能刀具批次/序列号记录
|
||||
"""
|
||||
@@ -680,7 +688,7 @@ class ProductProduct(models.Model):
|
||||
stock_location_id = self.env['stock.location'].search([('name', '=', '组装后')])
|
||||
# 创建功能刀具该批次/序列号 库存移动和移动历史
|
||||
stock_lot.create_stock_quant(location_inventory_id, stock_location_id, functional_tool_assembly.id,
|
||||
'功能刀具组装')
|
||||
'功能刀具组装', obj)
|
||||
|
||||
return stock_lot
|
||||
|
||||
@@ -714,13 +722,13 @@ class ProductProduct(models.Model):
|
||||
location_inventory_id = tool_material.quant_ids.location_id[-1]
|
||||
stock_location_id = self.env['stock.location'].search([('name', '=', '刀具组装位置')])
|
||||
# 创建功能刀具该批次/序列号 库存移动和移动历史
|
||||
tool_material.create_stock_quant(location_inventory_id, stock_location_id, None, '功能刀具组装')
|
||||
tool_material.create_stock_quant(location_inventory_id, stock_location_id, None, '功能刀具组装', False)
|
||||
|
||||
|
||||
class StockLot(models.Model):
|
||||
_inherit = 'stock.lot'
|
||||
|
||||
def create_stock_quant(self, location_inventory_id, stock_location_id, functional_tool_assembly_id, name):
|
||||
def create_stock_quant(self, location_inventory_id, stock_location_id, functional_tool_assembly_id, name, obj):
|
||||
"""
|
||||
对功能刀具组装过程的功能刀具和刀具物料进行库存移动,以及创建移动历史
|
||||
"""
|
||||
@@ -743,6 +751,25 @@ class StockLot(models.Model):
|
||||
'move_id': stock_move_id.id,
|
||||
'install_tool_time': fields.Datetime.now(),
|
||||
'qty_done': 1.0,
|
||||
'state': 'done'
|
||||
'state': 'done',
|
||||
'functional_tool_type_id': False if not obj else obj.functional_tool_type_id.id,
|
||||
'diameter': None if not obj else obj.after_assembly_functional_tool_diameter,
|
||||
'knife_tip_r_angle': None if not obj else obj.after_assembly_knife_tip_r_angle,
|
||||
'code': '' if not obj else obj.tool_code,
|
||||
'rfid': '' if not obj else obj.rfid,
|
||||
'functional_tool_name': '' if not obj else obj.after_assembly_functional_tool_name,
|
||||
'tool_groups_id': False if not obj else obj.tool_groups_id.id
|
||||
})
|
||||
return stock_move_id, stock_move_line_id
|
||||
|
||||
|
||||
class StockQuant(models.Model):
|
||||
_inherit = 'stock.quant'
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
records = super(StockQuant, self).create(vals_list)
|
||||
for record in records:
|
||||
if record.lot_id.product_id.categ_id.name == '刀具':
|
||||
record.lot_id.enroll_tool_material_stock()
|
||||
return records
|
||||
|
||||
@@ -127,6 +127,8 @@ access_stock_scrap_group_purchase,stock_scrap_group_purchase,stock.model_stock_s
|
||||
access_stock_scrap_group_purchase_director,stock_scrap_group_purchase_director,stock.model_stock_scrap,sf_base.group_purchase_director,1,0,0,0
|
||||
access_stock_lot_group_purchase,stock_lot_group_purchase,stock.model_stock_lot,sf_base.group_purchase,1,0,0,0
|
||||
access_stock_lot_group_purchase_director,stock_lot_group_purchase_director,stock.model_stock_lot,sf_base.group_purchase_director,1,0,0,0
|
||||
access_stock_lot_group_quality,stock_lot_group_quality,stock.model_stock_lot,sf_base.group_quality,1,0,0,0
|
||||
access_stock_lot_group_quality_director,stock_lot_group_quality_director,stock.model_stock_lot,sf_base.group_quality_director,1,0,0,0
|
||||
access_mrp_workcenter_productivity_group_purchase,mrp_workcenter_productivity_group_purchase,mrp.model_mrp_workcenter_productivity,sf_base.group_purchase,1,0,0,0
|
||||
access_mrp_workcenter_productivity_group_purchase_director,mrp_workcenter_productivity_group_purchase_director,mrp.model_mrp_workcenter_productivity,sf_base.group_purchase_director,1,0,0,0
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'jikimo_sfs/zpl_print/static/src/scss/changes.scss'
|
||||
# 'jikimo_sfs/zpl_print/static/src/scss/changes.scss'
|
||||
]
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
|
||||
Binary file not shown.
BIN
zpl_print/libs/TSCLIB11.dll
Normal file
BIN
zpl_print/libs/TSCLIB11.dll
Normal file
Binary file not shown.
@@ -8,14 +8,27 @@ class Common(models.Model):
|
||||
_description = u'公用类'
|
||||
|
||||
def print_zpl(self, zpl_str):
|
||||
WinDll_path = "D://桌面//pythonZPL//zebra_zpl//libs//TSCLIB.dll"
|
||||
# WinDll_path = "D://桌面//pythonZPL//tsc_python_sdk_example//TSC_Python_SDK_Example//tsc_sample//libs//TSCLIB.dll"
|
||||
WinDll_path = "D://jikimo-dev//jikimo//SF//zpl_print//libs//TSCLIB.dll"
|
||||
# WinDll_path = "D://桌面//pythonZPL//zebra_zpl//libs//TSCLIB.dll"
|
||||
try:
|
||||
tsclibrary = ctypes.WinDLL(WinDll_path)
|
||||
tsclibrary.openportW("USB")
|
||||
print(type(zpl_str))
|
||||
print(zpl_str)
|
||||
tsclibrary.sendcommandW(zpl_str)
|
||||
original_string = "^XA\n^FO100,50\n^A0N,44,33^FD[PO-2023-1226-0215-1] P-S00001-1^FS\n^FO100,100\n^A0N,44,33^FDLN/SN: P-S00001-1-12348啊a^FS\n^FO100,150^BY3\n^BCN,100,Y,N,N\n^FDP-S00001-1-12348啊a^FS\n^XZ"
|
||||
|
||||
# 使用加号操作符
|
||||
new_string = original_string + "^CW1,E:SIMSUN.FNT #绑定字体\n^CI28 #UTF-8编码"
|
||||
|
||||
# 使用字符串格式化方法
|
||||
new_string = "{}^CW1,E:SIMSUN.FNT #绑定字体\n^CI28 #UTF-8编码".format(original_string)
|
||||
|
||||
print(new_string)
|
||||
|
||||
tsclibrary.sendcommandW(new_string)
|
||||
print('111222')
|
||||
tsclibrary.printlabelW("0", "1");
|
||||
tsclibrary.closeport();
|
||||
tsclibrary.printlabelW("0", "1")
|
||||
tsclibrary.closeport()
|
||||
except Exception as e:
|
||||
raise UserWarning("错误警告:%s" % e)
|
||||
|
||||
Reference in New Issue
Block a user