[IMP] mrp: add sequence of work order in the display name
In order to clarify the flow of work order in calendar and gantt view, add the sequence number of WO by MO. This sequence is compute during the call of the "name_get". task-2082261
This commit is contained in:
committed by
Rémy Voet (ryv)
parent
6c16892ded
commit
d50e2b0010
@@ -236,7 +236,7 @@ class MrpWorkorder(models.Model):
|
||||
(self - treated).allowed_lots_domain = False
|
||||
|
||||
def name_get(self):
|
||||
return [(wo.id, "%s - %s - %s" % (wo.production_id.name, wo.product_id.name, wo.name)) for wo in self]
|
||||
return [(wo.id, "%s. %s - %s - %s" % (wo.production_id.workorder_ids.ids.index(wo.id) + 1, wo.production_id.name, wo.product_id.name, wo.name)) for wo in self]
|
||||
|
||||
def unlink(self):
|
||||
# Removes references to workorder to avoid Validation Error
|
||||
|
||||
Reference in New Issue
Block a user