Skip to content

Commit

Permalink
[FIX] Add missing fields in the api.depends
Browse files Browse the repository at this point in the history
Thanks to sebalix for spotting them.
  • Loading branch information
Carlos Serra-Toro authored and hailangvn committed Sep 24, 2021
1 parent 8a53cd1 commit 1defa0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stock_location_last_inventory_date/models/stock_location.py
Expand Up @@ -28,7 +28,12 @@ class StockLocation(models.Model):
domain="[('location_ids', 'in', id), ('state', '=', 'done')]",
)

@api.depends("validated_inventory_ids", "validated_inventory_ids.date")
@api.depends(
"validated_inventory_ids",
"validated_inventory_ids.date",
"validated_inventory_ids.usage",
"validated_inventory_ids.child_ids",
)
def _compute_last_inventory_date(self):
"""Store date of the last inventory for each leaf location"""
for loc in self:
Expand Down

0 comments on commit 1defa0a

Please sign in to comment.