You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
196 lines
9.9 KiB
196 lines
9.9 KiB
<odoo>
|
|
<record model="ir.ui.view" id="super_coop_partner_inherited_view_form">
|
|
<field name="name">Partner Super Coop</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="beesdoo_base.beesdoo_partner_form_view" />
|
|
<field name="priority">50</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//sheet" position="before">
|
|
<header>
|
|
<button name="coop_subscribe" string="Subscribe to shift" class="oe_highlight"
|
|
type="object" groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': [('cooperator_type', '!=', 'share_a')]}"/>
|
|
<button name="auto_extension" string="Auto Extension" class="oe_highlight"
|
|
type="object" groups="beesdoo_shift.group_shift_attendance"
|
|
attrs="{'invisible': ['|',
|
|
('cooperator_type', '!=', 'share_a'),
|
|
'|',
|
|
('state', '!=', 'suspended'),
|
|
('extension_start_time', '!=', False)]}" />
|
|
<button name="manual_extension" string="Manual Extension" class="oe_highlight"
|
|
type="object" groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': ['|',
|
|
('cooperator_type', '!=', 'share_a'),
|
|
'|',
|
|
('state', '!=', 'suspended'),
|
|
('extension_start_time', '=', False)]}" />
|
|
<button name="coop_unsubscribe" string="Unsubscribe" class="oe_highlight"
|
|
type="object" groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': [('cooperator_type', '!=', 'share_a')]}"/>
|
|
<button name="register_holiday" string="Register Holidays" class="oe_highlight"
|
|
type="object" groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': ['|', ('cooperator_type', '!=', 'share_a'), ('state', '!=', 'ok')]}"/>
|
|
<button name="temporary_exempt" string="Temporary Exemption"
|
|
type="object" groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': ['|', ('cooperator_type', '!=', 'share_a'), ('state', '=', 'unsubscribed')]}"/>
|
|
<field name="state" widget="statusbar" attrs="{'invisible': [('cooperator_type', '!=', 'share_a')]}" />
|
|
</header>
|
|
</xpath>
|
|
<page name="work" position="inside">
|
|
<group>
|
|
<group>
|
|
<field name="info_session" />
|
|
<field name="info_session_date"
|
|
attrs="{'invisible': ['|', ('info_session', '=', False)]}" />
|
|
<field name="extension_start_time" attrs="{'invisible': [('extension_start_time', '=', False)]}" />
|
|
</group>
|
|
<group>
|
|
<field name="working_mode" />
|
|
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
|
|
<field name="super" />
|
|
</group>
|
|
</group>
|
|
<separator string="Subscribed Shift" />
|
|
<field name="subscribed_shift_ids" />
|
|
</page>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="coop_status_form_view">
|
|
<field name="name">Coop Status Form View</field>
|
|
<field name="model">cooperative.status</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<field name="status" widget="statusbar" />
|
|
</header>
|
|
<group>
|
|
<group string="General information">
|
|
<field name="cooperator_id" />
|
|
<field name="super" />
|
|
<field name="working_mode" />
|
|
<field name="irregular_start_date" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
|
|
<field name="irregular_absence_date" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
|
|
|
|
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
|
|
</group>
|
|
<group string="Counter and Status">
|
|
<field name="info_session" />
|
|
<field name="info_session_date" />
|
|
<field name="sr" />
|
|
<field name="sc" />
|
|
<field name="irregular_absence_counter" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
|
|
<field name="unsubscribed" />
|
|
<field name="resigning" />
|
|
<field name="can_shop" />
|
|
</group>
|
|
<group string="Timing information">
|
|
<field name="next_countdown_date" readonly="1" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
|
|
<field name="future_alert_date" readonly="1" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
|
|
<field name="time_extension" />
|
|
<field name="holiday_start_time" />
|
|
<field name="holiday_end_time" />
|
|
<field name="alert_start_time" />
|
|
<field name="extension_start_time" />
|
|
</group>
|
|
<group string="Temporary Exemption">
|
|
<field name="temporary_exempt_reason_id" />
|
|
<field name="temporary_exempt_start_date" />
|
|
<field name="temporary_exempt_end_date" />
|
|
</group>
|
|
</group>
|
|
<group groups="base.group_no_one" col="3">
|
|
<separator string="For testing purpose only" colspan="3"/>
|
|
<field name="today" />
|
|
<button name="clear_history" type="object" string="Clear History" />
|
|
</group>
|
|
<separator string="History" colspan="2"/>
|
|
<field name="history_ids">
|
|
<tree>
|
|
<field name="create_date" string="Date" />
|
|
<field name="type" />
|
|
<field name="change" />
|
|
<field name="user_id" />
|
|
</tree>
|
|
</field>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="coop_status_tree_view">
|
|
<field name="name">Coop Status Tree view</field>
|
|
<field name="model">cooperative.status</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="cooperator_id" />
|
|
<field name="super" />
|
|
<field name="sr" />
|
|
<field name="sc" />
|
|
<field name="time_extension" />
|
|
<field name="holiday_start_time" />
|
|
<field name="holiday_end_time" />
|
|
<field name="alert_start_time" />
|
|
<field name="extension_start_time" />
|
|
<field name="status" widget="statusbar" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="journal_form_view">
|
|
<field name="name">Journal Form View</field>
|
|
<field name="model">beesdoo.shift.journal</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button name="run" string="Run again for this day" type="object" />
|
|
</header>
|
|
<group>
|
|
<group>
|
|
<field name="date" />
|
|
</group>
|
|
</group>
|
|
<separator string="Affected cooperator" />
|
|
<field name="line_ids" readonly="1">
|
|
<tree>
|
|
<field name="cooperator_id" />
|
|
</tree>
|
|
</field>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_coop_status">
|
|
<field name="name">Cooperator Status</field>
|
|
<field name="res_model">cooperative.status</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<menuitem name="Status" id="menu_status_top" parent="menu_root"
|
|
groups="beesdoo_shift.group_shift_management" sequence="20" />
|
|
<menuitem name="Cooperative Status" id="menu_status" parent="menu_status_top"
|
|
action="action_coop_status" groups="beesdoo_shift.group_cooperative_admin" />
|
|
|
|
<!-- Actions -->
|
|
<record model="ir.actions.act_window" id="action_worker">
|
|
<field name="name">Worker</field>
|
|
<field name="res_model">res.partner</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="domain">[('cooperator_type', '=', 'share_a')]</field>
|
|
</record>
|
|
|
|
<menuitem name="Worker" id="menu_worker_top" parent="menu_root"
|
|
sequence="1" />
|
|
<menuitem name="Worker" id="menu_worker" parent="menu_worker_top"
|
|
action="action_worker" />
|
|
|
|
<record model="ir.actions.act_window" id="action_journal">
|
|
<field name="name">Counter Journal</field>
|
|
<field name="res_model">beesdoo.shift.journal</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
|
|
<menuitem name="Counter Update Journal" id="menu_journal" parent="menu_status_top"
|
|
action="action_journal" groups="beesdoo_shift.group_cooperative_admin" />
|
|
</odoo>
|
|
|
|
|