[REM] stock: unused last_done_picking field
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user