Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修复部分bug

This commit is contained in:
jinling.yang
2024-03-14 15:46:03 +08:00
9 changed files with 34 additions and 16 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
108 access_mrp_bom_line mrp.bom.line mrp.model_mrp_bom_line sf_base.group_plan_dispatch 1 0 0 0
109 access_mrp_unbuild access_mrp_unbuild_group_plan_dispatch mrp.unbuild mrp.model_mrp_unbuild sf_base.group_plan_dispatch 1 1 0 1 0 0
110 access_stock_scrap_group_plan_dispatch stock.scrap stock.model_stock_scrap sf_base.group_plan_dispatch 1 0 0 0
111 access_sf_model_type sf.model.type model_sf_model_type sf_base.group_plan_dispatch 1 1 1 0
112 access_mrp_routing_workcenter mrp.routing.workcenter mrp.model_mrp_routing_workcenter sf_base.group_plan_dispatch 1 1 1 0
113 access_mrp_document mrp.document mrp.model_mrp_document sf_base.group_plan_dispatch 1 0 0 0
114 access_sf_product_model_type_routing_sort sf.product.model.type.routing.sort model_sf_product_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0
115 access_sf_embryo_model_type_routing_sort sf.embryo.model.type.routing.sort model_sf_embryo_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0
116 access_sf_surface_technics_model_type_routing_sort sf.surface_technics.model.type.routing.sort model_sf_surface_technics_model_type_routing_sort sf_base.group_plan_dispatch 1 0 0 0

View File

@@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
29
30
31

View File

@@ -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

Binary file not shown.

View File

@@ -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)