account_asset_management: fix group_assets sorting
This commit is contained in:
parent
9352bd825c
commit
c0a3318da9
@ -430,7 +430,9 @@ class AssetReportXlsx(models.AbstractModel):
|
|||||||
group_assets = assets.filtered(lambda r: group in r.group_ids)
|
group_assets = assets.filtered(lambda r: group in r.group_ids)
|
||||||
else:
|
else:
|
||||||
group_assets = assets
|
group_assets = assets
|
||||||
group_assets = group_assets.sorted(lambda r: (r.date_start or "", r.code))
|
group_assets = group_assets.sorted(
|
||||||
|
lambda r: (r.date_start or "", r.code or "", r.name)
|
||||||
|
)
|
||||||
grouped_assets[group] = {"assets": group_assets}
|
grouped_assets[group] = {"assets": group_assets}
|
||||||
for child in group.child_ids:
|
for child in group.child_ids:
|
||||||
self._group_assets(assets, child, grouped_assets[group])
|
self._group_assets(assets, child, grouped_assets[group])
|
||||||
|
Loading…
Reference in New Issue
Block a user