diff --git a/jikimo_frontend/__manifest__.py b/jikimo_frontend/__manifest__.py
index 65a11379..c3598323 100644
--- a/jikimo_frontend/__manifest__.py
+++ b/jikimo_frontend/__manifest__.py
@@ -10,9 +10,9 @@
""",
'category': 'sf',
'website': 'https://www.sf.jikimo.com',
- 'depends': ['web', 'purchase'],
+ 'depends': ['web', 'purchase', 'base_setup'],
'data': [
-
+ 'views/bye_odoo.xml',
],
'demo': [
],
@@ -23,6 +23,8 @@
'web.assets_backend': [
'jikimo_frontend/static/src/fields/custom_many2many_checkboxes/*',
'jikimo_frontend/static/src/fields/Many2OneRadioField/*',
+ # 移除odoo相关标识
+ 'jikimo_frontend/static/src/bye_odoo/*',
'jikimo_frontend/static/src/scss/custom_style.scss',
# 'jikimo_frontend/static/src/views/list_nums/list_nbCols.js',
'jikimo_frontend/static/src/views/list_nums/list_nums.xml',
diff --git a/jikimo_frontend/data/demo_data.xml b/jikimo_frontend/data/demo_data.xml
new file mode 100644
index 00000000..3c388606
--- /dev/null
+++ b/jikimo_frontend/data/demo_data.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ JKM
+ B-25
+ USA
+
+
+ 1229
+ +8801-712901764
+ info@kolpolok.com
+ www.kolpoloktechnologies.com
+
+
+
+ Custom
+
+
+
+
+
+
diff --git a/jikimo_frontend/static/src/bye_odoo/extended_user_menu.js b/jikimo_frontend/static/src/bye_odoo/extended_user_menu.js
new file mode 100644
index 00000000..bac689f1
--- /dev/null
+++ b/jikimo_frontend/static/src/bye_odoo/extended_user_menu.js
@@ -0,0 +1,16 @@
+/** @odoo-module **/
+import { UserMenu } from "@web/webclient/user_menu/user_menu";
+import { patch } from "@web/core/utils/patch";
+import { registry } from "@web/core/registry";
+const userMenuRegistry = registry.category("user_menuitems");
+
+
+patch(UserMenu.prototype, "legion_hide_odoo.UserMenu", {
+ setup() {
+ this._super.apply(this, arguments);
+ userMenuRegistry.remove("documentation");
+ userMenuRegistry.remove("support");
+ userMenuRegistry.remove("odoo_account");
+ },
+
+});
diff --git a/jikimo_frontend/static/src/bye_odoo/favicon.js b/jikimo_frontend/static/src/bye_odoo/favicon.js
new file mode 100644
index 00000000..9ef4f4da
--- /dev/null
+++ b/jikimo_frontend/static/src/bye_odoo/favicon.js
@@ -0,0 +1,11 @@
+/** @odoo-module **/
+
+import { WebClient } from "@web/webclient/webclient";
+import { patch } from "web.utils";
+
+patch(WebClient.prototype, "kolpolok_custom_title_and_favicon.WebClient", {
+ setup() {
+ this._super();
+ this.title.setParts({ zopenerp: "JIKIMO" });
+ },
+});
\ No newline at end of file
diff --git a/jikimo_frontend/static/src/img/favicon.ico b/jikimo_frontend/static/src/img/favicon.ico
new file mode 100644
index 00000000..95c0fba1
Binary files /dev/null and b/jikimo_frontend/static/src/img/favicon.ico differ
diff --git a/jikimo_frontend/static/src/img/jikimo-logo.ico b/jikimo_frontend/static/src/img/jikimo-logo.ico
new file mode 100644
index 00000000..b5bf7cd7
Binary files /dev/null and b/jikimo_frontend/static/src/img/jikimo-logo.ico differ
diff --git a/jikimo_frontend/static/src/img/jikimo.ico b/jikimo_frontend/static/src/img/jikimo.ico
new file mode 100644
index 00000000..69e69db9
Binary files /dev/null and b/jikimo_frontend/static/src/img/jikimo.ico differ
diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
index 9825eeec..2bed0804 100644
--- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js
+++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js
@@ -5,9 +5,44 @@ import {patch} from '@web/core/utils/patch';
import {_t} from "@web/core/l10n/translation";
import {FormStatusIndicator} from "@web/views/form/form_status_indicator/form_status_indicator";
+import {Field} from "@web/views/fields/field";
+
var Dialog = require('web.Dialog');
// var {patch} = require("web.utils") 这句话也行
+const filedRequiredList = {
+ // 设备大模块
+ 'control_system_id': { multiple: false, noLabel: false },
+ 'workbench_L': { multiple: true, noLabel: false },
+ 'number_of_axles': { multiple: true, noLabel: false },
+ 'x_axis': { multiple: true, noLabel: false },
+ 'number_of_knife_library': { multiple: false, noLabel: false },
+ 'brand_id': { multiple: false, noLabel: false },
+ 'type_id': { multiple: false, noLabel: false },
+ 'taper_type_id': { multiple: false, noLabel: false },
+ 'eq_maintenance_id': { multiple: false, noLabel: false },
+ 'overhaul_id': { multiple: false, noLabel: false },
+ 'overhaul_period': { multiple: false, noLabel: false },
+ 'maintenance_equipment_category_id': { multiple: false, noLabel: false },
+ 'maintenance_type': { multiple: false, noLabel: false },
+ // 销售大模块
+ 'partner_id': { multiple: false, noLabel: false },
+ 'validity_date': { multiple: false, noLabel: false },
+ 'vat': { multiple: false, noLabel: false },
+ 'phone': { multiple: false, noLabel: false },
+ 'mobile': { multiple: false, noLabel: false },
+ 'email': { multiple: false, noLabel: false },
+ 'category_id': { multiple: false, noLabel: false },
+ 'radio_field_1_person': { multiple: false, noLabel: true },
+
+ // 采购大模块
+ 'date_order': { multiple: false, noLabel: false },
+ 'picking_type_id': { multiple: false, noLabel: false },
+
+ // 制造大模块
+ 'production_line_id': { multiple: false, noLabel: false },
+ 'date_approve': { multiple: false, noLabel: false },
+}
patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
// 你可以重写或者添加一些方法和属性
async _onDiscardChanges() {
@@ -46,6 +81,38 @@ patch(FormStatusIndicator.prototype, 'jikimo_frontend.FormStatusIndicator', {
}
);
+patch(Field.prototype, 'jikimo_frontend.Field', {
+ setup() {
+ this.FieldComponent = this.props.fieldInfo.FieldComponent;
+ if (!this.FieldComponent) {
+ const fieldType = this.props.record.fields[this.props.name].type;
+ this.FieldComponent = getFieldClassFromRegistry(fieldType, this.props.type);
+ }
+ owl.onMounted(this.setRequired);
+ },
+ setRequired() {
+ const id = this.props.id
+ const isRequired = filedRequiredList[id]
+ if(id == 'number_of_axles') {
+ console.log(isRequired)
+ }
+ if(isRequired) {
+ let dom;
+ dom = $(`label[for=${id}]`)
+ if(isRequired.multiple && dom.length > 1) {
+ dom = dom.eq(-1)
+ dom = dom.parent().parent().next().find('label')
+ }
+ if(isRequired.noLabel) {
+ dom = dom.parent().parent()
+ }
+ let t = dom.html()
+ t = '*' + t
+ dom.html(t)
+ }
+ }
+})
+
$(function () {
document.addEventListener('click', function () {
@@ -82,7 +149,7 @@ $(function () {
dom.each(function () {
const requiredDom = $(this).parent().prev().find('label')
let t = requiredDom.html()
- if (t.indexOf('c*') < 0) {
+ if (t && t.indexOf('c*') < 0) {
t = '*' + t
}
requiredDom.html(t)
@@ -104,16 +171,7 @@ $(function () {
const lint = $('.o_form_view_container')
if (lint.length) {
clearInterval(domTimer)
- const {label, table} = dom
- if (label.length) {
- $(dom.label.join(',')).each(function () {
- let t = $(this).html()
- if (t.indexOf('c*') < 0) {
- t = '*' + t
- }
- $(this).html(t)
- })
- }
+ const { table} = dom
if (table.length) {
table.forEach(_ => {
@@ -133,8 +191,7 @@ $(function () {
var currentUrl = location.href
const customRequiredDom = {
- label: ['label[for=production_line_id]','label[for=date_approve]','label[for=partner_id]', 'label[for=validity_date]', '.o_horizontal[role=radiogroup][aria-label="公司类别"]', 'label[for=vat]', 'label[for=phone]', 'label[for=mobile]', 'label[for=email]', 'label[for=category_id]','label[for=date_order]','label[for=picking_type_id]'],
- table: ['product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty']
+ table: ['product_template_id', 'product_uom_qty', 'price_unit','product_id','product_qty', 'name', 'fault_type', 'maintenance_standards', 'Period']
}
const listenerUrl = setInterval(() => {
const isChange = currentUrl != location.href
@@ -143,9 +200,6 @@ $(function () {
customRequired()
setRequired(customRequiredDom)
}
- if($('label[for=production_line_id]')) {
- setRequired({table: [], label: ['label[for=production_line_id]']})
- }
}, 500)
customRequired()
setRequired(customRequiredDom)
diff --git a/jikimo_frontend/static/src/js/custom_image_temp.js b/jikimo_frontend/static/src/js/custom_image_temp.js
index 60cc3425..fba97121 100644
--- a/jikimo_frontend/static/src/js/custom_image_temp.js
+++ b/jikimo_frontend/static/src/js/custom_image_temp.js
@@ -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();
diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss
index a1605194..bc1be730 100644
--- a/jikimo_frontend/static/src/scss/custom_style.scss
+++ b/jikimo_frontend/static/src/scss/custom_style.scss
@@ -449,4 +449,21 @@ div:has(.o_required_modifier) > label::before {
}
}
-}
\ No newline at end of file
+}
+
+// 更改表格底部按钮样式
+.o_list_renderer .o_field_x2many_list_row_add a,.treeHeaderBtn,.o_x2m_control_panel .o_cp_buttons .btn{
+ display: inline-block;
+ margin: 5px 0;
+ font-size: 14px;
+ color: #71639e;
+ border: 1px solid #71639e;
+ padding: 0.2rem 0.6rem;
+ font-size: 1.08333333rem;
+ border-radius: 0.25rem;
+ transition: all .3s;
+}
+.o_list_renderer .o_field_x2many_list_row_add a:hover,.treeHeaderBtn:hover,.o_x2m_control_panel .o_cp_buttons .btn:hover{
+ background: #71639e;
+ color: #fff
+}
diff --git a/jikimo_frontend/views/bye_odoo.xml b/jikimo_frontend/views/bye_odoo.xml
new file mode 100644
index 00000000..0930f551
--- /dev/null
+++ b/jikimo_frontend/views/bye_odoo.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jikimo.res.config.settings.view.form.inherit.base.setup
+ res.config.settings
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sf_base/__manifest__.py b/sf_base/__manifest__.py
index 59ad967a..ceedcdd0 100644
--- a/sf_base/__manifest__.py
+++ b/sf_base/__manifest__.py
@@ -24,6 +24,7 @@
'views/tool_menu.xml',
'views/menu_fixture_view.xml',
'views/change_base_view.xml',
+ 'views/Printer.xml',
],
'demo': [
diff --git a/sf_base/commons/Printer.py b/sf_base/commons/Printer.py
new file mode 100644
index 00000000..563d9dea
--- /dev/null
+++ b/sf_base/commons/Printer.py
@@ -0,0 +1,28 @@
+from odoo import models, fields
+
+
+class Printer(models.Model):
+ _name = 'printer'
+ _description = 'Printer'
+
+ name = fields.Char(string='名称', required=True)
+ ip_address = fields.Char(string='IP 地址', required=True)
+ port = fields.Integer(string='端口', default=9100)
+
+
+class TableStyle(models.Model):
+ _name = 'table.style'
+ _description = '标签样式'
+
+ name = fields.Char(string='名称', required=True)
+ # todo
+
+
+class PrinterConfiguration(models.Model):
+ _name = 'printer.configuration'
+ _description = 'Printer Configuration'
+
+ name = fields.Char(string='名称', required=True)
+ printer_id = fields.Many2one('printer', string='打印机')
+ model = fields.Many2one('ir.model', string='模型名称')
+# # 其他相关字段...
diff --git a/sf_base/commons/__init__.py b/sf_base/commons/__init__.py
index e4193cf0..63b820e7 100644
--- a/sf_base/commons/__init__.py
+++ b/sf_base/commons/__init__.py
@@ -1 +1,2 @@
from . import common
+from . import Printer
diff --git a/sf_base/commons/common.py b/sf_base/commons/common.py
index b423e160..9f359c9c 100644
--- a/sf_base/commons/common.py
+++ b/sf_base/commons/common.py
@@ -2,7 +2,7 @@
import time, datetime
import hashlib
from odoo import models
-
+import socket
class Common(models.Model):
_name = 'sf.sync.common'
@@ -29,3 +29,66 @@ class Common(models.Model):
d = dt + datetime.timedelta(hours=8)
nTime = d.strftime("%Y-%m-%d %H:%M:%S")
return nTime
+
+
+class PrintingUtils(models.AbstractModel):
+ _name = 'printing.utils'
+ _description = 'Utility class for printing functionalities'
+
+ def generate_zpl_code(self, code):
+ # 实现生成ZPL代码的逻辑
+ # 初始化ZPL代码字符串
+ zpl_code = "^XA\n"
+ zpl_code += "^CW1,E:SIMSUN.TTF^FS\n"
+ zpl_code += "^CI28\n"
+
+ # 设置二维码位置
+ zpl_code += "^FO50,50\n" # 调整二维码位置,使其与资产编号在同一行
+ zpl_code += f"^BQN,2,6^FDLM,B0093{code}^FS\n"
+
+ # 设置资产编号文本位置
+ zpl_code += "^FO300,60\n" # 资产编号文本的位置,与二维码在同一行
+ zpl_code += "^A1N,45,45^FD编码名称: ^FS\n"
+
+ # 设置{code}文本位置
+ # 假设{code}文本需要位于资产编号和二维码下方,中间位置
+ # 设置{code}文本位置并启用自动换行
+ zpl_code += "^FO300,120\n" # {code}文本的起始位置
+ zpl_code += "^FB400,4,0,L,0\n" # 定义一个宽度为500点的文本框,最多4行,左对齐
+ zpl_code += f"^A1N,40,40^FD{code}^FS\n"
+
+ # 在{code}文本框周围绘制线框
+ # 假设线框的外部尺寸为宽度500点,高度200点
+ # zpl_code += "^FO300,110^GB500,200,2^FS\n" # 绘制线框,边框粗细为2点
+
+ zpl_code += "^PQ1,0,1,Y\n"
+ zpl_code += "^XZ\n"
+ return zpl_code
+
+ def send_to_printer(self, host, port, zpl_code):
+
+ # 实现发送ZPL代码到打印机的逻辑
+ # 将ZPL代码转换为字节串
+ print('zpl_code', zpl_code)
+ zpl_bytes = zpl_code.encode('utf-8')
+ print(zpl_bytes)
+
+ # 创建socket对象
+ mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ try:
+ mysocket.connect((host, port)) # 连接到打印机
+ mysocket.send(zpl_bytes) # 发送ZPL代码
+ print("ZPL code sent to printer successfully.")
+ except Exception as e:
+ print(f"Error with the connection: {e}")
+ finally:
+ mysocket.close() # 关闭连接
+
+ def print_qr_code(self, lot_name, host, port):
+ # 实现打印二维码的逻辑
+ # 这里需要传入 lot_name 参数,因为我们不能直接访问 self.lot_id.name
+ zpl_code = self.generate_zpl_code(lot_name)
+ # 发送ZPL代码到打印机
+ # host = "192.168.50.110" # 可以作为参数传入,或者在此配置
+ # port = 9100 # 可以作为参数传入,或者在此配置
+ self.send_to_printer(host, port, zpl_code)
diff --git a/sf_base/models/basic_parameters_fixture.py b/sf_base/models/basic_parameters_fixture.py
index 7bd69a35..e9469355 100644
--- a/sf_base/models/basic_parameters_fixture.py
+++ b/sf_base/models/basic_parameters_fixture.py
@@ -67,186 +67,220 @@ class BasicParametersFixture(models.Model):
mounting_hole_depth = fields.Float('安装孔深度(mm)', digits=(16, 2))
centering_diameter = fields.Float('定心直径(mm)', digits=(16, 2))
+ code = fields.Char('编码')
+ active = fields.Boolean('有效', default=True)
+
+ def _get_basic_parameters_list(self, fixture_materials_data, fixture_materials_name):
+ if fixture_materials_name == '零点卡盘':
+ return self._json_zero_chuck_param(fixture_materials_data)
+ elif fixture_materials_name == '零点托盘':
+ return self._json_zero_tray_param(fixture_materials_data)
+ elif fixture_materials_name == '气动夹具':
+ return self._json_pneumatic_fixture_param(fixture_materials_data)
+ elif fixture_materials_name == '虎钳夹具':
+ return self._json_jaw_vice_fixture_param(fixture_materials_data)
+ elif fixture_materials_name == '磁吸夹具':
+ return self._json_magnet_fixture_param(fixture_materials_data)
+ elif fixture_materials_name == '转接板(锁板)夹具':
+ return self._json_adapter_board_fixture_param(fixture_materials_data)
+ elif fixture_materials_name == '三爪卡盘':
+ return self._json_scroll_chuck_param(fixture_materials_data)
+ return {}
+
def _json_zero_chuck_param(self, obj):
- zero_chuck_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'diameter': obj['diameter'],
- 'weight': obj['weight'],
- 'orientation_dish_diameter': obj['orientation_dish_diameter'],
- 'clamping_diameter': obj['clamping_diameter'],
- 'clamping_num': obj['clamping_num'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
- 'boolean_transposing_hole': obj['boolean_transposing_hole'],
- 'unlocking_method': obj['unlocking_method'],
- 'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'rigidity': obj['rigidity'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'machine_tool_type_id': self.env['sf.machine_tool.type'].sudo().search(
- [('code', '=', obj['machine_tool_type_id']), ('active', '=', True)]).id,
- })
- return zero_chuck_param_str
+ """零点卡盘:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'diameter': obj['diameter'],
+ 'weight': obj['weight'],
+ 'orientation_dish_diameter': obj['orientation_dish_diameter'],
+ 'clamping_diameter': obj['clamping_diameter'],
+ 'clamping_num': obj['clamping_num'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
+ 'boolean_transposing_hole': obj['boolean_transposing_hole'],
+ 'unlocking_method': obj['unlocking_method'],
+ 'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'rigidity': obj['rigidity'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'machine_tool_type_id': self.env['sf.machine_tool.type'].sudo().search(
+ [('code', '=', obj['machine_tool_type_id']), ('active', '=', True)]).id,
+ 'active': obj['active']}
def _json_zero_tray_param(self, obj):
- zero_tray_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'diameter': obj['diameter'],
- 'weight': obj['weight'],
- 'clamping_diameter': obj['clamping_diameter'],
- 'connector_diameter': obj['connector_diameter'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
- 'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
- 'way_to_install': obj['way_to_install'],
- 'type_of_drive': obj['type_of_drive'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- })
- return zero_tray_param_str
+ """零点托盘:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'diameter': obj['diameter'],
+ 'weight': obj['weight'],
+ 'clamping_diameter': obj['clamping_diameter'],
+ 'connector_diameter': obj['connector_diameter'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'repeated_positioning_accuracy': obj['repeated_positioning_accuracy'],
+ 'boolean_chip_blowing_function': obj['boolean_chip_blowing_function'],
+ 'way_to_install': obj['way_to_install'],
+ 'type_of_drive': obj['type_of_drive'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'active': obj['active']}
def _json_pneumatic_fixture_param(self, obj):
- pneumatic_fixture_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'weight': obj['weight'],
- 'gripper_length_min': obj['gripper_length_min'],
- 'gripper_width_min': obj['gripper_width_min'],
- 'gripper_height_min': obj['gripper_height_min'],
- 'gripper_diameter_min': obj['gripper_diameter_min'],
- 'gripper_length_max': obj['gripper_length_max'],
- 'gripper_width_max': obj['gripper_width_max'],
- 'gripper_height_max': obj['gripper_height_max'],
- 'gripper_diameter_max': obj['gripper_diameter_max'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'rated_air_pressure': obj['rated_air_pressure'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'type_of_drive': obj['type_of_drive'],
- })
- return pneumatic_fixture_param_str
+ """气动夹具:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'weight': obj['weight'],
+ 'gripper_length_min': obj['gripper_length_min'],
+ 'gripper_width_min': obj['gripper_width_min'],
+ 'gripper_height_min': obj['gripper_height_min'],
+ 'gripper_diameter_min': obj['gripper_diameter_min'],
+ 'gripper_length_max': obj['gripper_length_max'],
+ 'gripper_width_max': obj['gripper_width_max'],
+ 'gripper_height_max': obj['gripper_height_max'],
+ 'gripper_diameter_max': obj['gripper_diameter_max'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'rated_air_pressure': obj['rated_air_pressure'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'type_of_drive': obj['type_of_drive'],
+ 'active': obj['active']}
def _json_jaw_vice_fixture_param(self, obj):
- jaw_vice_fixture_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'weight': obj['weight'],
- 'gripper_length_min': obj['gripper_length_min'],
- 'gripper_width_min': obj['gripper_width_min'],
- 'gripper_height_min': obj['gripper_height_min'],
- 'gripper_diameter_min': obj['gripper_diameter_min'],
- 'gripper_length_max': obj['gripper_length_max'],
- 'gripper_width_max': obj['gripper_width_max'],
- 'gripper_height_max': obj['gripper_height_max'],
- 'gripper_diameter_max': obj['gripper_diameter_max'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'transverse_groove': obj['transverse_groove'],
- 'longitudinal_fitting_groove': obj['longitudinal_fitting_groove'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'type_of_drive': obj['type_of_drive'],
- })
- return jaw_vice_fixture_param_str
+ """虎钳夹具:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'weight': obj['weight'],
+ 'gripper_length_min': obj['gripper_length_min'],
+ 'gripper_width_min': obj['gripper_width_min'],
+ 'gripper_height_min': obj['gripper_height_min'],
+ 'gripper_diameter_min': obj['gripper_diameter_min'],
+ 'gripper_length_max': obj['gripper_length_max'],
+ 'gripper_width_max': obj['gripper_width_max'],
+ 'gripper_height_max': obj['gripper_height_max'],
+ 'gripper_diameter_max': obj['gripper_diameter_max'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'transverse_groove': obj['transverse_groove'],
+ 'longitudinal_fitting_groove': obj['longitudinal_fitting_groove'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'type_of_drive': obj['type_of_drive'],
+ 'active': obj['active']}
def _json_magnet_fixture_param(self, obj):
- magnet_fixture_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'height_tolerance_value': obj['height_tolerance_value'],
- 'weight': obj['weight'],
- 'gripper_length_min': obj['gripper_length_min'],
- 'gripper_width_min': obj['gripper_width_min'],
- 'gripper_height_min': obj['gripper_height_min'],
- 'gripper_diameter_min': obj['gripper_diameter_min'],
- 'gripper_length_max': obj['gripper_length_max'],
- 'gripper_width_max': obj['gripper_width_max'],
- 'gripper_height_max': obj['gripper_height_max'],
- 'gripper_diameter_max': obj['gripper_diameter_max'],
- 'rated_adsorption_force': obj['rated_adsorption_force'],
- 'magnetic_field_height': obj['magnetic_field_height'],
- 'magnetic_pole_plate_grinding_allowance': obj['magnetic_pole_plate_grinding_allowance'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'type_of_drive': obj['type_of_drive'],
- })
- return magnet_fixture_param_str
+ """磁吸夹具:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'height_tolerance_value': obj['height_tolerance_value'],
+ 'weight': obj['weight'],
+ 'gripper_length_min': obj['gripper_length_min'],
+ 'gripper_width_min': obj['gripper_width_min'],
+ 'gripper_height_min': obj['gripper_height_min'],
+ 'gripper_diameter_min': obj['gripper_diameter_min'],
+ 'gripper_length_max': obj['gripper_length_max'],
+ 'gripper_width_max': obj['gripper_width_max'],
+ 'gripper_height_max': obj['gripper_height_max'],
+ 'gripper_diameter_max': obj['gripper_diameter_max'],
+ 'rated_adsorption_force': obj['rated_adsorption_force'],
+ 'magnetic_field_height': obj['magnetic_field_height'],
+ 'magnetic_pole_plate_grinding_allowance': obj['magnetic_pole_plate_grinding_allowance'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'interface_materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'type_of_drive': obj['type_of_drive'],
+ 'active': obj['active']}
def _json_adapter_board_fixture_param(self, obj):
- adapter_board_fixture_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'weight': obj['weight'],
- 'gripper_length_min': obj['gripper_length_min'],
- 'gripper_width_min': obj['gripper_width_min'],
- 'gripper_height_min': obj['gripper_height_min'],
- 'gripper_diameter_min': obj['gripper_diameter_min'],
- 'gripper_length_max': obj['gripper_length_max'],
- 'gripper_width_max': obj['gripper_width_max'],
- 'gripper_height_max': obj['gripper_height_max'],
- 'gripper_diameter_max': obj['gripper_diameter_max'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- 'screw_size': obj['screw_size'],
- 'via_hole_diameter': obj['via_hole_diameter'],
- 'type_of_drive': obj['type_of_drive'],
- })
- return adapter_board_fixture_param_str
+ """转接板(锁板)夹具:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'weight': obj['weight'],
+ 'gripper_length_min': obj['gripper_length_min'],
+ 'gripper_width_min': obj['gripper_width_min'],
+ 'gripper_height_min': obj['gripper_height_min'],
+ 'gripper_diameter_min': obj['gripper_diameter_min'],
+ 'gripper_length_max': obj['gripper_length_max'],
+ 'gripper_width_max': obj['gripper_width_max'],
+ 'gripper_height_max': obj['gripper_height_max'],
+ 'gripper_diameter_max': obj['gripper_diameter_max'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'screw_size': obj['screw_size'],
+ 'via_hole_diameter': obj['via_hole_diameter'],
+ 'type_of_drive': obj['type_of_drive'],
+ 'active': obj['active']}
def _json_scroll_chuck_param(self, obj):
- scroll_chuck_param_str = (0, '', {
- 'name': obj['name'],
- 'length': obj['length'],
- 'width': obj['width'],
- 'height': obj['height'],
- 'diameter': obj['diameter'],
- 'weight': obj['weight'],
- 'gripper_length_min': obj['gripper_length_min'],
- 'gripper_width_min': obj['gripper_width_min'],
- 'gripper_height_min': obj['gripper_height_min'],
- 'gripper_diameter_min': obj['gripper_diameter_min'],
- 'gripper_length_max': obj['gripper_length_max'],
- 'gripper_width_max': obj['gripper_width_max'],
- 'gripper_height_max': obj['gripper_height_max'],
- 'gripper_diameter_max': obj['gripper_diameter_max'],
- 'chucking_power_max': obj['chucking_power_max'],
- 'carrying_capacity_max': obj['carrying_capacity_max'],
- 'materials_model_id': self.env['sf.materials.model'].sudo().search(
- [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
- 'rigidity': obj['rigidity'],
- 'mounting_hole_depth': obj['mounting_hole_depth'],
- 'centering_diameter': obj['centering_diameter'],
- 'type_of_drive': obj['type_of_drive'],
- })
- return scroll_chuck_param_str
+ """转接板(锁板)夹具:将data数据转换成list数据"""
+ return {'code': obj['code'],
+ 'fixture_model_id': self.env['sf.fixture.model'].sudo().search(
+ [('code', '=', obj.get('fixture_model_code'))]).id,
+ 'name': obj['name'],
+ 'length': obj['length'],
+ 'width': obj['width'],
+ 'height': obj['height'],
+ 'diameter': obj['diameter'],
+ 'weight': obj['weight'],
+ 'gripper_length_min': obj['gripper_length_min'],
+ 'gripper_width_min': obj['gripper_width_min'],
+ 'gripper_height_min': obj['gripper_height_min'],
+ 'gripper_diameter_min': obj['gripper_diameter_min'],
+ 'gripper_length_max': obj['gripper_length_max'],
+ 'gripper_width_max': obj['gripper_width_max'],
+ 'gripper_height_max': obj['gripper_height_max'],
+ 'gripper_diameter_max': obj['gripper_diameter_max'],
+ 'chucking_power_max': obj['chucking_power_max'],
+ 'carrying_capacity_max': obj['carrying_capacity_max'],
+ 'materials_model_id': self.env['sf.materials.model'].sudo().search(
+ [('materials_no', '=', obj['materials_model_id']), ('active', '=', True)]).id,
+ 'rigidity': obj['rigidity'],
+ 'mounting_hole_depth': obj['mounting_hole_depth'],
+ 'centering_diameter': obj['centering_diameter'],
+ 'type_of_drive': obj['type_of_drive'],
+ 'active': obj['active']}
diff --git a/sf_base/models/common.py b/sf_base/models/common.py
index 7496e7db..6fd7d814 100644
--- a/sf_base/models/common.py
+++ b/sf_base/models/common.py
@@ -61,10 +61,10 @@ class MrsMaterialModel(models.Model):
supplier_ids = fields.One2many('sf.supplier.sort', 'materials_model_id', string='供应商')
active = fields.Boolean('有效', default=True)
- @api.constrains('supplier_ids')
+ @api.onchange('gain_way')
def _check_gain_way(self):
if not self.gain_way:
- raise UserError("请输入获取方式")
+ raise UserError("请选择获取方式")
if self.gain_way in ['外协', '采购']:
if not self.supplier_ids:
raise UserError("请添加供应商")
diff --git a/sf_base/models/fixture.py b/sf_base/models/fixture.py
index 52e2baf7..f64fe473 100644
--- a/sf_base/models/fixture.py
+++ b/sf_base/models/fixture.py
@@ -26,10 +26,10 @@ class FixtureModel(models.Model):
_name = 'sf.fixture.model'
_description = "夹具型号"
- name = fields.Char(string="名称", size=50, required=True)
- fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料", required=True)
+ name = fields.Char(string="名称", size=50)
+ fixture_material_id = fields.Many2one('sf.fixture.material', string="夹具物料")
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name')
- multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型", required=True)
+ multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型")
brand_id = fields.Many2one('sf.machine.brand', string="品牌")
model_file = fields.Binary(string="图片")
status = fields.Boolean('状态')
diff --git a/sf_base/models/tool_base_new.py b/sf_base/models/tool_base_new.py
index 03a3678b..a3a9e172 100644
--- a/sf_base/models/tool_base_new.py
+++ b/sf_base/models/tool_base_new.py
@@ -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',
diff --git a/sf_base/models/tool_other_features.py b/sf_base/models/tool_other_features.py
index 7ad32bc2..f67e69fd 100644
--- a/sf_base/models/tool_other_features.py
+++ b/sf_base/models/tool_other_features.py
@@ -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:
diff --git a/sf_base/security/ir.model.access.csv b/sf_base/security/ir.model.access.csv
index 4a160533..4eaddff0 100644
--- a/sf_base/security/ir.model.access.csv
+++ b/sf_base/security/ir.model.access.csv
@@ -70,11 +70,17 @@ access_sf_cutting_speed,sf_cutting_speed,model_sf_cutting_speed,base.group_user,
access_sf_cutting_speed_admin,sf_cutting_speed_admin,model_sf_cutting_speed,base.group_system,1,1,1,0
access_sf_cutting_speed_group_purchase_director,sf_cutting_speed_group_purchase_director,model_sf_cutting_speed,sf_base.group_purchase_director,1,1,1,0
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
@@ -136,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
@@ -146,6 +150,9 @@ access_purchase_order,purchase.order,purchase.model_purchase_order,sf_base.group
access_res_partner,res.partner,base.model_res_partner,sf_base.group_plan_dispatch,1,0,0,0
access_purchase_order_line,purchase.order.line,purchase.model_purchase_order_line,sf_base.group_plan_dispatch,1,0,0,0
access_account_move_line,account.move.line,account.model_account_move_line,sf_base.group_plan_dispatch,1,0,0,0
+
+access_sf_machine_tool_type_group_plan_dispatch,sf.machine_tool.type,model_sf_machine_tool_type,sf_base.group_plan_dispatch,1,0,0,0
+
access_sf_machine_tool,sf_machine_tool,model_sf_machine_tool,sf_base.group_sf_mrp_user,1,1,0,0
access_sf_machine_tool_type,sf_machine_tool_type,model_sf_machine_tool_type,sf_base.group_sf_mrp_user,1,1,0,0
access_sf_machine_brand,sf_machine_brand,model_sf_machine_brand,sf_base.group_sf_mrp_user,1,1,0,0
@@ -181,3 +188,7 @@ access_sf_machine_brand_tags_group_sale_director,sf_machine_brand_tags_group_sal
access_sf_machine_brand_tags_group_plan_director,sf_machine_brand_tags_group_plan_director,model_sf_machine_brand_tags,sf_base.group_plan_director,1,0,0,0
access_sf_machine_brand_tags_group_purchase,sf_machine_brand_tags_group_purchase,model_sf_machine_brand_tags,sf_base.group_purchase,1,0,0,0
access_sf_machine_brand_tags_group_purchase_director,sf_machine_brand_tags_group_purchase_director,model_sf_machine_brand_tags,sf_base.group_purchase_director,1,0,0,0
+
+
+access_printer,printer,model_printer,base.group_user,1,1,1,1
+access_printer_configuration,printer.configuration,model_printer_configuration,base.group_user,1,1,1,1
\ No newline at end of file
diff --git a/sf_base/views/Printer.xml b/sf_base/views/Printer.xml
new file mode 100644
index 00000000..0e199b32
--- /dev/null
+++ b/sf_base/views/Printer.xml
@@ -0,0 +1,112 @@
+
+
+
+
+ printer.tree
+ printer
+
+
+
+
+
+
+
+
+
+
+
+ printer.form
+ printer
+
+
+
+
+
+
+ printer.configuration.tree
+ printer.configuration
+
+
+
+
+
+
+
+
+
+
+
+ printer.configuration.form
+ printer.configuration
+
+
+
+
+
+
+
+
+ 打印机
+ printer
+ tree,form
+
+
+
+
+ 打印配置
+ printer.configuration
+ tree,form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sf_base/views/common_view.xml b/sf_base/views/common_view.xml
index 49a2563d..bf9201b8 100644
--- a/sf_base/views/common_view.xml
+++ b/sf_base/views/common_view.xml
@@ -1,38 +1,39 @@
-
-
+
+
sf.production.process.parameter
-
+
+
-
+
sf.production.process.parameter
-
-
+
search.mrs.production.process.parameter
sf.production.process.parameter
@@ -74,26 +75,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -283,7 +284,7 @@
sf.materials.model
-
+
@@ -392,12 +393,12 @@
sf.materials.model
tree,form
-
-
-
-
-
-
+
+
+
+
+
+
表面工艺类别
diff --git a/sf_base/views/fixture_view.xml b/sf_base/views/fixture_view.xml
index 692c3b7f..0e86738d 100644
--- a/sf_base/views/fixture_view.xml
+++ b/sf_base/views/fixture_view.xml
@@ -165,6 +165,7 @@
+
@@ -190,6 +191,7 @@
+
@@ -213,6 +215,7 @@
+
@@ -240,6 +243,7 @@
+
@@ -268,6 +272,7 @@
+
@@ -297,6 +302,7 @@
+
@@ -323,6 +329,7 @@
+
diff --git a/sf_base/views/tool_basic_param.xml b/sf_base/views/tool_basic_param.xml
index 616905ca..d138eeb8 100644
--- a/sf_base/views/tool_basic_param.xml
+++ b/sf_base/views/tool_basic_param.xml
@@ -1,132 +1,302 @@
-
-
- sf.tool.materials.basic.parameters.tree
- sf.tool.materials.basic.parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ sf.tool.materials.basic.parameters.tree
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- sf.tool.materials.basic.parameters.tree
- sf.tool.materials.basic.parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ sf.tool.materials.basic.parameters.tree
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- sf.tool.materials.basic.parameters.tree
- sf.tool.materials.basic.parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ sf.tool.materials.basic.parameters.tree
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- sf.tool.materials.basic.parameters.tree
- sf.tool.materials.basic.parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ sf.tool.materials.basic.parameters.tree
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- sf.tool.materials.basic.parameters.search
- sf.tool.materials.basic.parameters
-
-
-
-
-
-
+
+ sf.tool.materials.basic.parameters.search
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
-
- 基础参数
- sf.tool.materials.basic.parameters
- tree
+
+ sf.tool.materials.basic.parameters.form
+ sf.tool.materials.basic.parameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 基础参数
+ sf.tool.materials.basic.parameters
+ form
+ {'default_cutting_tool_type': cutting_tool_type}
+ []
+
+
diff --git a/sf_base/views/tool_menu.xml b/sf_base/views/tool_menu.xml
index 82ecca18..506a73df 100644
--- a/sf_base/views/tool_menu.xml
+++ b/sf_base/views/tool_menu.xml
@@ -21,6 +21,7 @@
刀具标准库
ir.actions.act_window
sf.cutting_tool.standard.library
+
tree,form
diff --git a/sf_base/views/tool_views.xml b/sf_base/views/tool_views.xml
index d1c0c510..34b87a41 100644
--- a/sf_base/views/tool_views.xml
+++ b/sf_base/views/tool_views.xml
@@ -123,19 +123,19 @@