From b43c3496a1d70e2b19e0f8258871c6facd6d295f Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Fri, 19 Apr 2024 10:49:48 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=B4=A7=E4=BD=8D=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=B7=BB=E5=8A=A0=E8=B4=A7=E4=BD=8D=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E5=BC=B9=E7=AA=97=E6=A8=A1=E5=9D=97=E5=8F=8A=E5=85=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8C=89=E9=92=AE=EF=BC=8C=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=9C=A8=E5=90=8C=E5=BA=93=E5=8C=BA=E7=9A=84?= =?UTF-8?q?=E5=86=85=E9=83=A8=E8=B4=A7=E4=BD=8D=E7=A7=BB=E5=8A=A8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_warehouse/__init__.py | 1 + sf_warehouse/__manifest__.py | 1 + sf_warehouse/models/model.py | 5 -- sf_warehouse/security/ir.model.access.csv | 3 ++ sf_warehouse/views/shelf_location.xml | 22 +++++--- sf_warehouse/wizard/__init__.py | 1 + sf_warehouse/wizard/wizard.py | 64 +++++++++++++++++++++++ sf_warehouse/wizard/wizard_view.xml | 49 +++++++++++++++++ 8 files changed, 135 insertions(+), 11 deletions(-) create mode 100644 sf_warehouse/wizard/__init__.py create mode 100644 sf_warehouse/wizard/wizard.py create mode 100644 sf_warehouse/wizard/wizard_view.xml diff --git a/sf_warehouse/__init__.py b/sf_warehouse/__init__.py index c081ee06..c9ba0265 100644 --- a/sf_warehouse/__init__.py +++ b/sf_warehouse/__init__.py @@ -1,2 +1,3 @@ # -*-coding:utf-8-*- from . import models +from . import wizard diff --git a/sf_warehouse/__manifest__.py b/sf_warehouse/__manifest__.py index 04051b06..b409c7ce 100644 --- a/sf_warehouse/__manifest__.py +++ b/sf_warehouse/__manifest__.py @@ -15,6 +15,7 @@ 'data/ir_cron_data.xml', 'security/sf_stock_security.xml', 'security/ir.model.access.csv', + 'wizard/wizard_view.xml', 'views/view.xml', 'views/shelf_location.xml', 'views/change_stock_move_views.xml', diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index 98a4b513..50469284 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -829,11 +829,6 @@ class Sf_stock_move_line(models.Model): for record in self: obj = self.env['sf.shelf.location'].search([('name', '=', self.destination_location_id.name)]) - # if obj.product_id and obj.product_id != record.product_id: - # # 判断货位产品和将入到该货位的产品是否是同一种 - # raise ValidationError( - # '【%s】产品和【%s】货位的【%s】产品不同,请重新选择【%s】产品的货位!!!' % - # (record.product_id, obj.name, obj.product_id, record.product_id)) if record.lot_id: shelf_location_obj = self.env['sf.shelf.location'].search( [('product_sn_id', '=', record.lot_id.id)]) diff --git a/sf_warehouse/security/ir.model.access.csv b/sf_warehouse/security/ir.model.access.csv index db246adc..a5b3b2fa 100644 --- a/sf_warehouse/security/ir.model.access.csv +++ b/sf_warehouse/security/ir.model.access.csv @@ -132,6 +132,9 @@ access_sf_cutting_tool_material_group_sf_stock_manager,sf_cutting_tool_material_ access_sf_cutting_tool_standard_library_group_sf_stock_manager,sf_cutting_tool_standard_library_group_sf_stock_manager,sf_base.model_sf_cutting_tool_standard_library,sf_warehouse.group_sf_stock_manager,1,0,1,0 access_sf_tool_materials_basic_parameters_group_sf_stock_manager,sf_tool_materials_basic_parameters_group_sf_stock_manager,sf_base.model_sf_tool_materials_basic_parameters,sf_warehouse.group_sf_stock_manager,1,0,1,0 +access_sf_shelf_location_wizard_group_plan_dispatch,sf_shelf_location_wizard_group_plan_dispatch,model_sf_shelf_location_wizard,sf_base.group_plan_dispatch,1,0,0,0 +access_sf_shelf_location_wizard_group_sf_stock_user_group_sf_stock_user,sf_shelf_location_wizard_group_sf_stock_user_group_sf_stock_user,model_sf_shelf_location_wizard,sf_warehouse.group_sf_stock_user,1,0,0,0 +access_sf_shelf_location_wizard_group_sf_stock_manager,sf_shelf_location_wizard_group_sf_stock_manager,model_sf_shelf_location_wizard,sf_warehouse.group_sf_stock_manager,1,1,1,0 diff --git a/sf_warehouse/views/shelf_location.xml b/sf_warehouse/views/shelf_location.xml index ff8f54b2..a0e1a5c1 100644 --- a/sf_warehouse/views/shelf_location.xml +++ b/sf_warehouse/views/shelf_location.xml @@ -128,7 +128,17 @@
- +