From 31260e8921e46d2826370d0928c3e59b32924313 Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Thu, 7 Dec 2023 17:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9D=83=E9=99=90=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 4 +- sf_sale/models/auto_quatotion_common.py | 2 +- sf_sale/models/quick_easy_order.py | 4 +- sf_warehouse/models/model.py | 68 ++++ sf_warehouse/views/view.xml | 411 +++++++++++++------- 5 files changed, 337 insertions(+), 152 deletions(-) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index bed75e6d..83ff3df4 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -6,8 +6,8 @@ import os from odoo import models, fields, api, _ from odoo.exceptions import ValidationError from odoo.modules import get_resource_path -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +#from OCC.Extend.DataExchange import read_step_file +#from OCC.Extend.DataExchange import write_stl_file class ResProductMo(models.Model): diff --git a/sf_sale/models/auto_quatotion_common.py b/sf_sale/models/auto_quatotion_common.py index 09ea3f0f..1b29c6d2 100644 --- a/sf_sale/models/auto_quatotion_common.py +++ b/sf_sale/models/auto_quatotion_common.py @@ -2,7 +2,7 @@ import logging from odoo.modules import get_resource_path from odoo import fields, models, api -from quatotion import readSql, feature_recognize, auto_quatotion +#from quatotion import readSql, feature_recognize, auto_quatotion __author__ = 'jinling.yang' _logger = logging.getLogger(__name__) diff --git a/sf_sale/models/quick_easy_order.py b/sf_sale/models/quick_easy_order.py index 1e5f274c..5ec1fd52 100644 --- a/sf_sale/models/quick_easy_order.py +++ b/sf_sale/models/quick_easy_order.py @@ -5,8 +5,8 @@ import os import json from datetime import datetime import requests -from OCC.Extend.DataExchange import read_step_file -from OCC.Extend.DataExchange import write_stl_file +#from OCC.Extend.DataExchange import read_step_file +#from OCC.Extend.DataExchange import write_stl_file from odoo import models, fields, api from odoo.modules import get_resource_path from odoo.exceptions import ValidationError, UserError diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index c8937cf4..0151b10b 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -11,6 +11,14 @@ class SfLocation(models.Model): name = fields.Char('Location Name', required=True, size=20) barcode = fields.Char('Barcode', copy=False, size=15) + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' + # 仓库类别(selection:库区、库位、货位) # location_type = fields.Selection([ # ('库区', '库区'), @@ -500,3 +508,63 @@ class SfProcurementGroup(models.Model): res = Rule.search(expression.AND([[('route_id', 'in', warehouse_routes.ids)], domain]), order='route_sequence, sequence', limit=1) return res + + +class SfWarehouse(models.Model): + _inherit = 'stock.warehouse' + + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' + + +class SfRule(models.Model): + _inherit = 'stock.rule' + + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' + + +class SfRoute(models.Model): + _inherit = 'stock.route' + + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' + + +class SfPickingType(models.Model): + _inherit = 'stock.picking.type' + + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' + + +class SfProductCategory(models.Model): + _inherit = 'product.category' + + check_state = fields.Selection([ + ('enable', '启用'), + ('close', '关闭') + ], string='审核状态', default='close') + + def action_check(self): + self.check_state = 'enable' diff --git a/sf_warehouse/views/view.xml b/sf_warehouse/views/view.xml index b80177bc..87a82651 100644 --- a/sf_warehouse/views/view.xml +++ b/sf_warehouse/views/view.xml @@ -1,167 +1,284 @@ - - - - - - - - - - - + + + + + + + + + + + - - stock.location.form.sf.inherit - stock.location - - - - - + + stock.location.form.sf.inherit + stock.location + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + +
+
+
+ + + + + + + -
+ +
+ +
-
-
- - - - -
-
-
- - - - - - - -
-
+ + + - - stock.location.search.sf.inherit - stock.location - - - - - - - - - example.kanban - stock.location - - - - -
+ stock.location.search.sf.inherit + stock.location + + + + + + + + + example.kanban + stock.location + + + + +
- -
-
- + +
+
+ +
+
+ +
+ +
+
+ + | + +
-
- -
- -
-
- - | - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ - - 货位状态 - ir.actions.act_window - stock.location - kanban,form - + + 货位状态 + ir.actions.act_window + stock.location + kanban,form + - - - - - - - - - - - + + + + + + + + + + + - - - + + + + + + + stock.warehouse.form.sf.inherit + stock.warehouse + + + +
+ +
+ +
+
+
- + + + stock.route.form.sf.inherit + stock.route + + + +
+ +
+ +
+
+
+ + + + stock.rule.form.sf.inherit + stock.rule + + + +
+ +
+ +
+
+
+ + + + stock.picking.type.form.sf.inherit + stock.picking.type + + + +
+ +
+ +
+
+
+ + + + + product.category.form.sf.inherit + product.category + + + +
+ +
+ +
+
+
+