From 03cc1e81a8709199f1c808fb73cf1602da5aba27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Voet=20=28ryv=29?= Date: Thu, 26 Nov 2020 10:07:53 +0000 Subject: [PATCH] [REF] stock: remove useless `name_get` In the model `stock.quant.package`, the `_compute_complete_name` and the `name_get` mimics the default one (`_rec_name = "name"`). Then remove clean it. task-2373638 --- addons/stock/models/stock_quant.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index 9c9b854b475..216f88fa4fe 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -670,7 +670,6 @@ class QuantPackage(models.Model): help="""Reusable boxes are used for batch picking and emptied afterwards to be reused. In the barcode application, scanning a reusable box will add the products in this box. Disposable boxes aren't reused, when scanning a disposable box in the barcode application, the contained products are added to the transfer.""") - @api.depends('quant_ids.package_id', 'quant_ids.location_id', 'quant_ids.company_id', 'quant_ids.owner_id', 'quant_ids.quantity', 'quant_ids.reserved_quantity') def _compute_package_info(self): for package in self: @@ -685,17 +684,6 @@ class QuantPackage(models.Model): package.company_id = values.get('company_id') package.owner_id = values['owner_id'] - def name_get(self): - return list(self._compute_complete_name().items()) - - def _compute_complete_name(self): - """ Forms complete name of location from parent location to child location. """ - res = {} - for package in self: - name = package.name - res[package.id] = name - return res - def _search_owner(self, operator, value): if value: packs = self.search([('quant_ids.owner_id', operator, value)])