From 71592e883a9baa8a9412ae1f29df5ff122a39af6 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 14 Feb 2026 20:21:42 -0600 Subject: [PATCH] fix: cleanup Land views to better match farmOS --- src/wuttafarm/web/views/land_assets.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/wuttafarm/web/views/land_assets.py b/src/wuttafarm/web/views/land_assets.py index 48d44d7..45659f3 100644 --- a/src/wuttafarm/web/views/land_assets.py +++ b/src/wuttafarm/web/views/land_assets.py @@ -39,12 +39,14 @@ class LandAssetView(WuttaFarmMasterView): farmos_refurl_path = "/assets/land" + labels = { + "name": "Asset Name", + } + grid_columns = [ + "drupal_id", "name", "land_type", - "is_location", - "is_fixed", - "notes", "archived", ] @@ -57,10 +59,11 @@ class LandAssetView(WuttaFarmMasterView): form_fields = [ "name", + "notes", + "asset_type", "land_type", "is_location", "is_fixed", - "notes", "archived", "farmos_uuid", "drupal_id", @@ -71,6 +74,9 @@ class LandAssetView(WuttaFarmMasterView): super().configure_grid(g) model = self.app.model + # drupal_id + g.set_label("drupal_id", "ID", column_only=True) + # name g.set_link("name") @@ -89,6 +95,16 @@ class LandAssetView(WuttaFarmMasterView): f = form super().configure_form(f) + # notes + f.set_widget("notes", "notes") + + # asset_type + if self.creating: + f.remove("asset_type") + else: + f.set_default("asset_type", "Land") + f.set_readonly("asset_type") + # land_type f.set_node("land_type", LandTypeRef(self.request))