diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py
index 3b2649a2..322cf096 100644
--- a/sf_tool_management/wizard/wizard.py
+++ b/sf_tool_management/wizard/wizard.py
@@ -300,29 +300,32 @@ class FunctionalToolAssemblyOrder(models.TransientModel):
智能工厂组装单处扫码绑定刀具物料')
"""
for record in self:
- records = record.env['stock.lot'].search([('name', '=', barcode)])
- if not records:
- raise ValidationError('扫描的条形码数据不存在,请重新扫描!')
- for record_stock_lot in records:
- if record_stock_lot.quant_ids[-1].location_id.name == '刀具组装位置':
- raise ValidationError('该刀具物料已使用,请重新选择!!!')
- elif record_stock_lot.quant_ids[-1].location_id.name not in '刀具房':
- raise ValidationError('该刀具物料未入库,请重新选择!!!')
- tool_material_name = record_stock_lot.product_id.cutting_tool_material_id.name
- if tool_material_name == '整体式刀具':
- record.integral_code_id = record_stock_lot.id
- elif tool_material_name == '刀片':
- record.blade_code_id = record_stock_lot.id
- elif tool_material_name == '刀杆':
- record.bar_code_id = record_stock_lot.id
- elif tool_material_name == '刀盘':
- record.pad_code_id = record_stock_lot.id
- elif tool_material_name == '刀柄':
- record.handle_code_id = record_stock_lot.id
- elif tool_material_name == '夹头':
- record.chuck_code_id = record_stock_lot.id
- else:
- raise ValidationError('扫描的刀具物料不存在,请重新扫描!')
+ if 'DJWL' in barcode:
+ records = record.env['stock.lot'].search([('name', '=', barcode)])
+ if not records:
+ raise ValidationError('扫描的条形码数据不存在,请重新扫描!')
+ for record_stock_lot in records:
+ if record_stock_lot.quant_ids[-1].location_id.name == '刀具组装位置':
+ raise ValidationError('该刀具物料已使用,请重新选择!!!')
+ elif record_stock_lot.quant_ids[-1].location_id.name not in '刀具房':
+ raise ValidationError('该刀具物料未入库,请重新选择!!!')
+ tool_material_name = record_stock_lot.product_id.cutting_tool_material_id.name
+ if tool_material_name == '整体式刀具':
+ record.integral_code_id = record_stock_lot.id
+ elif tool_material_name == '刀片':
+ record.blade_code_id = record_stock_lot.id
+ elif tool_material_name == '刀杆':
+ record.bar_code_id = record_stock_lot.id
+ elif tool_material_name == '刀盘':
+ record.pad_code_id = record_stock_lot.id
+ elif tool_material_name == '刀柄':
+ record.handle_code_id = record_stock_lot.id
+ elif tool_material_name == '夹头':
+ record.chuck_code_id = record_stock_lot.id
+ else:
+ raise ValidationError('扫描的刀具物料不存在,请重新扫描!')
+ else:
+ record.rfid = barcode
# 组装功能刀具参数信息
barcode_id = fields.Many2one('stock.lot', string='功能刀具序列号')
@@ -676,7 +679,8 @@ class ProductProduct(models.Model):
location_inventory_id = self.env['stock.location'].search([('name', '=', 'Production')])
stock_location_id = self.env['stock.location'].search([('name', '=', '组装后')])
# 创建功能刀具该批次/序列号 库存移动和移动历史
- stock_lot.create_stock_quant(location_inventory_id, stock_location_id, functional_tool_assembly.id)
+ stock_lot.create_stock_quant(location_inventory_id, stock_location_id, functional_tool_assembly.id,
+ '功能刀具组装')
return stock_lot
@@ -710,20 +714,20 @@ 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, '功能刀具组装')
class StockLot(models.Model):
_inherit = 'stock.lot'
- def create_stock_quant(self, location_inventory_id, stock_location_id, functional_tool_assembly_id):
+ def create_stock_quant(self, location_inventory_id, stock_location_id, functional_tool_assembly_id, name):
"""
对功能刀具组装过程的功能刀具和刀具物料进行库存移动,以及创建移动历史
"""
# 创建库存移动记录
- stock_move_id = self.env['stock.move'].create({
- 'name': '功能刀具组装',
+ stock_move_id = self.env['stock.move'].sudo().create({
+ 'name': name,
'product_id': self.product_id.id,
'location_id': location_inventory_id.id,
'location_dest_id': stock_location_id.id,
@@ -732,7 +736,7 @@ class StockLot(models.Model):
})
# 创建移动历史记录
- stock_move_line_id = self.env['stock.move.line'].create({
+ stock_move_line_id = self.env['stock.move.line'].sudo().create({
'product_id': self.product_id.id,
'functional_tool_name_id': functional_tool_assembly_id,
'lot_id': self.id,
diff --git a/sf_warehouse/security/ir.model.access.csv b/sf_warehouse/security/ir.model.access.csv
index 603d283d..8127cdbd 100644
--- a/sf_warehouse/security/ir.model.access.csv
+++ b/sf_warehouse/security/ir.model.access.csv
@@ -1,105 +1,104 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_sf_shelf_location_group_sf_stock_user,sf.shelf.location,model_sf_shelf_location,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_sf_shelf_location_group_sf_stock_user_group_sf_stock_user,sf.shelf.location,model_sf_shelf_location,sf_warehouse.group_sf_stock_user,1,0,0,0
access_sf_shelf_location_group_sf_stock_manager,sf.shelf.location,model_sf_shelf_location,sf_warehouse.group_sf_stock_manager,1,1,1,0
-access_sf_shelf_group_sf_stock_user,sf.shelf.group.sf.stock.user,model_sf_shelf,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_sf_shelf_group_sf_stock_user_group_sf_stock_user,sf.shelf.group.sf.stock.user,model_sf_shelf,sf_warehouse.group_sf_stock_user,1,0,0,0
access_sf_shelf_group_sf_stock_manager,sf.shelf.group.sf.stock.manager,model_sf_shelf,sf_warehouse.group_sf_stock_manager,1,1,1,0
access_procurement_group,procurement.group,stock.model_procurement_group,base.group_user,1,1,1,0
-access_stock_warehouse_manager,stock.warehouse.manager,stock.model_stock_warehouse,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_warehouse_manager_group_sf_stock_user,stock.warehouse.manager,stock.model_stock_warehouse,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_warehouse_user,stock.warehouse.user,stock.model_stock_warehouse,base.group_user,1,0,0,0
access_stock_location_partner_manager,stock.location.partner.manager,stock.model_stock_location,base.group_partner_manager,1,0,0,0
-access_stock_location_manager,stock.location.manager,stock.model_stock_location,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_location_manager_group_sf_stock_user,stock.location.manager,stock.model_stock_location,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_location_user,stock.location.user,stock.model_stock_location,base.group_user,1,0,0,0
-access_stock_picking_user,stock.picking user,stock.model_stock_picking,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_picking_manager,stock.picking manager,stock.model_stock_picking,sf_warehouse.group_sf_stock_user,1,1,1,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_stock_picking_user_group_sf_stock_user,stock.picking user,stock.model_stock_picking,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_picking_manager_group_sf_stock_user,stock.picking manager,stock.model_stock_picking,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_picking_type_all,stock.picking.type all users,stock.model_stock_picking_type,base.group_user,1,0,0,0
-access_stock_picking_type_user,stock.picking.type user,stock.model_stock_picking_type,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_stock_picking_type_manager,stock.picking.type manager,stock.model_stock_picking_type,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_lot_user,stock.lot user,stock.model_stock_lot,sf_warehouse.group_sf_stock_user,1,1,1,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_stock_move_manager,stock.move manager,stock.model_stock_move,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_move_user,stock.move user,stock.model_stock_move,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_product_stock_user,product_product_stock_user,product.model_product_product,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_product_template_stock_user,product.template stock user,product.model_product_template,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_uom_category_stock_manager,uom.category stock_manager,uom.model_uom_category,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_uom_uom_stock_manager,uom.uom stock_manager,uom.model_uom_uom,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_category_stock_manager,product.category stock_manager,product.model_product_category,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_template_stock_manager,product.template stock_manager,product.model_product_template,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_product_stock_manager,product.product stock_manager,product.model_product_product,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_packaging_stock_manager,product.packaging stock_manager,product.model_product_packaging,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_supplierinfo_stock_manager,product.supplierinfo stock_manager,product.model_product_supplierinfo,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_pricelist_stock_manager,product.pricelist stock_manager,product.model_product_pricelist,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_group_res_partner_stock_manager,res_partner group_stock_manager,base.model_res_partner,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_pricelist_item_stock_manager,product.pricelist.item stock_manager,product.model_product_pricelist_item,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_tag_stock_manager,product.tag.stock.manager,product.model_product_tag,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_stock_warehouse_orderpoint_system,stock.warehouse.orderpoint system,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_quant_user,stock.quant user,stock.model_stock_quant,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_picking_type_user_group_sf_stock_user,stock.picking.type user,stock.model_stock_picking_type,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_stock_picking_type_manager_group_sf_stock_user,stock.picking.type manager,stock.model_stock_picking_type,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_lot_user_group_sf_stock_user,stock.lot user,stock.model_stock_lot,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_move_manager_group_sf_stock_user,stock.move manager,stock.model_stock_move,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_move_user_group_sf_stock_user,stock.move user,stock.model_stock_move,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_product_stock_user_group_sf_stock_user,product_product_stock_user,product.model_product_product,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_product_template_stock_user_group_sf_stock_user,product.template stock user,product.model_product_template,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_uom_category_stock_manager_group_sf_stock_user,uom.category stock_manager,uom.model_uom_category,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_uom_uom_stock_manager_group_sf_stock_user,uom.uom stock_manager,uom.model_uom_uom,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_category_stock_manager_group_sf_stock_user,product.category stock_manager,product.model_product_category,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_template_stock_manager_group_sf_stock_user,product.template stock_manager,product.model_product_template,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_product_stock_manager_group_sf_stock_user,product.product stock_manager,product.model_product_product,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_packaging_stock_manager_group_sf_stock_user,product.packaging stock_manager,product.model_product_packaging,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_supplierinfo_stock_manager_group_sf_stock_user,product.supplierinfo stock_manager,product.model_product_supplierinfo,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_pricelist_stock_manager_group_sf_stock_user,product.pricelist stock_manager,product.model_product_pricelist,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_group_res_partner_stock_manager_group_sf_stock_user,res_partner group_stock_manager,base.model_res_partner,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_pricelist_item_stock_manager_group_sf_stock_user,product.pricelist.item stock_manager,product.model_product_pricelist_item,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_tag_stock_manager_group_sf_stock_user,product.tag.stock.manager,product.model_product_tag,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_warehouse_orderpoint_group_sf_stock_user,stock.warehouse.orderpoint,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_stock_warehouse_orderpoint_system_group_sf_stock_user,stock.warehouse.orderpoint system,stock.model_stock_warehouse_orderpoint,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_quant_user_group_sf_stock_user,stock.quant user,stock.model_stock_quant,sf_warehouse.group_sf_stock_user,1,1,1,0
+
access_stock_quant_all,stock.quant all users,stock.model_stock_quant,base.group_user,1,0,0,0
access_stock_quant_package_all,stock.quant.package all users,stock.model_stock_quant_package,base.group_user,1,0,0,0
-access_stock_quant_package_stock_manager,stock.quant.package stock manager,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_quant_package_stock_user,stock.quant.package stock user,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_quant_package_stock_manager_group_sf_stock_user,stock.quant.package stock manager,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_quant_package_stock_user_group_sf_stock_user,stock.quant.package stock user,stock.model_stock_quant_package,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_package_level_all,stock.package_level all users,stock.model_stock_package_level,base.group_user,1,0,0,0
-access_stock_package_level_stock_manager,stock.package_level stock manager,stock.model_stock_package_level,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_package_level_stock_user,stock.package_level stock user,stock.model_stock_package_level,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_rule_user,stock_rule user,stock.model_stock_rule,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_stock_rule_stock_manager,stock_rule stock manager,stock.model_stock_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_location_route_stock_manager,stock.route,stock.model_stock_route,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_package_level_stock_manager_group_sf_stock_user,stock.package_level stock manager,stock.model_stock_package_level,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_package_level_stock_user_group_sf_stock_user,stock.package_level stock user,stock.model_stock_package_level,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_rule_user_group_sf_stock_user,stock_rule user,stock.model_stock_rule,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_stock_rule_stock_manager_group_sf_stock_user,stock_rule stock manager,stock.model_stock_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_location_route_stock_manager_group_sf_stock_user,stock.route,stock.model_stock_route,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_location_route,stock.route,stock.model_stock_route,base.group_user,1,0,0,0
access_stock_rule_internal,stock.rule.flow internal,stock.model_stock_rule,base.group_user,1,0,0,0
-access_stock_move_line_manager,stock.move.line manager,stock.model_stock_move_line,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_move_line_user,stock.move.line user,stock.model_stock_move_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_move_line_manager_group_sf_stock_user,stock.move.line manager,stock.model_stock_move_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_move_line_user_group_sf_stock_user,stock.move.line user,stock.model_stock_move_line,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_move_line_all,stock.move.line all users,stock.model_stock_move_line,base.group_user,1,1,1,0
access_stock_putaway_all,stock.putaway.rule all users,stock.model_stock_putaway_rule,base.group_user,1,0,0,0
-access_stock_putaway_manager,stock.putaway.rule all managers,stock.model_stock_putaway_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_putaway_manager_group_sf_stock_user,stock.putaway.rule all managers,stock.model_stock_putaway_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_removal_all,product.removal all users,stock.model_product_removal,base.group_user,1,0,0,0
-access_barcode_nomenclature_stock_user,barcode.nomenclature.stock.user,barcodes.model_barcode_nomenclature,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_barcode_nomenclature_stock_manager,barcode.nomenclature.stock.manager,barcodes.model_barcode_nomenclature,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_barcode_rule_stock_user,barcode.rule.stock.user,barcodes.model_barcode_rule,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_barcode_rule_stock_manager,barcode.rule.stock.manager,barcodes.model_barcode_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_scrap_user,stock.scrap.user,stock.model_stock_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_scrap_manager,stock.scrap.manager,stock.model_stock_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_attribute_manager,product.attribute manager,product.model_product_attribute,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_attribute_value_manager,product.attribute manager value,product.model_product_attribute_value,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_product_attribute_manager,product.product.attribute manager value,product.model_product_template_attribute_value,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_template_attribute_exclusion_manager,product.attribute manager filter line,product.model_product_template_attribute_exclusion,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_template_attribute_line_manager,product.attribute manager line,product.model_product_template_attribute_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_barcode_nomenclature_stock_user_group_sf_stock_user,barcode.nomenclature.stock.user,barcodes.model_barcode_nomenclature,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_barcode_nomenclature_stock_manager_group_sf_stock_user,barcode.nomenclature.stock.manager,barcodes.model_barcode_nomenclature,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_barcode_rule_stock_user_group_sf_stock_user,barcode.rule.stock.user,barcodes.model_barcode_rule,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_barcode_rule_stock_manager_group_sf_stock_user,barcode.rule.stock.manager,barcodes.model_barcode_rule,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_scrap_user_group_sf_stock_user,stock.scrap.user,stock.model_stock_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_scrap_manager_group_sf_stock_user,stock.scrap.manager,stock.model_stock_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_attribute_manager_group_sf_stock_user,product.attribute manager,product.model_product_attribute,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_attribute_value_manager_group_sf_stock_user,product.attribute manager value,product.model_product_attribute_value,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_product_attribute_manager_group_sf_stock_user,product.product.attribute manager value,product.model_product_template_attribute_value,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_template_attribute_exclusion_manager_group_sf_stock_user,product.attribute manager filter line,product.model_product_template_attribute_exclusion,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_template_attribute_line_manager_group_sf_stock_user,product.attribute manager line,product.model_product_template_attribute_line,sf_warehouse.group_sf_stock_user,1,1,1,0
access_report_stock_quantity,access_report_stock_quantity,stock.model_report_stock_quantity,base.group_user,1,0,0,0
-access_stock_traceability_report,access.stock.traceability.report,stock.model_stock_traceability_report,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_assign_serial,access.stock.assign.serial,stock.model_stock_assign_serial,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_return_picking_line,access.stock.return.picking.line,stock.model_stock_return_picking_line,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_return_picking,access.stock.return.picking,stock.model_stock_return_picking,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_change_product_qty,access.stock.change.product.qty,stock.model_stock_change_product_qty,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_scheduler_compute,access.stock.scheduler.compute,stock.model_stock_scheduler_compute,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_immediate_transfer_line,access.stock.immediate.transfer.line,stock.model_stock_immediate_transfer_line,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_immediate_transfer,access.stock.immediate.transfer,stock.model_stock_immediate_transfer,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_backorder_confirmation_line,access.stock.backorder.confirmation.line,stock.model_stock_backorder_confirmation_line,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_backorder_confirmation,access.stock.backorder.confirmation,stock.model_stock_backorder_confirmation,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_quantity_history,access.stock.quantity.history,stock.model_stock_quantity_history,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_rules_report,access.stock.rules.report,stock.model_stock_rules_report,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_warn_insufficient_qty_scrap,access.stock.warn.insufficient.qty.scrap,stock.model_stock_warn_insufficient_qty_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_product_replenish,access.product.replenish,stock.model_product_replenish,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_track_confirmation,access.stock.track.confirmation,stock.model_stock_track_confirmation,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_track_line,access.stock.track.line,stock.model_stock_track_line,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_package_destination,access.stock.package.destination,stock.model_stock_package_destination,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_orderpoint_snooze,access_stock_orderpoint_snooze,stock.model_stock_orderpoint_snooze,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_package_type_user,access_stock_package_type_user,stock.model_stock_package_type,sf_warehouse.group_sf_stock_user,1,0,0,0
-access_stock_package_type_manager,access_stock_package_type_manager,stock.model_stock_package_type,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_storage_category_user,stock.storage.category.user,stock.model_stock_storage_category,base.group_user,1,0,0,0
-access_stock_storage_category_manager,stock.storage.category.manager,stock.model_stock_storage_category,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_traceability_report_group_sf_stock_user,access.stock.traceability.report,stock.model_stock_traceability_report,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_assign_serial_group_sf_stock_user,access.stock.assign.serial,stock.model_stock_assign_serial,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_return_picking_line_group_sf_stock_user,access.stock.return.picking.line,stock.model_stock_return_picking_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_return_picking_group_sf_stock_user,access.stock.return.picking,stock.model_stock_return_picking,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_change_product_qty_group_sf_stock_user,access.stock.change.product.qty,stock.model_stock_change_product_qty,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_scheduler_compute_group_sf_stock_user,access.stock.scheduler.compute,stock.model_stock_scheduler_compute,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_immediate_transfer_line_group_sf_stock_user,access.stock.immediate.transfer.line,stock.model_stock_immediate_transfer_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_immediate_transfer_group_sf_stock_user,access.stock.immediate.transfer,stock.model_stock_immediate_transfer,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_backorder_confirmation_line_group_sf_stock_user,access.stock.backorder.confirmation.line,stock.model_stock_backorder_confirmation_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_backorder_confirmation_group_sf_stock_user,access.stock.backorder.confirmation,stock.model_stock_backorder_confirmation,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_quantity_history_group_sf_stock_user,access.stock.quantity.history,stock.model_stock_quantity_history,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_rules_report_group_sf_stock_user,access.stock.rules.report,stock.model_stock_rules_report,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_warn_insufficient_qty_scrap_group_sf_stock_user,access.stock.warn.insufficient.qty.scrap,stock.model_stock_warn_insufficient_qty_scrap,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_product_replenish_group_sf_stock_user,access.product.replenish,stock.model_product_replenish,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_track_confirmation_group_sf_stock_user,access.stock.track.confirmation,stock.model_stock_track_confirmation,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_track_line_group_sf_stock_user,access.stock.track.line,stock.model_stock_track_line,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_package_destination_group_sf_stock_user,access.stock.package.destination,stock.model_stock_package_destination,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_orderpoint_snooze_group_sf_stock_user,access_stock_orderpoint_snooze,stock.model_stock_orderpoint_snooze,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_package_type_user_group_sf_stock_user,access_stock_package_type_user,stock.model_stock_package_type,sf_warehouse.group_sf_stock_user,1,0,0,0
+access_stock_package_type_manager_group_sf_stock_user,access_stock_package_type_manager,stock.model_stock_package_type,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_storage_category_user_group_sf_stock_user,stock.storage.category.user,stock.model_stock_storage_category,base.group_user,1,0,0,0
+access_stock_storage_category_manager_group_sf_stock_user,stock.storage.category.manager,stock.model_stock_storage_category,sf_warehouse.group_sf_stock_user,1,1,1,0
access_stock_storage_category_capacity_user,stock.storage.category.capacity.user,stock.model_stock_storage_category_capacity,base.group_user,1,0,0,0
-access_stock_storage_category_capacity_manager,stock.storage.category.capacity.manager,stock.model_stock_storage_category_capacity,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_inventory_conflict,stock.inventory.conflict,stock.model_stock_inventory_conflict,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_inventory_warning,stock.inventory.warning,stock.model_stock_inventory_warning,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_inventory_adjustment_name,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_request_count,stock.request.count,stock.model_stock_request_count,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_replenishment_info,stock.replenishment.info,stock.model_stock_replenishment_info,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_picking_label_type_user,picking.label.type.user,stock.model_picking_label_type,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_lot_label_layout_user,lot.label.layout.user,stock.model_lot_label_layout,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_stock_replenish_option,stock.replenishment.option,stock.model_stock_replenishment_option,sf_warehouse.group_sf_stock_user,1,1,1,0
-access_mrp_production,mrp.production,mrp.model_mrp_production,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_storage_category_capacity_manager_group_sf_stock_user,stock.storage.category.capacity.manager,stock.model_stock_storage_category_capacity,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_inventory_conflict_group_sf_stock_user,stock.inventory.conflict,stock.model_stock_inventory_conflict,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_inventory_warning_group_sf_stock_user,stock.inventory.warning,stock.model_stock_inventory_warning,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_inventory_adjustment_name_group_sf_stock_user,stock.inventory.adjustment.name,stock.model_stock_inventory_adjustment_name,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_request_count_group_sf_stock_user,stock.request.count,stock.model_stock_request_count,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_replenishment_info_group_sf_stock_user,stock.replenishment.info,stock.model_stock_replenishment_info,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_picking_label_type_user_group_sf_stock_user,picking.label.type.user,stock.model_picking_label_type,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_lot_label_layout_user_group_sf_stock_user,lot.label.layout.user,stock.model_lot_label_layout,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_stock_replenish_option_group_sf_stock_user,stock.replenishment.option,stock.model_stock_replenishment_option,sf_warehouse.group_sf_stock_user,1,1,1,0
+access_mrp_production_group_sf_stock_user,mrp.production,mrp.model_mrp_production,sf_warehouse.group_sf_stock_user,1,1,1,0
access_sf_shelf_location_group_plan_dispatch,sf.shelf.location,model_sf_shelf_location,sf_base.group_plan_dispatch,1,0,0,0
access_stock_move,stock.move,stock.model_stock_move,sf_base.group_plan_dispatch,1,1,1,0
diff --git a/zpl_print/models/common.py b/zpl_print/models/common.py
index d45f74e0..6e4e7eca 100644
--- a/zpl_print/models/common.py
+++ b/zpl_print/models/common.py
@@ -8,7 +8,7 @@ class Common(models.Model):
_description = u'公用类'
def print_zpl(self, zpl_str):
- WinDll_path = "D://桌面//pythonZPL//tsc_python_sdk_example//TSC_Python_SDK_Example//tsc_sample//libs//TSCLIB.dll"
+ WinDll_path = "D://桌面//pythonZPL//zebra_zpl//libs//TSCLIB.dll"
try:
tsclibrary = ctypes.WinDLL(WinDll_path)
tsclibrary.openportW("USB")