Add polygon FSM zones and auto zone detection by coordinates

This commit is contained in:
Ruslan Bakiev
2026-02-13 17:00:37 +07:00
parent d9dd9eeb77
commit 3ad65b0d89
8 changed files with 158 additions and 2 deletions

View File

@@ -9,6 +9,8 @@
<button name="action_set_active" type="object" string="Set Active" class="btn-primary" invisible="state == 'active'"/>
<button name="action_archive" type="object" string="Archive" invisible="state == 'archived'"/>
<button name="action_reset_draft" type="object" string="Reset to Draft" invisible="state == 'draft'"/>
<button name="action_open_polygon_in_map" type="object" string="Open Polygon Map" invisible="not polygon_geojson"/>
<button name="action_open_point_picker_map" type="object" string="Open OSM"/>
<field name="state" widget="statusbar" statusbar_visible="draft,active,archived" options="{'clickable': '1'}"/>
</header>
<sheet>
@@ -17,6 +19,9 @@
<field name="code"/>
<field name="active"/>
</group>
<group>
<field name="polygon_geojson" widget="text" placeholder='{"type":"Polygon","coordinates":[[[-84.55,33.60],[-84.20,33.60],[-84.20,33.90],[-84.55,33.90],[-84.55,33.60]]]}'/>
</group>
</sheet>
<chatter/>
</form>

View File

@@ -8,6 +8,7 @@
<field name="name"/>
<field name="code" optional="show"/>
<field name="state" widget="badge" optional="show"/>
<field name="polygon_geojson" optional="hide"/>
<field name="active" optional="hide"/>
</list>
</field>