fix: fix Location column for All Logs subgrid when viewing Asset
This commit is contained in:
parent
03dacd9957
commit
a26f16a67e
1 changed files with 5 additions and 1 deletions
|
|
@ -103,6 +103,7 @@ class AssetMasterView(WuttaFarmMasterView):
|
||||||
|
|
||||||
row_labels = {
|
row_labels = {
|
||||||
"message": "Log Name",
|
"message": "Log Name",
|
||||||
|
"locations": "Location",
|
||||||
}
|
}
|
||||||
|
|
||||||
row_grid_columns = [
|
row_grid_columns = [
|
||||||
|
|
@ -112,7 +113,7 @@ class AssetMasterView(WuttaFarmMasterView):
|
||||||
"message",
|
"message",
|
||||||
"log_type",
|
"log_type",
|
||||||
"assets",
|
"assets",
|
||||||
"location",
|
"locations",
|
||||||
"quantity",
|
"quantity",
|
||||||
"is_group_assignment",
|
"is_group_assignment",
|
||||||
]
|
]
|
||||||
|
|
@ -446,6 +447,9 @@ class AssetMasterView(WuttaFarmMasterView):
|
||||||
# assets
|
# assets
|
||||||
g.set_renderer("assets", self.render_assets_for_grid)
|
g.set_renderer("assets", self.render_assets_for_grid)
|
||||||
|
|
||||||
|
# locations
|
||||||
|
g.set_renderer("locations", self.render_assets_for_grid)
|
||||||
|
|
||||||
def render_assets_for_grid(self, log, field, value):
|
def render_assets_for_grid(self, log, field, value):
|
||||||
assets = getattr(log, field)
|
assets = getattr(log, field)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue