Use set for depends.

This commit is contained in:
Albert Cervera i Areny 2022-05-03 18:24:37 +02:00
parent 3f9925d24b
commit e2c60ec839
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ class Move(metaclass=PoolMeta):
cls.lot.context['locations'] = If(Eval('from_location'),
[Eval('from_location')], [])
if 'from_location' not in cls.lot.depends:
cls.lot.depends.append('from_location')
cls.lot.depends.add('from_location')
cls.lot.loading = 'lazy'
if 'product' not in cls.lot.depends:
cls.lot.depends.append('product')
cls.lot.depends.add('product')
cls.lot.states['readonly'] |= ~Eval('product') | ~Eval('from_location')