summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2019-07-04 13:57:23 +0000
committersvs-odoo <svs@odoo.com>2019-07-08 07:20:36 +0000
commitd3a23ab5ec8eac9bd8f67e91bbf72ef8a987a9ae (patch)
tree8832496ca240f8fbb997796b8bf5cbc167c5d67e
parentca672eebacbbbbdf68466b689872079bc90a4cf7 (diff)
[REM] stock: unused `last_done_picking` field
-rw-r--r--addons/stock/models/stock_picking.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 06f7d2e4247..19940dd9b47 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -2,7 +2,6 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import namedtuple
-import json
import time
from datetime import date
@@ -54,7 +53,6 @@ class PickingType(models.Model):
help="If this checkbox is ticked, the pickings lines will represent detailed stock operations. If not, the picking lines will represent an aggregate of detailed stock operations.")
# Statistics for the kanban view
- last_done_picking = fields.Char('Last 10 Done Pickings', compute='_compute_last_done_picking')
count_picking_draft = fields.Integer(compute='_compute_picking_count')
count_picking_ready = fields.Integer(compute='_compute_picking_count')
count_picking = fields.Integer(compute='_compute_picking_count')
@@ -66,18 +64,6 @@ class PickingType(models.Model):
barcode = fields.Char('Barcode', copy=False)
company_id = fields.Many2one('res.company', 'Company', related='warehouse_id.company_id', store=True)
- def _compute_last_done_picking(self):
- for type in self:
- tristates = []
- for picking in self.env['stock.picking'].search([('picking_type_id', '=', type.id), ('state', '=', 'done')], order='date_done desc', limit=10):
- if picking.date_done > picking.date:
- tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('Late'), 'value': -1})
- elif picking.backorder_id:
- tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('Backorder exists'), 'value': 0})
- else:
- tristates.insert(0, {'tooltip': picking.name or '' + ": " + _('OK'), 'value': 1})
- type.last_done_picking = json.dumps(tristates)
-
def _compute_picking_count(self):
# TDE TODO count picking can be done using previous two
domains = {