diff --git a/addons/mrp/models/stock_scrap.py b/addons/mrp/models/stock_scrap.py
index a13c52ee589..bec0bf27371 100644
--- a/addons/mrp/models/stock_scrap.py
+++ b/addons/mrp/models/stock_scrap.py
@@ -34,6 +34,3 @@ class StockScrap(models.Model):
else:
vals.update({'raw_material_production_id': self.production_id.id})
return vals
-
- def _get_origin_moves(self):
- return super(StockScrap, self)._get_origin_moves() or self.production_id and self.production_id.move_raw_ids.filtered(lambda x: x.product_id == self.product_id)
diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py
index 01007292c5c..1020f0a1b58 100644
--- a/addons/stock/models/stock_inventory.py
+++ b/addons/stock/models/stock_inventory.py
@@ -527,9 +527,6 @@ class InventoryLine(models.Model):
vals_list.append(vals)
return self.env['stock.move'].create(vals_list)
- def _refresh_inventory(self):
- return self[0].inventory_id.action_open_inventory_lines()
-
def action_refresh_quantity(self):
filtered_lines = self.filtered(lambda l: l.state != 'done')
for line in filtered_lines:
diff --git a/addons/stock/models/stock_location.py b/addons/stock/models/stock_location.py
index 6ce9ac1019b..5160b80c109 100644
--- a/addons/stock/models/stock_location.py
+++ b/addons/stock/models/stock_location.py
@@ -212,21 +212,3 @@ class Route(models.Model):
for route in self:
route.with_context(active_test=False).rule_ids.filtered(lambda ru: ru.active == route.active).toggle_active()
super(Route, self).toggle_active()
-
- def view_product_ids(self):
- return {
- 'name': _('Products'),
- 'view_mode': 'tree,form',
- 'res_model': 'product.template',
- 'type': 'ir.actions.act_window',
- 'domain': [('route_ids', 'in', self.ids)],
- }
-
- def view_categ_ids(self):
- return {
- 'name': _('Product Categories'),
- 'view_mode': 'tree,form',
- 'res_model': 'product.category',
- 'type': 'ir.actions.act_window',
- 'domain': [('route_ids', 'in', self.ids)],
- }
diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py
index 005a2d68f57..66eb4cd5a9f 100644
--- a/addons/stock/models/stock_quant.py
+++ b/addons/stock/models/stock_quant.py
@@ -257,10 +257,6 @@ class StockQuant(models.Model):
if quant.location_id.usage == 'view':
raise ValidationError(_('You cannot take products from or deliver products to a location of type "view".'))
- def _compute_name(self):
- for quant in self:
- quant.name = '%s: %s%s' % (quant.lot_id.name or quant.product_id.code or '', quant.quantity, quant.product_id.uom_id.name)
-
@api.model
def _get_removal_strategy(self, product_id, location_id):
if product_id.categ_id.removal_strategy_id:
@@ -741,21 +737,5 @@ class QuantPackage(models.Model):
action['domain'] = [('id', 'in', pickings.ids)]
return action
- def view_content_package(self):
- action = self.env['ir.actions.act_window'].for_xml_id('stock', 'quantsact')
- action['domain'] = [('id', 'in', self._get_contained_quants().ids)]
- return action
-
def _get_contained_quants(self):
return self.env['stock.quant'].search([('package_id', 'in', self.ids)])
-
- def _get_all_products_quantities(self):
- '''This function computes the different product quantities for the given package
- '''
- # TDE CLEANME: probably to move somewhere else, like in pack op
- res = {}
- for quant in self._get_contained_quants():
- if quant.product_id not in res:
- res[quant.product_id] = 0
- res[quant.product_id] += quant.quantity
- return res
diff --git a/addons/stock/models/stock_scrap.py b/addons/stock/models/stock_scrap.py
index 826f58ed3f4..5690d93bdd4 100644
--- a/addons/stock/models/stock_scrap.py
+++ b/addons/stock/models/stock_scrap.py
@@ -97,9 +97,6 @@ class StockScrap(models.Model):
raise UserError(_('You cannot delete a scrap which is done.'))
return super(StockScrap, self).unlink()
- def _get_origin_moves(self):
- return self.picking_id and self.picking_id.move_lines.filtered(lambda x: x.product_id == self.product_id)
-
def _prepare_move_values(self):
self.ensure_one()
location_id = self.location_id.id
diff --git a/addons/stock/models/stock_warehouse.py b/addons/stock/models/stock_warehouse.py
index 7b688933b08..7fb1a33f1ea 100644
--- a/addons/stock/models/stock_warehouse.py
+++ b/addons/stock/models/stock_warehouse.py
@@ -796,16 +796,6 @@ class Warehouse(models.Model):
self.mapped('wh_pack_stock_loc_id').write({'active': new_delivery_step == 'pick_pack_ship'})
self.mapped('wh_output_stock_loc_id').write({'active': new_delivery_step != 'ship_only'})
- def _location_used(self, location):
- rules = self.env['stock.rule'].search_count([
- '&',
- ('route_id', 'not in', [x.id for x in self.route_ids]),
- '|', ('location_src_id', '=', location.id),
- ('location_id', '=', location.id)])
- if rules:
- return True
- return False
-
# Misc
# ------------------------------------------------------------
@@ -939,7 +929,6 @@ class Warehouse(models.Model):
routes = self.mapped('route_ids') | self.mapped('mto_pull_id').mapped('route_id')
routes |= self.env["stock.location.route"].search([('supplied_wh_id', 'in', self.ids)])
return routes
- get_all_routes_for_wh = _get_all_routes
def action_view_all_routes(self):
routes = self._get_all_routes()
diff --git a/addons/stock/static/src/xml/stock_traceability_report_line.xml b/addons/stock/static/src/xml/stock_traceability_report_line.xml
index fa39b9c3087..00b00eb8a16 100644
--- a/addons/stock/static/src/xml/stock_traceability_report_line.xml
+++ b/addons/stock/static/src/xml/stock_traceability_report_line.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/addons/stock/tests/common2.py b/addons/stock/tests/common2.py
index c56be9c0e06..ec4de635201 100644
--- a/addons/stock/tests/common2.py
+++ b/addons/stock/tests/common2.py
@@ -5,27 +5,6 @@ from odoo.addons.product.tests import common
class TestStockCommon(common.TestProductCommon):
- def _create_pack_operation(self, product, product_qty, picking_id, **values):
- PackOperation = self.env['stock.move.line'].with_user(self.user_stock_manager)
- vals = {
- 'picking_id': picking_id.id,
- 'product_id': product.id,
- 'product_qty': product_qty,
- 'qty_done': product_qty}
- vals.update(**values)
- pack_operation = PackOperation.new(vals)
- pack_operation.onchange_product_id()
- return PackOperation.create(pack_operation._convert_to_write(pack_operation._cache))
-
- def _create_picking_in(self, warehouse):
- Picking = self.env['stock.picking']
- picking_values = {
- 'picking_type_id': warehouse.in_type_id.id,
- 'location_id': self.env.ref('stock.stock_location_suppliers').id,
- 'location_dest_id': warehouse.lot_stock_id.id,
- }
- return Picking.create(picking_values)
-
def _create_move(self, product, src_location, dst_location, **values):
# TDE FIXME: user as parameter
Move = self.env['stock.move'].with_user(self.user_stock_manager)
@@ -36,14 +15,6 @@ class TestStockCommon(common.TestProductCommon):
move_values.update(**values)
return Move.create(move_values)
- def _create_move_in(self, product, warehouse, picking=None, create_picking=False, **values):
- if not picking and create_picking:
- picking = self._create_picking_in(warehouse)
- if picking:
- values['picking_id'] = picking.id
- # TDE FIXME: shouldn't location come from picking ??
- return self._create_move(product, self.env.ref('stock.stock_location_suppliers'), warehouse.lot_stock_id, **values)
-
@classmethod
def setUpClass(cls):
super(TestStockCommon, cls).setUpClass()
diff --git a/addons/stock/views/report_stock_traceability.xml b/addons/stock/views/report_stock_traceability.xml
index 20936403bf0..4e4ad63c6b3 100644
--- a/addons/stock/views/report_stock_traceability.xml
+++ b/addons/stock/views/report_stock_traceability.xml
@@ -38,7 +38,7 @@
-
+