Initial commit
This commit is contained in:
118
fusion_clock/views/clock_location_views.xml
Normal file
118
fusion_clock/views/clock_location_views.xml
Normal file
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<!-- Location Form View -->
|
||||
<record id="view_fusion_clock_location_form" model="ir.ui.view">
|
||||
<field name="name">fusion.clock.location.form</field>
|
||||
<field name="model">fusion.clock.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Clock Location">
|
||||
<header/>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_attendances" type="object"
|
||||
class="oe_stat_button" icon="fa-clock-o">
|
||||
<field name="attendance_count" widget="statinfo" string="Attendances"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. Main Office"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Address">
|
||||
<field name="address" widget="fclk_places_address"
|
||||
placeholder="Start typing an address or place name..."/>
|
||||
<field name="timezone"/>
|
||||
</group>
|
||||
<group string="Geofence">
|
||||
<field name="latitude"/>
|
||||
<field name="longitude"/>
|
||||
<field name="radius"/>
|
||||
<field name="color" widget="color"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Access">
|
||||
<field name="all_employees"/>
|
||||
<field name="employee_ids" widget="many2many_tags"
|
||||
invisible="all_employees"/>
|
||||
</group>
|
||||
<group string="Other">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<!-- Interactive Map (drag pin to adjust, search places) -->
|
||||
<group string="Map">
|
||||
<widget name="fclk_map" colspan="2"/>
|
||||
</group>
|
||||
|
||||
<group string="Notes">
|
||||
<field name="note" nolabel="1" colspan="2" placeholder="Additional notes about this location..."/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Location List View -->
|
||||
<record id="view_fusion_clock_location_list" model="ir.ui.view">
|
||||
<field name="name">fusion.clock.location.list</field>
|
||||
<field name="model">fusion.clock.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Clock Locations" default_order="sequence, name">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="address"/>
|
||||
<field name="radius" string="Radius (m)"/>
|
||||
<field name="all_employees"/>
|
||||
<field name="attendance_count" string="Attendances"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="active" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Location Search View -->
|
||||
<record id="view_fusion_clock_location_search" model="ir.ui.view">
|
||||
<field name="name">fusion.clock.location.search</field>
|
||||
<field name="model">fusion.clock.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Locations">
|
||||
<field name="name"/>
|
||||
<field name="address"/>
|
||||
<filter name="active" string="Active" domain="[('active', '=', True)]"/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter name="all_employees" string="All Employees" domain="[('all_employees', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter name="group_company" string="Company" context="{'group_by': 'company_id'}"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Location Action -->
|
||||
<record id="action_fusion_clock_location" model="ir.actions.act_window">
|
||||
<field name="name">Clock Locations</field>
|
||||
<field name="res_model">fusion.clock.location</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fusion_clock_location_search"/>
|
||||
<field name="context">{'search_default_active': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create your first clock location
|
||||
</p>
|
||||
<p>
|
||||
Define geofenced locations where employees can clock in and out.
|
||||
Set the address, radius, and which employees are allowed.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user