diff --git a/ssi_stock/__manifest__.py b/ssi_stock/__manifest__.py index 7f79e78..16f4126 100644 --- a/ssi_stock/__manifest__.py +++ b/ssi_stock/__manifest__.py @@ -34,6 +34,7 @@ "views/stock_move_views.xml", "views/stock_quant_views.xml", "views/stock_picking_views.xml", + "views/stock_warehouse_views.xml", "views/location_type_views.xml", "views/product_category_views.xml", "views/stock_location_views.xml", diff --git a/ssi_stock/models/__init__.py b/ssi_stock/models/__init__.py index 6af26cf..c7a77d4 100644 --- a/ssi_stock/models/__init__.py +++ b/ssi_stock/models/__init__.py @@ -9,6 +9,7 @@ stock_picking, stock_picking_type, location_type, + stock_warehouse, stock_location, stock_move, stock_move_line, diff --git a/ssi_stock/models/stock_warehouse.py b/ssi_stock/models/stock_warehouse.py new file mode 100644 index 0000000..73f1954 --- /dev/null +++ b/ssi_stock/models/stock_warehouse.py @@ -0,0 +1,30 @@ +# Copyright 2023 OpenSynergy Indonesia +# Copyright 2023 PT. Simetri Sinergi Indonesia +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import fields, models + + +class StockWarehouse(models.Model): + _name = "stock.warehouse" + _inherit = ["stock.warehouse"] + + manager_id = fields.Many2one( + string="Manager", + comodel_name="res.users", + ) + supervisor_ids = fields.Many2many( + string="Supervisors", + comodel_name="res.users", + relation="rel_stock_warehouse_supervisor", + column1="warehouse_id", + column2="user_id", + ) + user_ids = fields.Many2many( + string="Users", + comodel_name="res.users", + relation="rel_stock_warehouse_user", + column1="warehouse_id", + column2="user_id", + ) diff --git a/ssi_stock/views/stock_warehouse_views.xml b/ssi_stock/views/stock_warehouse_views.xml new file mode 100644 index 0000000..d3d6f9d --- /dev/null +++ b/ssi_stock/views/stock_warehouse_views.xml @@ -0,0 +1,22 @@ + + + + + stock.warehouse - form + stock.warehouse + + + + + + + + + + + + + +