[REF] stock,mrp: remove index of priority fields

Indexed of boolean values is quite useless and the one of `priority`
(MO/Pickings) can be only used in filter search view (`starred`).
Then remove priority indexes from `stock_move`, `stock_picking` and
`mrp_production`.

task-2389380
This commit is contained in:
Rémy Voet (ryv)
2020-12-22 12:42:59 +00:00
parent e874a1e3de
commit e3423d3f28
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ class MrpProduction(models.Model):
name = fields.Char(
'Reference', copy=False, readonly=True, default=lambda x: _('New'))
priority = fields.Selection(
PROCUREMENT_PRIORITIES, string='Priority', default='0', index=True,
PROCUREMENT_PRIORITIES, string='Priority', default='0',
help="Components will be reserved first for the MO with the highest priorities.")
backorder_sequence = fields.Integer("Backorder Sequence", default=0, copy=False, help="Backorder sequence, if equals to 0 means there is not related backorder")
origin = fields.Char(
+1 -1
View File
@@ -32,7 +32,7 @@ class StockMove(models.Model):
sequence = fields.Integer('Sequence', default=10)
priority = fields.Selection(
PROCUREMENT_PRIORITIES, 'Priority', default='0',
compute="_compute_priority", store=True, index=True)
compute="_compute_priority", store=True)
date = fields.Datetime(
'Date Scheduled', default=fields.Datetime.now, index=True, required=True,
help="Scheduled date until move is done, then date of actual move processing")
+1 -1
View File
@@ -279,7 +279,7 @@ class Picking(models.Model):
'procurement.group', 'Procurement Group',
readonly=True, related='move_lines.group_id', store=True)
priority = fields.Selection(
PROCUREMENT_PRIORITIES, string='Priority', default='0', index=True,
PROCUREMENT_PRIORITIES, string='Priority', default='0',
help="Products will be reserved first for the transfers with the highest priorities.")
scheduled_date = fields.Datetime(
'Scheduled Date', compute='_compute_scheduled_date', inverse='_set_scheduled_date', store=True,