Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/修复部分bug
This commit is contained in:
@@ -18,8 +18,8 @@
|
|||||||
<field name="inherit_id" ref="maintenance.hr_equipment_category_view_form"/>
|
<field name="inherit_id" ref="maintenance.hr_equipment_category_view_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='technician_user_id']" position="before">
|
<xpath expr="//field[@name='technician_user_id']" position="before">
|
||||||
<field name="equipment_type"/>
|
<field name="equipment_type" class="custom_required"/>
|
||||||
<field name="equipment_type_code" required='1'/>
|
<field name="equipment_type_code" required='1' class="custom_required"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -76,6 +76,13 @@
|
|||||||
<field name="equipment_maintenance_id"/>
|
<field name="equipment_maintenance_id"/>
|
||||||
|
|
||||||
</xpath>
|
</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>
|
<sheet>
|
||||||
|
|
||||||
<notebook>
|
<notebook>
|
||||||
@@ -92,6 +99,7 @@
|
|||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
|
|
||||||
|
|
||||||
</sheet>
|
</sheet>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -982,16 +982,16 @@
|
|||||||
|
|
||||||
<xpath expr="//field[@name='next_action_date']" position="before">
|
<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>
|
||||||
|
|
||||||
<xpath expr="//div[hasclass('o_row')][field[@name='maintenance_duration']]" position="after">
|
<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="下次预防检修"/>
|
<field name="overhaul_date" string="下次预防检修"/>
|
||||||
<label for="overhaul_period" string="预防检修频次"/>
|
<label for="overhaul_period" string="预防检修频次" class="custom_required"/>
|
||||||
<div class="o_row">
|
<div class="o_row">
|
||||||
<field name="overhaul_period"/>
|
<field name="overhaul_period"/>
|
||||||
days
|
days
|
||||||
@@ -1188,7 +1188,7 @@
|
|||||||
<field name="name" readonly="1"/>
|
<field name="name" readonly="1"/>
|
||||||
<field name="type" readonly="1"/>
|
<field name="type" readonly="1"/>
|
||||||
<field name="image" widget="image" readonly="1"/>
|
<field name="image" widget="image" readonly="1"/>
|
||||||
<field name="equipment_id"/>
|
<!-- <field name="equipment_id"/>-->
|
||||||
<field name="active" invisible="1"/>
|
<field name="active" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -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_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_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_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_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_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
|
access_sf_model_type,sf.model.type,model_sf_model_type,sf_base.group_plan_dispatch,1,1,1,0
|
||||||
|
|||||||
|
@@ -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_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_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
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -19,7 +19,7 @@
|
|||||||
],
|
],
|
||||||
'assets': {
|
'assets': {
|
||||||
'web.assets_backend': [
|
'web.assets_backend': [
|
||||||
'jikimo_sfs/zpl_print/static/src/scss/changes.scss'
|
# 'jikimo_sfs/zpl_print/static/src/scss/changes.scss'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'license': 'LGPL-3',
|
'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'公用类'
|
_description = u'公用类'
|
||||||
|
|
||||||
def print_zpl(self, zpl_str):
|
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:
|
try:
|
||||||
tsclibrary = ctypes.WinDLL(WinDll_path)
|
tsclibrary = ctypes.WinDLL(WinDll_path)
|
||||||
tsclibrary.openportW("USB")
|
tsclibrary.openportW("USB")
|
||||||
|
print(type(zpl_str))
|
||||||
print(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')
|
print('111222')
|
||||||
tsclibrary.printlabelW("0", "1");
|
tsclibrary.printlabelW("0", "1")
|
||||||
tsclibrary.closeport();
|
tsclibrary.closeport()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise UserWarning("错误警告:%s" % e)
|
raise UserWarning("错误警告:%s" % e)
|
||||||
|
|||||||
Reference in New Issue
Block a user