[FIX] maintenance: compute method failed to assign error
before this commit, on opening equipment form view a traceback is shown saying ompute method failed to assign error for field display_name this is related to: https://github.com/odoo/odoo/commit/3c62ca1eb96d571b2b686b5caee370324c589ab4 after this commit, no traceback wont be shown to user closes odoo/odoo#129978 Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
@@ -95,9 +95,9 @@ class MaintenanceEquipment(models.Model):
|
||||
@api.depends('serial_no')
|
||||
def _compute_display_name(self):
|
||||
for record in self:
|
||||
if record.name and record.serial_no:
|
||||
if record.serial_no:
|
||||
record.display_name = record.name + '/' + record.serial_no
|
||||
if record.name and not record.serial_no:
|
||||
else:
|
||||
record.display_name = record.name
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user