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.
191 lines
8.9 KiB
191 lines
8.9 KiB
<odoo>
|
|
<record model="ir.ui.view" id="type_view_form_inherit">
|
|
<field name="name">Shift Type Form Inherit</field>
|
|
<field name="model">beesdoo.shift.type</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.type_view_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="name" position="after">
|
|
<field name="super_only" />
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="task_template_view_form_inherit">
|
|
<field name="name">Task Template Form Inherit</field>
|
|
<field name="model">beesdoo.shift.template</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.task_template_view_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="super_coop_id" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="task_type_id" position="after">
|
|
<field name="super_only" invisible="1" />
|
|
<field name="shift_presence_value" />
|
|
</field>
|
|
<field name="worker_ids" position="attributes">
|
|
<attribute name="domain">[("is_worker", "=", True), ('need_referent', '=', super_only)]</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="task_view_form_inherit">
|
|
<field name="name">Task Form inherit</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.task_view_form" />
|
|
<field name="model">beesdoo.shift.shift</field>
|
|
<field name="arch" type="xml">
|
|
<field name="super_coop_id" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="replaced_id" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="is_regular" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="is_compensation" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="task_type_id" position="after">
|
|
<field name="super_only" invisible="1" />
|
|
</field>
|
|
<field name="worker_id" position="attributes">
|
|
<attribute name="domain">[('cooperative_status_ids.status', 'not in', ('unsubscribed', 'resigning')), ('need_referent', '=', super_only)]</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="coop_status_form_view_inherit">
|
|
<field name="name">Coop Status Form View Inherit</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.coop_status_form_view" />
|
|
<field name="model">cooperative.status</field>
|
|
<field name="arch" type="xml">
|
|
<field name="irregular_start_date" position="attributes">
|
|
<attribute name="attrs" ></attribute>
|
|
<attribute name="string">Start date</attribute>
|
|
</field>
|
|
<field name="sc" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="time_extension" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="extension_start_time" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="info_session" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="info_session_date" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="irregular_absence_counter" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="irregular_absence_date" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="holiday_start_time" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
<field name="holiday_end_time" position="attributes">
|
|
<attribute name="invisible" >1</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.ui.view" id="super_coop_partner_inherited_view_form">
|
|
<field name="name">Partner Macavrac</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.super_coop_partner_inherited_view_form"/>
|
|
<field name="priority">50</field>
|
|
<field name="arch" type="xml">
|
|
<button name="coop_subscribe" string="Subscribe to shift"
|
|
class="oe_highlight"
|
|
type="object"
|
|
groups="beesdoo_shift.group_shift_management"
|
|
attrs="{'invisible': [('is_worker', '=', False)]}"/>
|
|
<button name="auto_extension" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</button>
|
|
<button name="manual_extension" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</button>
|
|
<button name="register_holiday" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</button>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<!-- Wizard view modification -->
|
|
<record model="ir.ui.view" id="subscribe_coop_wizard_view_form_inherit">
|
|
<field name="name">Subscribe Cooperator</field>
|
|
<field name="model">beesdoo.shift.subscribe</field>
|
|
<field name="inherit_id" ref="beesdoo_shift.subscribe_coop_wizard_view_form" />
|
|
<field name="arch" type="xml">
|
|
<field name="shift_id" position="attributes">
|
|
<attribute name="attrs"></attribute>
|
|
</field>
|
|
<field name="info_session" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="info_session_date" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
<field name="reset_compensation_counter" position="attributes">
|
|
<attribute name="invisible">1</attribute>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
<template id="my_shift" name="Shifts for Irregular Workers"
|
|
inherit_id="beesdoo_website_shift.my_shift_next_shifts">
|
|
<xpath expr="//t[@t-esc='shift.task_type_id.name']" position="after">
|
|
<button type="button"
|
|
class="btn btn-danger btn-sm pull-right"
|
|
data-toggle="modal"
|
|
t-att-data-target="'#unsubscribe-shift-%s' % shift.id"
|
|
t-if="shift.can_unsubscribe" >
|
|
<span class="fa fa-user-plus" aria-hidden="true"></span>
|
|
Unsubscribe
|
|
</button>
|
|
</xpath>
|
|
<xpath expr="//div[@t-if='shift.super_coop_id.name']/.." position="after">
|
|
<t t-foreach="subscribed_shifts" t-as="shift">
|
|
<div class="modal fade"
|
|
t-att-id="'unsubscribe-shift-%s' % shift.id" tabindex="-1"
|
|
role="dialog"
|
|
t-att-aria-labelledby="'unsubscribe-shift-%s-label' % shift.id">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title"
|
|
t-att-id="'subscribe-shift-%s-label' % shift.id">
|
|
Please confirm unsubscriptions
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<span t-field="shift.start_time"/>
|
|
-
|
|
<span t-field="shift.end_time"
|
|
t-options='{"format": "HH:mm"}'/>
|
|
<br/>
|
|
<t t-esc="shift.task_type_id.name"/>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default"
|
|
data-dismiss="modal">Close
|
|
</button>
|
|
<a class="btn btn-primary"
|
|
t-if="irregular_enable_sign_up"
|
|
t-att-href="'/shift/%s/unsubscribe?nexturl=%s' % (shift.id, nexturl)">
|
|
Unsubscribe
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|