diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 273857c1019..63c82ecece7 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -73,8 +73,6 @@ class PickingType(models.Model):
count_picking_waiting = fields.Integer(compute='_compute_picking_count')
count_picking_late = fields.Integer(compute='_compute_picking_count')
count_picking_backorders = fields.Integer(compute='_compute_picking_count')
- rate_picking_late = fields.Integer(compute='_compute_picking_count')
- rate_picking_backorders = fields.Integer(compute='_compute_picking_count')
barcode = fields.Char('Barcode', copy=False)
company_id = fields.Many2one(
'res.company', 'Company', required=True,
@@ -122,7 +120,6 @@ class PickingType(models.Model):
return super(PickingType, self).write(vals)
def _compute_picking_count(self):
- # TDE TODO count picking can be done using previous two
domains = {
'count_picking_draft': [('state', '=', 'draft')],
'count_picking_waiting': [('state', 'in', ('confirmed', 'waiting'))],
@@ -141,9 +138,6 @@ class PickingType(models.Model):
}
for record in self:
record[field] = count.get(record.id, 0)
- for record in self:
- record.rate_picking_late = record.count_picking and record.count_picking_late * 100 / record.count_picking or 0
- record.rate_picking_backorders = record.count_picking and record.count_picking_backorders * 100 / record.count_picking or 0
def name_get(self):
""" Display 'Warehouse_name: PickingType_name' """
diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py
index a0c9de9a738..956a931a228 100644
--- a/addons/stock/models/stock_warehouse.py
+++ b/addons/stock/models/stock_warehouse.py
@@ -75,14 +75,12 @@ class Warehouse(models.Model):
crossdock_route_id = fields.Many2one('stock.location.route', 'Crossdock Route', ondelete='restrict')
reception_route_id = fields.Many2one('stock.location.route', 'Receipt Route', ondelete='restrict')
delivery_route_id = fields.Many2one('stock.location.route', 'Delivery Route', ondelete='restrict')
- warehouse_count = fields.Integer(compute='_compute_warehouse_count')
resupply_wh_ids = fields.Many2many(
'stock.warehouse', 'stock_wh_resupply_table', 'supplied_wh_id', 'supplier_wh_id',
'Resupply From', help="Routes will be created automatically to resupply this warehouse from the warehouses ticked")
resupply_route_ids = fields.One2many(
'stock.location.route', 'supplied_wh_id', 'Resupply Routes',
help="Routes will be created for these resupply warehouses and you can select them on products and product categories")
- show_resupply = fields.Boolean(compute="_compute_show_resupply")
sequence = fields.Integer(default=10,
help="Gives the sequence of this line when displaying the warehouses.")
_sql_constraints = [
@@ -90,15 +88,6 @@ class Warehouse(models.Model):
('warehouse_code_uniq', 'unique(code, company_id)', 'The code of the warehouse must be unique per company!'),
]
- @api.depends('name')
- def _compute_warehouse_count(self):
- for warehouse in self:
- warehouse.warehouse_count = self.env['stock.warehouse'].search_count([('id', 'not in', warehouse.ids)])
-
- def _compute_show_resupply(self):
- for warehouse in self:
- warehouse.show_resupply = warehouse.user_has_groups("stock.group_stock_multi_warehouses") and warehouse.warehouse_count
-
@api.model
def create(self, vals):
# create view location for warehouse then create all locations
diff --git a/addons/stock/views/stock_warehouse_views.xml b/addons/stock/views/stock_warehouse_views.xml
index c25df973d78..85492eadb89 100644
--- a/addons/stock/views/stock_warehouse_views.xml
+++ b/addons/stock/views/stock_warehouse_views.xml
@@ -34,10 +34,8 @@
-
-
-
-
+
+