Browse Source

[REF] format xml files

pull/142/head
robin.keunen 5 years ago
parent
commit
fec11128dc
  1. 18
      beesdoo_base/report/beescard.xml
  2. 12
      beesdoo_base/views/partner.xml
  3. 18
      beesdoo_easy_my_coop/views/product.xml
  4. 3
      beesdoo_easy_my_coop/views/res_company.xml
  5. 7
      beesdoo_easy_my_coop/views/subscription_templates.xml
  6. 10
      beesdoo_inventory/views/stock.xml
  7. 4
      beesdoo_pos/static/src/xml/templates.xml
  8. 3
      beesdoo_pos/views/beesdoo_pos.xml
  9. 3
      beesdoo_product/views/assets.xml
  10. 19
      beesdoo_product/views/beesdoo_product.xml
  11. 6
      beesdoo_product_usability/views/beesdoo_product.xml
  12. 4
      beesdoo_purchase/report/report_purchaseorder.xml
  13. 5
      beesdoo_purchase/views/purchase_order.xml
  14. 11
      beesdoo_shift/data/mail_template.xml
  15. 51
      beesdoo_shift/demo/workers.xml
  16. 6
      beesdoo_shift/security/group.xml
  17. 66
      beesdoo_shift/views/cooperative_status.xml
  18. 21
      beesdoo_shift/views/menu.xml
  19. 32
      beesdoo_shift/views/task.xml
  20. 38
      beesdoo_shift/views/task_template.xml
  21. 4
      beesdoo_shift/wizard/assign_super_coop.xml
  22. 6
      beesdoo_shift/wizard/extension.xml
  23. 26
      beesdoo_shift/wizard/subscribe.xml
  24. 3
      beesdoo_shift_attendance/data/cron.xml
  25. 3
      beesdoo_shift_attendance/data/mail_template.xml
  26. 3
      beesdoo_shift_attendance/data/system_parameter.xml
  27. 3
      beesdoo_shift_attendance/demo/users.xml
  28. 12
      beesdoo_shift_attendance/security/group.xml
  29. 27
      beesdoo_shift_attendance/views/attendance_sheet.xml
  30. 42
      beesdoo_shift_attendance/views/res_config_settings_view.xml
  31. 6
      beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.xml
  32. 3
      beesdoo_stock/views/stock_view.xml
  33. 3
      beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml
  34. 3
      beesdoo_website_shift/data/res_config_data.xml
  35. 234
      beesdoo_website_shift/views/my_shift_website_templates.xml
  36. 62
      beesdoo_website_shift/views/res_config_views.xml
  37. 18
      beesdoo_website_shift/views/shift_website_templates.xml
  38. 45
      beesdoo_worker_status/demo/tasks.xml
  39. 3
      macavrac_base/views/res_partner.xml
  40. 3
      purchase_order_generator/views/purchase_order.xml

18
beesdoo_base/report/beescard.xml

@ -59,17 +59,21 @@
<td <td
style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;"> style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;">
<p style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;"> <p style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;">
<span t-raw="partner.firstname and partner.firstname[:30] or ''" style="font-family:Roboto-Regular" />
<span t-raw="partner.firstname and partner.firstname[:30] or ''"
style="font-family:Roboto-Regular"/>
<br/> <br/>
<span t-raw="partner.lastname and partner.lastname[:26] or ''" style="font-family:Roboto-Bold;" />
<span t-raw="partner.lastname and partner.lastname[:26] or ''"
style="font-family:Roboto-Bold;"/>
<br/> <br/>
</p> </p>
<p style="text-align: left;padding-top: 0.2cm;font-size: 1em;"> <p style="text-align: left;padding-top: 0.2cm;font-size: 1em;">
<t t-if="partner.parent_eater_id and partner.eater == 'eater'"> <t t-if="partner.parent_eater_id and partner.eater == 'eater'">
<!--fix here --> <!--fix here -->
<span t-raw="partner.parent_eater_id.firstname and partner.parent_eater_id.firstname[:30] or ''" style="font-family:Roboto-Regular;" />
<span t-raw="partner.parent_eater_id.lastname and partner.parent_eater_id.lastname[:26] or ''" style="font-family:Roboto-Regular;" />
<span t-raw="partner.parent_eater_id.firstname and partner.parent_eater_id.firstname[:30] or ''"
style="font-family:Roboto-Regular;"/>
<span t-raw="partner.parent_eater_id.lastname and partner.parent_eater_id.lastname[:26] or ''"
style="font-family:Roboto-Regular;"/>
</t> </t>
<t t-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_b'"> <t t-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_b'">
@ -110,7 +114,8 @@
<td colspan="2" <td colspan="2"
style="vertical-align:center;height: 1.20cm;"> style="vertical-align:center;height: 1.20cm;">
<p <p
style="text-align:center;font-size:0.8em;font-family:Roboto-Regular">En cas de perte,
style="text-align:center;font-size:0.8em;font-family:Roboto-Regular">
En cas de perte,
prévenez-nous via prévenez-nous via
membre@bees-coop.be membre@bees-coop.be
</p> </p>
@ -153,7 +158,8 @@
<td></td> <td></td>
<td style="height: 1.20cm;"> <td style="height: 1.20cm;">
<p <p
style="text-align:center;font-family:Roboto-Regular;font-size:1.1em;">www.bees-coop.be
style="text-align:center;font-family:Roboto-Regular;font-size:1.1em;">
www.bees-coop.be
</p> </p>
</td> </td>
<td></td> <td></td>

12
beesdoo_base/views/partner.xml

@ -17,7 +17,8 @@
<record model="ir.ui.view" id="beesdoo_partner_form_view"> <record model="ir.ui.view" id="beesdoo_partner_form_view">
<field name="name">beesdoo.partner.form.view</field> <field name="name">beesdoo.partner.form.view</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="point_of_sale.view_partner_property_form" />
<field name="inherit_id"
ref="point_of_sale.view_partner_property_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="website" position="after"> <field name="website" position="after">
<field name="eater" <field name="eater"
@ -41,7 +42,8 @@
options="{'no_create': True}" options="{'no_create': True}"
context="{'default_eater' : 'eater', 'default_customer' : True}"/> context="{'default_eater' : 'eater', 'default_customer' : True}"/>
<group> <group>
<button string="New Eater" name="%(action_eater_wizard)d"
<button string="New Eater"
name="%(action_eater_wizard)d"
type="action"/> type="action"/>
</group> </group>
<separator string="Cards"/> <separator string="Cards"/>
@ -57,7 +59,8 @@
</field> </field>
<group> <group>
<button string="New Card" <button string="New Card"
name="%(action_membercard_wizard)d" type="action" />
name="%(action_membercard_wizard)d"
type="action"/>
</group> </group>
</group> </group>
</page> </page>
@ -82,7 +85,8 @@
<!-- S022 : By default a supplier should be a company --> <!-- S022 : By default a supplier should be a company -->
<record id="base.action_partner_supplier_form" model="ir.actions.act_window">
<record id="base.action_partner_supplier_form"
model="ir.actions.act_window">
<field name="context">{ <field name="context">{
'search_default_supplier': 1, 'search_default_supplier': 1,
'default_customer': 0, 'default_customer': 0,

18
beesdoo_easy_my_coop/views/product.xml

@ -1,17 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<odoo> <odoo>
<record id="product_template_share_form_view_beesdoo_emc" model="ir.ui.view">
<record id="product_template_share_form_view_beesdoo_emc"
model="ir.ui.view">
<field name="name">product.template.share.form</field> <field name="name">product.template.share.form</field>
<field name="model">product.template</field> <field name="model">product.template</field>
<field name="inherit_id" ref="easy_my_coop.product_template_share_form_view"/>
<field name="inherit_id"
ref="easy_my_coop.product_template_share_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="customer" position="after"> <field name="customer" position="after">
<field name="allow_working" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="allow_shopping" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="max_nb_eater_allowed" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="allow_working"
attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="allow_shopping"
attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="max_nb_eater_allowed"
attrs="{'invisible':[('is_share','=',False)]}"/>
</field> </field>
<field name="minimum_quantity" position="after"> <field name="minimum_quantity" position="after">
<field name="eater" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="eater"
attrs="{'invisible':[('is_share','=',False)]}"/>
</field> </field>
</field> </field>
</record> </record>

3
beesdoo_easy_my_coop/views/res_company.xml

@ -9,7 +9,8 @@
<field name="model">res.company</field> <field name="model">res.company</field>
<field name="inherit_id" ref="easy_my_coop.view_company_inherit_form2"/> <field name="inherit_id" ref="easy_my_coop.view_company_inherit_form2"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//group[@name='coop_grp']//field[@name='display_data_policy_approval']" position="before">
<xpath expr="//group[@name='coop_grp']//field[@name='display_data_policy_approval']"
position="before">
<field name="display_info_session_confirmation"/> <field name="display_info_session_confirmation"/>
<field name="info_session_confirmation_required"/> <field name="info_session_confirmation_required"/>
<field name="info_session_confirmation_text"/> <field name="info_session_confirmation_text"/>

7
beesdoo_easy_my_coop/views/subscription_templates.xml

@ -8,8 +8,11 @@
name="Become Cooperator (in beesdoo_easy_my_coop)" name="Become Cooperator (in beesdoo_easy_my_coop)"
inherit_id="easy_my_coop_website.becomecooperator"> inherit_id="easy_my_coop_website.becomecooperator">
<xpath expr="//div[@id='data_policy_approved']" position="before"> <xpath expr="//div[@id='data_policy_approved']" position="before">
<div id="info_session_confirmed" t-if="display_info_session" t-attf-class="form-group" >
<label class="col-md-3 col-sm-4 control-label" for="info_session_confirmed">Info Session</label>
<div id="info_session_confirmed" t-if="display_info_session"
t-attf-class="form-group">
<label class="col-md-3 col-sm-4 control-label"
for="info_session_confirmed">Info Session
</label>
<div class="col-md-9 col-sm-8"> <div class="col-md-9 col-sm-8">
<div class="checkbox"> <div class="checkbox">
<label for="info_session_confirmed"> <label for="info_session_confirmed">

10
beesdoo_inventory/views/stock.xml

@ -17,16 +17,20 @@
<field name="inherit_id" ref="stock.view_picking_form"/> <field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="scheduled_date" position="after"> <field name="scheduled_date" position="after">
<field name="max_shipping_date" placeholder="Max shipping date" />
<field name="max_shipping_date"
placeholder="Max shipping date"/>
</field> </field>
<field name="backorder_id" position="after"> <field name="backorder_id" position="after">
<field name="responsible"/> <field name="responsible"/>
</field> </field>
<button name="action_assign" position="after"> <button name="action_assign" position="after">
<button name="copy_qty" string="Copy Move Line Quantity" states="partially_available,assigned" type="object" class="oe_highlight"
<button name="copy_qty" string="Copy Move Line Quantity"
states="partially_available,assigned" type="object"
class="oe_highlight"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/> attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/>
</button> </button>
<xpath expr="//field[@name='move_ids_without_package']//field[@name='product_id']" position="attributes">
<xpath expr="//field[@name='move_ids_without_package']//field[@name='product_id']"
position="attributes">
<attribute name="domain">[('main_seller_id', '=', parent.partner_id)]</attribute> <attribute name="domain">[('main_seller_id', '=', parent.partner_id)]</attribute>
</xpath> </xpath>
</field> </field>

4
beesdoo_pos/static/src/xml/templates.xml

@ -53,7 +53,9 @@
<t t-extend="ClientLine"> <t t-extend="ClientLine">
<t t-jquery=".client-line" t-operation="replace"> <t t-jquery=".client-line" t-operation="replace">
<tr class='client-line' t-att-data-id='partner.id'> <tr class='client-line' t-att-data-id='partner.id'>
<td><t t-esc='partner.name' /></td>
<td>
<t t-esc='partner.name'/>
</td>
</tr> </tr>
</t> </t>
</t> </t>

3
beesdoo_pos/views/beesdoo_pos.xml

@ -3,7 +3,8 @@
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" <script type="text/javascript"
src="/beesdoo_pos/static/src/js/beesdoo.js"></script> src="/beesdoo_pos/static/src/js/beesdoo.js"></script>
<link rel='stylesheet' href="/beesdoo_pos/static/src/css/beesdoo.css" />
<link rel='stylesheet'
href="/beesdoo_pos/static/src/css/beesdoo.css"/>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

3
beesdoo_product/views/assets.xml

@ -2,7 +2,8 @@
<odoo> <odoo>
<template id="assets_frontend" inherit_id="point_of_sale.assets"> <template id="assets_frontend" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/beesdoo_product/static/src/js/models.js"/>
<script type="text/javascript"
src="/beesdoo_product/static/src/js/models.js"/>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>

19
beesdoo_product/views/beesdoo_product.xml

@ -6,10 +6,13 @@
<field name="inherit_id" ref="product.product_template_only_form_view"/> <field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="barcode" position="after"> <field name="barcode" position="after">
<button string="Generate Barcode" name="generate_barcode" type="object" colspan="2" attrs="{'invisible' : [('barcode','!=',False)]}" />
<button string="Generate Barcode" name="generate_barcode"
type="object" colspan="2"
attrs="{'invisible' : [('barcode','!=',False)]}"/>
</field> </field>
<field name="list_price" position="after"> <field name="list_price" position="after">
<field name="suggested_price" widget='monetary' options="{'currency_field': 'currency_id'}" />
<field name="suggested_price" widget='monetary'
options="{'currency_field': 'currency_id'}"/>
</field> </field>
<field name="purchase_method" position="attributes"> <field name="purchase_method" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
@ -46,7 +49,8 @@
<field name="note"/> <field name="note"/>
</group> </group>
</page> </page>
<page string="Scale labels" attrs="{'invisible':[('to_weight','=',False)]}">
<page string="Scale labels"
attrs="{'invisible':[('to_weight','=',False)]}">
<group> <group>
<group name="scale_label"> <group name="scale_label">
<field name="deadline_for_sale"/> <field name="deadline_for_sale"/>
@ -69,7 +73,8 @@
<record model="ir.ui.view" id="beesdoo_product_sales_form"> <record model="ir.ui.view" id="beesdoo_product_sales_form">
<field name="name">bees.product.sales.form</field> <field name="name">bees.product.sales.form</field>
<field name="model">product.template</field> <field name="model">product.template</field>
<field name="inherit_id" ref="sale.product_template_form_view_invoice_policy" />
<field name="inherit_id"
ref="sale.product_template_form_view_invoice_policy"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="invoice_policy" position="attributes"> <field name="invoice_policy" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
@ -144,7 +149,8 @@
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
</record> </record>
<menuitem id="label_configuration_menu" name="Labels" parent="sale.prod_config_main"
<menuitem id="label_configuration_menu" name="Labels"
parent="sale.prod_config_main"
action="action_labels" sequence="20"/> action="action_labels" sequence="20"/>
<record id="beesdoo_product_uom_categ_form" model="ir.ui.view"> <record id="beesdoo_product_uom_categ_form" model="ir.ui.view">
@ -188,6 +194,7 @@
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
</record> </record>
<menuitem id="scale_categories_configuration_menu" name="Scale categories" parent="sale.prod_config_main"
<menuitem id="scale_categories_configuration_menu" name="Scale categories"
parent="sale.prod_config_main"
action="action_scale_categories" sequence="15"/> action="action_scale_categories" sequence="15"/>
</odoo> </odoo>

6
beesdoo_product_usability/views/beesdoo_product.xml

@ -24,7 +24,8 @@
</field> </field>
</record> </record>
<record id="purchase.product_normal_action_puchased" model="ir.actions.act_window">
<record id="purchase.product_normal_action_puchased"
model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field> <field name="view_mode">tree,form,kanban</field>
</record> </record>
@ -32,7 +33,8 @@
<field name="view_mode">tree,form,kanban</field> <field name="view_mode">tree,form,kanban</field>
</record> </record>
<record id="stock.product_template_action_product" model="ir.actions.act_window">
<record id="stock.product_template_action_product"
model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field> <field name="view_mode">tree,form,kanban</field>
</record> </record>

4
beesdoo_purchase/report/report_purchaseorder.xml

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data> <data>
<template id="report_purchaseorder_document" inherit_id="purchase.report_purchaseorder_document" name="beesdoo purchaseorder">
<template id="report_purchaseorder_document"
inherit_id="purchase.report_purchaseorder_document"
name="beesdoo purchaseorder">
<div t-if="o.date_order" position="after"> <div t-if="o.date_order" position="after">
<div t-if="o.create_uid.name" class="col-xs-3"> <div t-if="o.create_uid.name" class="col-xs-3">

5
beesdoo_purchase/views/purchase_order.xml

@ -9,7 +9,10 @@
<field name="supervisor_id"/> <field name="supervisor_id"/>
</field> </field>
<field name="product_id" position="attributes"> <field name="product_id" position="attributes">
<attribute name="domain">[('main_seller_id','=', parent.partner_id), ('purchase_ok', '=', True)]</attribute>
<attribute name="domain">[
('main_seller_id','=', parent.partner_id),
('purchase_ok', '=', True) ]
</attribute>
</field> </field>
</field> </field>
</record> </record>

11
beesdoo_shift/data/mail_template.xml

@ -5,9 +5,14 @@
<data noupdate="1"> <data noupdate="1">
<record id="email_template_shift_summary" model="mail.template"> <record id="email_template_shift_summary" model="mail.template">
<field name="name">Shift Summary</field> <field name="name">Shift Summary</field>
<field name="subject">Your next shift (${format_tz(object.start_time,object.worker_id.tz or 'Europe/Brussels','%d.%m.%Y - %H:%M')})</field>
<field name="email_from">${object.worker_id.company_id.email}</field>
<field name="partner_to">${object.replaced_id.id or object.worker_id.id|safe}</field>
<field name="subject">Your next shift
(${format_tz(object.start_time,object.worker_id.tz or 'Europe/Brussels','%d.%m.%Y - %H:%M')})
</field>
<field name="email_from">${object.worker_id.company_id.email}
</field>
<field name="partner_to">
${object.replaced_id.id or object.worker_id.id|safe}
</field>
<field name="model_id" ref="model_beesdoo_shift_shift"/> <field name="model_id" ref="model_beesdoo_shift_shift"/>
<field name="auto_delete" eval="True"/> <field name="auto_delete" eval="True"/>
<field name="lang">${object.worker_id.lang}</field> <field name="lang">${object.worker_id.lang}</field>

51
beesdoo_shift/demo/workers.xml

@ -6,9 +6,11 @@
<odoo> <odoo>
<record id="cooperative_status_1_demo" model="cooperative.status"> <record id="cooperative_status_1_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_1_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_1_demo"/>
<field name="info_session" eval="True"/> <field name="info_session" eval="True"/>
<field name="info_session_date" eval="datetime.now() - timedelta(days=58)" />
<field name="info_session_date"
eval="datetime.now() - timedelta(days=58)"/>
<field name="super" eval="True"/> <field name="super" eval="True"/>
<field name="sr">2</field> <field name="sr">2</field>
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
@ -17,27 +19,33 @@
<record id="beesdoo_base.res_partner_cooperator_1_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_1_demo" model="res.partner">
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_1_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_1_demo')])]"/>
</record> </record>
<record id="cooperative_status_2_demo" model="cooperative.status"> <record id="cooperative_status_2_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_2_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_2_demo"/>
<field name="info_session" eval="False"/> <field name="info_session" eval="False"/>
<field name="sr">2</field> <field name="sr">2</field>
<field name="working_mode">irregular</field> <field name="working_mode">irregular</field>
<field name="irregular_start_date" eval="datetime.now() - timedelta(days=3)" />
<field name="irregular_start_date"
eval="datetime.now() - timedelta(days=3)"/>
</record> </record>
<record id="beesdoo_base.res_partner_cooperator_2_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_2_demo" model="res.partner">
<field name="working_mode">irregular</field> <field name="working_mode">irregular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_2_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_2_demo')])]"/>
</record> </record>
<record id="cooperative_status_3_demo" model="cooperative.status"> <record id="cooperative_status_3_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_3_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_3_demo"/>
<field name="info_session" eval="True"/> <field name="info_session" eval="True"/>
<field name="info_session_date" eval="datetime.now() - timedelta(days=98)" />
<field name="info_session_date"
eval="datetime.now() - timedelta(days=98)"/>
<field name="sc">2</field> <field name="sc">2</field>
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
</record> </record>
@ -45,24 +53,29 @@
<record id="beesdoo_base.res_partner_cooperator_3_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_3_demo" model="res.partner">
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_3_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_3_demo')])]"/>
</record> </record>
<record id="cooperative_status_4_demo" model="cooperative.status"> <record id="cooperative_status_4_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_4_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_4_demo"/>
<field name="sr">2</field> <field name="sr">2</field>
<field name="working_mode">irregular</field> <field name="working_mode">irregular</field>
<field name="irregular_start_date" eval="datetime.now() - timedelta(days=6)" />
<field name="irregular_start_date"
eval="datetime.now() - timedelta(days=6)"/>
</record> </record>
<record id="beesdoo_base.res_partner_cooperator_4_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_4_demo" model="res.partner">
<field name="working_mode">irregular</field> <field name="working_mode">irregular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_4_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_4_demo')])]"/>
</record> </record>
<record id="cooperative_status_5_demo" model="cooperative.status"> <record id="cooperative_status_5_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_5_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_5_demo"/>
<field name="sr">2</field> <field name="sr">2</field>
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
</record> </record>
@ -70,13 +83,16 @@
<record id="beesdoo_base.res_partner_cooperator_5_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_5_demo" model="res.partner">
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_5_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_5_demo')])]"/>
</record> </record>
<record id="cooperative_status_6_demo" model="cooperative.status"> <record id="cooperative_status_6_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_6_demo" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_6_demo"/>
<field name="info_session" eval="True"/> <field name="info_session" eval="True"/>
<field name="info_session_date" eval="datetime.now() - timedelta(days=36)" />
<field name="info_session_date"
eval="datetime.now() - timedelta(days=36)"/>
<field name="sc">2</field> <field name="sc">2</field>
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
</record> </record>
@ -84,7 +100,8 @@
<record id="beesdoo_base.res_partner_cooperator_6_demo" model="res.partner"> <record id="beesdoo_base.res_partner_cooperator_6_demo" model="res.partner">
<field name="working_mode">regular</field> <field name="working_mode">regular</field>
<field name="is_worker" eval="True"/> <field name="is_worker" eval="True"/>
<field name="cooperative_status_ids" eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_6_demo')])]"/>
<field name="cooperative_status_ids"
eval="[(6, 0, [ref('beesdoo_shift.cooperative_status_6_demo')])]"/>
</record> </record>
</odoo> </odoo>

6
beesdoo_shift/security/group.xml

@ -1,11 +1,13 @@
<odoo> <odoo>
<record id="group_shift_attendance" model="res.groups"> <record id="group_shift_attendance" model="res.groups">
<field name="name">Shift and Worker Read Access</field> <field name="name">Shift and Worker Read Access</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
</record> </record>
<record id="group_shift_management" model="res.groups"> <record id="group_shift_management" model="res.groups">
<field name="name">Shifts and Attendance Sheets Management</field> <field name="name">Shifts and Attendance Sheets Management</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(4, ref('group_shift_attendance'))]"/> <field name="implied_ids" eval="[(4, ref('group_shift_attendance'))]"/>
</record> </record>
<record id="group_planning_management" model="res.groups"> <record id="group_planning_management" model="res.groups">

66
beesdoo_shift/views/cooperative_status.xml

@ -7,33 +7,45 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//sheet" position="before"> <xpath expr="//sheet" position="before">
<header> <header>
<button name="coop_subscribe" string="Subscribe to shift" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
<button name="coop_subscribe" string="Subscribe to shift"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': [('is_worker', '=', False)]}"/> attrs="{'invisible': [('is_worker', '=', False)]}"/>
<button name="auto_extension" string="Auto Extension" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_attendance"
<button name="auto_extension" string="Auto Extension"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_attendance"
attrs="{'invisible': ['|', attrs="{'invisible': ['|',
('is_worker', '=', False), ('is_worker', '=', False),
'|', '|',
('state', '!=', 'suspended'), ('state', '!=', 'suspended'),
('extension_start_time', '!=', False)]}"/> ('extension_start_time', '!=', False)]}"/>
<button name="manual_extension" string="Manual Extension" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
<button name="manual_extension" string="Manual Extension"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': ['|', attrs="{'invisible': ['|',
('is_worker', '=', False), ('is_worker', '=', False),
'|', '|',
('state', '!=', 'suspended'), ('state', '!=', 'suspended'),
('extension_start_time', '=', False)]}"/> ('extension_start_time', '=', False)]}"/>
<button name="coop_unsubscribe" string="Unsubscribe" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
<button name="coop_unsubscribe" string="Unsubscribe"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': [('is_worker', '=', False)]}"/> attrs="{'invisible': [('is_worker', '=', False)]}"/>
<button name="register_holiday" string="Register Holidays" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
<button name="register_holiday" string="Register Holidays"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '!=', 'ok')]}"/> attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '!=', 'ok')]}"/>
<button name="temporary_exempt" string="Temporary Exemption" <button name="temporary_exempt" string="Temporary Exemption"
type="object" groups="beesdoo_shift.group_shift_management"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '=', 'unsubscribed')]}"/> attrs="{'invisible': ['|', ('is_worker', '=', False), ('state', '=', 'unsubscribed')]}"/>
<field name="state" widget="statusbar" attrs="{'invisible': [('is_worker', '=', False)]}" />
<field name="state" widget="statusbar"
attrs="{'invisible': [('is_worker', '=', False)]}"/>
</header> </header>
</xpath> </xpath>
<xpath expr="//field[@name='type']" position="before"> <xpath expr="//field[@name='type']" position="before">
@ -50,11 +62,13 @@
<field name="info_session"/> <field name="info_session"/>
<field name="info_session_date" <field name="info_session_date"
attrs="{'invisible': ['|', ('info_session', '=', False)]}"/> attrs="{'invisible': ['|', ('info_session', '=', False)]}"/>
<field name="extension_start_time" attrs="{'invisible': [('extension_start_time', '=', False)]}" />
<field name="extension_start_time"
attrs="{'invisible': [('extension_start_time', '=', False)]}"/>
</group> </group>
<group> <group>
<field name="working_mode"/> <field name="working_mode"/>
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="exempt_reason_id"
attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="super"/> <field name="super"/>
</group> </group>
</group> </group>
@ -78,24 +92,30 @@
<field name="cooperator_id"/> <field name="cooperator_id"/>
<field name="super"/> <field name="super"/>
<field name="working_mode"/> <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="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')]}"/>
<field name="exempt_reason_id"
attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
</group> </group>
<group string="Counter and Status"> <group string="Counter and Status">
<field name="info_session"/> <field name="info_session"/>
<field name="info_session_date"/> <field name="info_session_date"/>
<field name="sr"/> <field name="sr"/>
<field name="sc"/> <field name="sc"/>
<field name="irregular_absence_counter" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="irregular_absence_counter"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="unsubscribed"/> <field name="unsubscribed"/>
<field name="resigning"/> <field name="resigning"/>
<field name="can_shop"/> <field name="can_shop"/>
</group> </group>
<group string="Timing information"> <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="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="time_extension"/>
<field name="holiday_start_time"/> <field name="holiday_start_time"/>
<field name="holiday_end_time"/> <field name="holiday_end_time"/>
@ -111,7 +131,8 @@
<group groups="base.group_no_one" col="3"> <group groups="base.group_no_one" col="3">
<separator string="For testing purpose only" colspan="3"/> <separator string="For testing purpose only" colspan="3"/>
<field name="today"/> <field name="today"/>
<button name="clear_history" type="object" string="Clear History" />
<button name="clear_history" type="object"
string="Clear History"/>
</group> </group>
<separator string="History" colspan="2"/> <separator string="History" colspan="2"/>
<field name="history_ids"> <field name="history_ids">
@ -151,7 +172,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form>
<header> <header>
<button name="run" string="Run again for this day" type="object" />
<button name="run" string="Run again for this day"
type="object"/>
</header> </header>
<group> <group>
<group> <group>

21
beesdoo_shift/views/menu.xml

@ -11,7 +11,8 @@
sequence="1" groups="beesdoo_shift.group_shift_attendance"/> sequence="1" groups="beesdoo_shift.group_shift_attendance"/>
<menuitem name="Shifts" id="menu_task" parent="menu_task_top" <menuitem name="Shifts" id="menu_task" parent="menu_task_top"
action="action_task" groups="beesdoo_shift.group_shift_attendance" />
action="action_task"
groups="beesdoo_shift.group_shift_attendance"/>
<!-- Worker --> <!-- Worker -->
@ -35,14 +36,20 @@
<menuitem name="Status" id="menu_status_top" parent="menu_root" <menuitem name="Status" id="menu_status_top" parent="menu_root"
groups="beesdoo_shift.group_shift_management" sequence="20"/> 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" />
<menuitem name="Cooperative Status" id="menu_status"
parent="menu_status_top"
action="action_coop_status"
groups="beesdoo_shift.group_cooperative_admin"/>
<menuitem name="Exempt Reason" id="menu_exempt_reason" parent="menu_status_top"
action="action_exempt_reason" groups="beesdoo_shift.group_cooperative_admin" />
<menuitem name="Exempt Reason" id="menu_exempt_reason"
parent="menu_status_top"
action="action_exempt_reason"
groups="beesdoo_shift.group_cooperative_admin"/>
<menuitem name="Counter Update Journal" id="menu_journal" parent="menu_status_top"
action="action_journal" groups="beesdoo_shift.group_cooperative_admin" />
<menuitem name="Counter Update Journal" id="menu_journal"
parent="menu_status_top"
action="action_journal"
groups="beesdoo_shift.group_cooperative_admin"/>
<!-- Configuration / Settings --> <!-- Configuration / Settings -->

32
beesdoo_shift/views/task.xml

@ -104,8 +104,11 @@
<group> <group>
<field name="task_template_id"/> <field name="task_template_id"/>
<field name="task_type_id"/> <field name="task_type_id"/>
<field name="super_coop_id" domain="[('cooperative_status_ids.status', 'not in', ('unsubscribed', 'resigning'))]"/>
<field name="worker_id" options="{'no_create': True, 'no_open': True}" domain="[('cooperative_status_ids.status', 'not in', ('unsubscribed', 'resigning'))]"/>
<field name="super_coop_id"
domain="[('cooperative_status_ids.status', 'not in', ('unsubscribed', 'resigning'))]"/>
<field name="worker_id"
options="{'no_create': True, 'no_open': True}"
domain="[('cooperative_status_ids.status', 'not in', ('unsubscribed', 'resigning'))]"/>
<field name="replaced_id" <field name="replaced_id"
options="{'no_create': True, 'no_open': True}" options="{'no_create': True, 'no_open': True}"
domain="[('working_mode', '=', 'regular')]" domain="[('working_mode', '=', 'regular')]"
@ -148,13 +151,27 @@
<templates> <templates>
<t t-name="kanban-box"> <t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click"> <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown" name="card_dropdown_menu" groups="base.group_user">
<a class="dropdown-toggle o-no-caret btn" role="button" data-toggle="dropdown" data-display="static" href="#" aria-label="Dropdown menu" title="Dropdown menu">
<div class="o_dropdown_kanban dropdown"
name="card_dropdown_menu"
groups="base.group_user">
<a class="dropdown-toggle o-no-caret btn"
role="button" data-toggle="dropdown"
data-display="static" href="#"
aria-label="Dropdown menu"
title="Dropdown menu">
<span class="fa fa-ellipsis-v"/> <span class="fa fa-ellipsis-v"/>
</a> </a>
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
<t t-if="widget.editable"><a role="menuitem" type="edit" class="dropdown-item">Edit Shift</a></t>
<t t-if="widget.deletable"><a role="menuitem" type="delete" class="dropdown-item">Delete</a></t>
<t t-if="widget.editable">
<a role="menuitem" type="edit"
class="dropdown-item">Edit Shift
</a>
</t>
<t t-if="widget.deletable">
<a role="menuitem" type="delete"
class="dropdown-item">Delete
</a>
</t>
</div> </div>
</div> </div>
<div class="oe_kanban_content"> <div class="oe_kanban_content">
@ -204,8 +221,7 @@
<field name="name">Shifts</field> <field name="name">Shifts</field>
<field name="res_model">beesdoo.shift.shift</field> <field name="res_model">beesdoo.shift.shift</field>
<field name="view_mode">kanban,calendar,tree,form,pivot</field> <field name="view_mode">kanban,calendar,tree,form,pivot</field>
<field name="context">{'search_default_today': 1,
'search_default_gb_type':1}</field>
<field name="context">{'search_default_today': 1, 'search_default_gb_type':1}</field>
</record> </record>
</odoo> </odoo>

38
beesdoo_shift/views/task_template.xml

@ -29,9 +29,12 @@
<field name="super_coop_id"/> <field name="super_coop_id"/>
<field name="day_nb_id"/> <field name="day_nb_id"/>
<field name="worker_ids"/> <field name="worker_ids"/>
<filter string="My Team Shift" name="my_team_shift" domain="[('super_coop_id', '=', uid)]" />
<filter string="Planning" name="planning" context="{'group_by':'planning_id'}" />
<filter string="Week Day" name="week_day" context="{'group_by':'day_nb_id'}" />
<filter string="My Team Shift" name="my_team_shift"
domain="[('super_coop_id', '=', uid)]"/>
<filter string="Planning" name="planning"
context="{'group_by':'planning_id'}"/>
<filter string="Week Day" name="week_day"
context="{'group_by':'day_nb_id'}"/>
<filter string="Place Available" name="available" <filter string="Place Available" name="available"
domain="[('remaining_worker', '>', 0)]"/> domain="[('remaining_worker', '>', 0)]"/>
</search> </search>
@ -103,14 +106,30 @@
<t t-name="kanban-box"> <t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click"> <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<t t-if="widget.editable"> <t t-if="widget.editable">
<div class="o_dropdown_kanban dropdown" name="card_dropdown_menu">
<a class="dropdown-toggle o-no-caret btn" role="button" data-toggle="dropdown" data-display="static" href="#" aria-label="Dropdown menu" title="Dropdown menu">
<div class="o_dropdown_kanban dropdown"
name="card_dropdown_menu">
<a class="dropdown-toggle o-no-caret btn"
role="button" data-toggle="dropdown"
data-display="static" href="#"
aria-label="Dropdown menu"
title="Dropdown menu">
<span class="fa fa-ellipsis-v"/> <span class="fa fa-ellipsis-v"/>
</a> </a>
<div class="dropdown-menu" role="menu"> <div class="dropdown-menu" role="menu">
<t t-if="widget.editable"><a role="menuitem" type="edit" class="dropdown-item">Edit Shift Template</a></t>
<t t-if="widget.deletable"><a role="menuitem" type="delete" class="dropdown-item">Delete</a></t>
<ul role="menu" class="oe_kanban_colorpicker" data-field="color" />
<t t-if="widget.editable">
<a role="menuitem" type="edit"
class="dropdown-item">Edit Shift
Template
</a>
</t>
<t t-if="widget.deletable">
<a role="menuitem" type="delete"
class="dropdown-item">Delete
</a>
</t>
<ul role="menu"
class="oe_kanban_colorpicker"
data-field="color"/>
</div> </div>
</div> </div>
</t> </t>
@ -159,7 +178,8 @@
</field> </field>
</record> </record>
<record model="ir.actions.act_window" id="action_generate_shift_template_wizard">
<record model="ir.actions.act_window"
id="action_generate_shift_template_wizard">
<field name="name">Generate Shift Template</field> <field name="name">Generate Shift Template</field>
<field name="res_model">beesddoo.shift.generate_shift_template</field> <field name="res_model">beesddoo.shift.generate_shift_template</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>

4
beesdoo_shift/wizard/assign_super_coop.xml

@ -19,9 +19,9 @@
</record> </record>
<act_window id="act_assign_new_super_coop" name="Change Super Coop" <act_window id="act_assign_new_super_coop" name="Change Super Coop"
src_model="beesdoo.shift.shift" res_model="beesddoo.shift.assign_super_coop"
src_model="beesdoo.shift.shift"
res_model="beesddoo.shift.assign_super_coop"
view_mode="form" target="new" key2="client_action_multi"/> view_mode="form" target="new" key2="client_action_multi"/>
</odoo> </odoo>

6
beesdoo_shift/wizard/extension.xml

@ -14,9 +14,11 @@
</group> </group>
<footer> <footer>
<button type="object" name="extension" <button type="object" name="extension"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('auto', '=', True)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('auto', '=', True)]}"/>
<button type="object" name="auto_ext" <button type="object" name="auto_ext"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('auto', '=', False)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('auto', '=', False)]}"/>
or or
<button special="cancel" string="Cancel"/> <button special="cancel" string="Cancel"/>
</footer> </footer>

26
beesdoo_shift/wizard/subscribe.xml

@ -5,7 +5,9 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form>
<group attrs="{'invisible': [('unsubscribed', '=', False)]}"> <group attrs="{'invisible': [('unsubscribed', '=', False)]}">
<separator string="Are you sure to unsubscribe this cooperator ?" colspan="2"/>
<separator
string="Are you sure to unsubscribe this cooperator ?"
colspan="2"/>
<field name="resigning"/> <field name="resigning"/>
<field name="unsubscribed" invisible="1"/> <field name="unsubscribed" invisible="1"/>
</group> </group>
@ -14,22 +16,30 @@
<field name="info_session"/> <field name="info_session"/>
<field name="info_session_date"/> <field name="info_session_date"/>
<field name="working_mode"/> <field name="working_mode"/>
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="shift_id" domain="[('remaining_worker', '>', 0)]" attrs="{'invisible': [('working_mode', '!=', 'regular')]}"/>
<field name="exempt_reason_id"
attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="shift_id"
domain="[('remaining_worker', '>', 0)]"
attrs="{'invisible': [('working_mode', '!=', 'regular')]}"/>
<field name="nb_shifts" attrs="{'invisible': True}"/> <field name="nb_shifts" attrs="{'invisible': True}"/>
<field name="irregular_start_date" attrs="{'invisible': [('working_mode', '!=', 'irregular')]}" />
<field name="irregular_start_date"
attrs="{'invisible': [('working_mode', '!=', 'irregular')]}"/>
<field name="super"/> <field name="super"/>
<field name="reset_counter"/> <field name="reset_counter"/>
<field name="reset_compensation_counter"/> <!-- TODO access right --> <field name="reset_compensation_counter"/> <!-- TODO access right -->
</group> </group>
<footer> <footer>
<div class="alert alert-danger" role="alert" attrs="{'invisible': [('nb_shifts', '&lt;', 2)]}">
Current worker has more than one shift, subscribing him to a new shift will erase all previous shifts.
<div class="alert alert-danger" role="alert"
attrs="{'invisible': [('nb_shifts', '&lt;', 2)]}">
Current worker has more than one shift, subscribing him
to a new shift will erase all previous shifts.
</div> </div>
<button type="object" name="subscribe" <button type="object" name="subscribe"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('unsubscribed', '=', True)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('unsubscribed', '=', True)]}"/>
<button type="object" name="unsubscribe" <button type="object" name="unsubscribe"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('unsubscribed', '=', False)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('unsubscribed', '=', False)]}"/>
or or
<button special="cancel" string="Cancel"/> <button special="cancel" string="Cancel"/>
</footer> </footer>

3
beesdoo_shift_attendance/data/cron.xml

@ -22,7 +22,8 @@
<field name="interval_type">days</field> <field name="interval_type">days</field>
<field name="numbercall">-1</field> <field name="numbercall">-1</field>
<field name="doall" eval="False"/> <field name="doall" eval="False"/>
<field name="nextcall" eval="datetime.now().replace(hour=00, minute=00, second=10)" />
<field name="nextcall"
eval="datetime.now().replace(hour=00, minute=00, second=10)"/>
<field name="active" eval="False"/> <field name="active" eval="False"/>
</record> </record>
</data> </data>

3
beesdoo_shift_attendance/data/mail_template.xml

@ -7,7 +7,8 @@
<field name="name">Shift Non-attendance</field> <field name="name">Shift Non-attendance</field>
<field name="subject">Non-attendance to your last shift.</field> <field name="subject">Non-attendance to your last shift.</field>
<field name="partner_to">${object.replaced_id.id or object.worker_id.id|safe}</field> <field name="partner_to">${object.replaced_id.id or object.worker_id.id|safe}</field>
<field name="model_id" ref="beesdoo_shift.model_beesdoo_shift_shift"/>
<field name="model_id"
ref="beesdoo_shift.model_beesdoo_shift_shift"/>
<field name="auto_delete" eval="True"/> <field name="auto_delete" eval="True"/>
<field name="lang">${object.worker_id.lang}</field> <field name="lang">${object.worker_id.lang}</field>
<field name="body_html"><![CDATA[ <field name="body_html"><![CDATA[

3
beesdoo_shift_attendance/data/system_parameter.xml

@ -5,7 +5,8 @@
<field name="key">beesdoo_shift_attendance.card_support</field> <field name="key">beesdoo_shift_attendance.card_support</field>
<field name="value">False</field> <field name="value">False</field>
</record> </record>
<record id="attendance_sheet_generation_interval" model="ir.config_parameter">
<record id="attendance_sheet_generation_interval"
model="ir.config_parameter">
<field name="key">beesdoo_shift_attendance.attendance_sheet_generation_interval</field> <field name="key">beesdoo_shift_attendance.attendance_sheet_generation_interval</field>
<field name="value">15</field> <field name="value">15</field>
</record> </record>

3
beesdoo_shift_attendance/demo/users.xml

@ -34,7 +34,8 @@
<field name="partner_id" ref="beesdoo_shift_partner_2_demo"/> <field name="partner_id" ref="beesdoo_shift_partner_2_demo"/>
<field name="login">permanent</field> <field name="login">permanent</field>
<field name="password">demo</field> <field name="password">demo</field>
<field name="groups_id" eval="[(4,ref('beesdoo_shift.group_shift_management'))]"/>
<field name="groups_id"
eval="[(4,ref('beesdoo_shift.group_shift_management'))]"/>
</record> </record>
</odoo> </odoo>

12
beesdoo_shift_attendance/security/group.xml

@ -1,15 +1,19 @@
<odoo> <odoo>
<record id="group_shift_attendance_sheet" model="res.groups"> <record id="group_shift_attendance_sheet" model="res.groups">
<field name="name">Attendance Sheet Generic Access</field> <field name="name">Attendance Sheet Generic Access</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
</record> </record>
<record id="group_shift_attendance_sheet_validation" model="res.groups"> <record id="group_shift_attendance_sheet_validation" model="res.groups">
<field name="name">Attendance Sheet Validation</field> <field name="name">Attendance Sheet Validation</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(4, ref('group_shift_attendance_sheet'))]"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_attendance_sheet'))]"/>
<field name="users" eval="[(6, 0, [ref('base.user_root')])]"/> <field name="users" eval="[(6, 0, [ref('base.user_root')])]"/>
</record> </record>
<record id="beesdoo_shift.group_shift_attendance" model="res.groups"> <record id="beesdoo_shift.group_shift_attendance" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_shift_attendance_sheet'))]"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_attendance_sheet'))]"/>
</record> </record>
</odoo> </odoo>

27
beesdoo_shift_attendance/views/attendance_sheet.xml

@ -11,12 +11,10 @@
<field name="validated_by"/> <field name="validated_by"/>
<filter string="Annotated (unread)" <filter string="Annotated (unread)"
name="annotated" name="annotated"
domain="[('is_annotated', '=', True),
('is_read', '=', False)]" />
domain="[('is_annotated', '=', True), ('is_read', '=', False)]"/>
<filter string="Annotated (read)" <filter string="Annotated (read)"
name="annotated_read" name="annotated_read"
domain="[('is_annotated', '=', True),
('is_read', '=', True)]" />
domain="[('is_annotated', '=', True), ('is_read', '=', True)]"/>
<separator/> <separator/>
<filter string="Archived" <filter string="Archived"
name="archived" name="archived"
@ -39,9 +37,12 @@
<tree create="false" <tree create="false"
decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] " decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] "
decoration-success="state == 'done'"> decoration-success="state == 'done'">
<field name="task_type_id" readonly="True" options="{'no_open': True}"/>
<field name="super_coop_id" readonly="True" options="{'no_open': True}"/>
<field name="worker_id" readonly="True" options="{'no_open': True}"/>
<field name="task_type_id" readonly="True"
options="{'no_open': True}"/>
<field name="super_coop_id" readonly="True"
options="{'no_open': True}"/>
<field name="worker_id" readonly="True"
options="{'no_open': True}"/>
<field name="working_mode"/> <field name="working_mode"/>
<field name="replaced_id" readonly="True"/> <field name="replaced_id" readonly="True"/>
<field name="state" readonly="True"/> <field name="state" readonly="True"/>
@ -81,8 +82,10 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form readonly="True"> <form readonly="True">
<group string="Expected Shift"> <group string="Expected Shift">
<field name="task_type_id" readonly="True" options="{'no_open': True}"/>
<field name="worker_id" readonly="True" options="{'no_open': True}"/>
<field name="task_type_id" readonly="True"
options="{'no_open': True}"/>
<field name="worker_id" readonly="True"
options="{'no_open': True}"/>
<field name="working_mode"/> <field name="working_mode"/>
<field name="replaced_id" <field name="replaced_id"
attrs="{'invisible': attrs="{'invisible':
@ -126,7 +129,8 @@
<field name="name">Attendance Sheet List</field> <field name="name">Attendance Sheet List</field>
<field name="model">beesdoo.shift.sheet</field> <field name="model">beesdoo.shift.sheet</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree create="false" delete="false" decoration-danger="state == 'not_validated'">
<tree create="false" delete="false"
decoration-danger="state == 'not_validated'">
<field name="week"/> <field name="week"/>
<field name="day"/> <field name="day"/>
<field name="time_slot"/> <field name="time_slot"/>
@ -168,7 +172,8 @@
groups="beesdoo_shift.group_shift_attendance" groups="beesdoo_shift.group_shift_attendance"
class="oe_stat_button" class="oe_stat_button"
icon="fa-archive"> icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button> </button>
</div> </div>
<separator string="Expected Shifts"/> <separator string="Expected Shifts"/>

42
beesdoo_shift_attendance/views/res_config_settings_view.xml

@ -7,13 +7,18 @@
<data> <data>
<record id="res_config_settings_view_form" model="ir.ui.view"> <record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.beesdoo.shift</field>
<field name="name">
res.config.settings.view.form.inherit.beesdoo.shift
</field>
<field name="model">res.config.settings</field> <field name="model">res.config.settings</field>
<field name="priority" eval="50"/> <field name="priority" eval="50"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/> <field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside"> <xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Shifts Management" string="Shifts Management" data-key="shifts_management" groups="beesdoo_shift.group_cooperative_admin">
<div class="app_settings_block"
data-string="Shifts Management"
string="Shifts Management" data-key="shifts_management"
groups="beesdoo_shift.group_cooperative_admin">
<field name="has_accounting_entries" invisible="1"/> <field name="has_accounting_entries" invisible="1"/>
<h2>Attendance Sheets</h2> <h2>Attendance Sheets</h2>
<div class="row mt16 o_settings_container"> <div class="row mt16 o_settings_container">
@ -22,9 +27,11 @@
<field name="card_support"/> <field name="card_support"/>
</div> </div>
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="card_support" string="Scan cards for validation" />
<label for="card_support"
string="Scan cards for validation"/>
<div class="text-muted"> <div class="text-muted">
If not checked, user credentials are asked.
If not checked, user credentials are
asked.
</div> </div>
</div> </div>
</div> </div>
@ -32,14 +39,20 @@
<div class="row mt16 o_settings_container"> <div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box"> <div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<span class="o_form_label">Attendance Sheets Generation Interval</span>
<span class="o_form_label">
Attendance Sheets Generation Interval
</span>
<div class="text-muted"> <div class="text-muted">
Generate attendance sheets before shifts start. Generate attendance sheets before shifts start.
</div> </div>
<div class="content-group"> <div class="content-group">
<div class="mt16 row"> <div class="mt16 row">
<label for="attendance_sheet_generation_interval" string="Interval (minutes)" class="col-3 col-lg-3 o_light_label"/>
<field name="attendance_sheet_generation_interval" class="oe_inline" required="1"/>
<label for="attendance_sheet_generation_interval"
string="Interval (minutes)"
class="col-3 col-lg-3 o_light_label"/>
<field name="attendance_sheet_generation_interval"
class="oe_inline"
required="1"/>
</div> </div>
</div> </div>
</div> </div>
@ -48,14 +61,20 @@
<div class="row mt16 o_settings_container"> <div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box"> <div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<span class="o_form_label">Default Task Type</span>
<span class="o_form_label">
Default Task Type
</span>
<div class="text-muted"> <div class="text-muted">
For attendance sheets automatic pre-filling. For attendance sheets automatic pre-filling.
</div> </div>
<div class="content-group"> <div class="content-group">
<div class="mt16 row"> <div class="mt16 row">
<label for="pre_filled_task_type_id" string="Default Task Type" class="col-3 col-lg-3 o_light_label"/>
<field name="pre_filled_task_type_id" class="oe_inline" required="1"/>
<label for="pre_filled_task_type_id"
string="Default Task Type"
class="col-3 col-lg-3 o_light_label"/>
<field name="pre_filled_task_type_id"
class="oe_inline"
required="1"/>
</div> </div>
</div> </div>
</div> </div>
@ -67,7 +86,8 @@
</record> </record>
<record model="ir.actions.act_window" id="action_missing_attendance_sheets">
<record model="ir.actions.act_window"
id="action_missing_attendance_sheets">
<field name="name">Generate missing past attendance sheets</field> <field name="name">Generate missing past attendance sheets</field>
<field name="res_model">beesdoo.shift.generate_missing_attendance_sheets</field> <field name="res_model">beesdoo.shift.generate_missing_attendance_sheets</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>

6
beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.xml

@ -5,7 +5,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form>
<sheet> <sheet>
<label for="date_start" string="Generate missing attendance sheets in a given time interval" />
<label for="date_start"
string="Generate missing attendance sheets in a given time interval"/>
<group> <group>
<field name="date_start"/> <field name="date_start"/>
<field name="date_end"/> <field name="date_end"/>
@ -22,7 +23,8 @@
</field> </field>
</record> </record>
<act_window id="action_missing_attendance_sheets" name="Generate Missing Sheets"
<act_window id="action_missing_attendance_sheets"
name="Generate Missing Sheets"
res_model="beesdoo.shift.generate_missing_attendance_sheets" res_model="beesdoo.shift.generate_missing_attendance_sheets"
view_mode="form" target="new"/> view_mode="form" target="new"/>

3
beesdoo_stock/views/stock_view.xml

@ -6,7 +6,8 @@
<field name="inherit_id" ref="stock.view_picking_form"></field> <field name="inherit_id" ref="stock.view_picking_form"></field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<button name="button_validate" position="after"> <button name="button_validate" position="after">
<button name="actions_on_articles" string="Actions on articles" type="object" class="oe_highlight"/>
<button name="actions_on_articles" string="Actions on articles"
type="object" class="oe_highlight"/>
</button> </button>
</field> </field>
</record> </record>

3
beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml

@ -18,7 +18,8 @@
<p> <p>
You have purchased a total amount of You have purchased a total amount of
<span t-esc="posorder_amount" <span t-esc="posorder_amount"
t-esc-options='{"widget": "monetary", "display_currency": "company_currency"}'/>.
t-esc-options='{"widget": "monetary", "display_currency": "company_currency"}'/>
.
</p> </p>
</div> </div>
</xpath> </xpath>

3
beesdoo_website_shift/data/res_config_data.xml

@ -5,7 +5,8 @@
--> -->
<odoo> <odoo>
<data noupdate="1"> <data noupdate="1">
<record id="beesdoo_website_shift.shift_period" model="ir.config_parameter">
<record id="beesdoo_website_shift.shift_period"
model="ir.config_parameter">
<field name="key">beesdoo_website_shift.shift_period</field> <field name="key">beesdoo_website_shift.shift_period</field>
<field name="value">28</field> <field name="value">28</field>
</record> </record>

234
beesdoo_website_shift/views/my_shift_website_templates.xml

@ -6,9 +6,11 @@
<odoo> <odoo>
<!-- Add menu entries --> <!-- Add menu entries -->
<template id="my_shift_link" name="Link to frontend portal" inherit_id="portal.frontend_layout">
<template id="my_shift_link" name="Link to frontend portal"
inherit_id="portal.frontend_layout">
<xpath expr="//a[@id='o_logout']" position="before"> <xpath expr="//a[@id='o_logout']" position="before">
<a href="/my/shift" class="dropdown-item" role="menuitem">My Shift</a>
<a href="/my/shift" class="dropdown-item" role="menuitem">My Shift
</a>
</xpath> </xpath>
</template> </template>
@ -118,7 +120,9 @@
</h2> </h2>
<div class="alert alert-warning"> <div class="alert alert-warning">
<strong>Warning !</strong> For the moment public holidays are not taken into account. If your shift
<strong>Warning !</strong>
For the moment public holidays are not taken into account. If your
shift
occures during a public holiday, you do not have to do it. occures during a public holiday, you do not have to do it.
</div> </div>
@ -126,8 +130,10 @@
<div t-att-class="'card mb-4 %s' % highlight_class"> <div t-att-class="'card mb-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class"> <div t-att-class="'card-header %s clearfix' % highlight_header_class">
<div class="pull-left"> <div class="pull-left">
<span t-field="shift.start_time"/> -
<span t-field="shift.end_time" t-options='{"format": "HH:mm"}'/>
<span t-field="shift.start_time"/>
-
<span t-field="shift.end_time"
t-options='{"format": "HH:mm"}'/>
</div> </div>
<t t-call="beesdoo_website_shift.shift_status_label"> <t t-call="beesdoo_website_shift.shift_status_label">
<t t-set="label_css" t-value="'pull-right'"/> <t t-set="label_css" t-value="'pull-right'"/>
@ -151,27 +157,35 @@
<!-- Super Cooperator info modal --> <!-- Super Cooperator info modal -->
<t t-foreach="subscribed_shifts" t-as="shift"> <t t-foreach="subscribed_shifts" t-as="shift">
<div class="modal fade" t-if="shift.super_coop_id.name" t-att-id="'super_coop-shift-%s' % shift_index" tabindex="-1" role="dialog"
<div class="modal fade" t-if="shift.super_coop_id.name"
t-att-id="'super_coop-shift-%s' % shift_index" tabindex="-1"
role="dialog"
t-att-aria-labelledby="'super_coop-shift-%s-label' % shift_index"> t-att-aria-labelledby="'super_coop-shift-%s-label' % shift_index">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close"
data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
</button> </button>
<h4 class="modal-title" t-att-id="'super_coop-shift-%s-label' % shift_index">
<h4 class="modal-title"
t-att-id="'super_coop-shift-%s-label' % shift_index">
<t t-esc="shift.super_coop_id.name"/> <t t-esc="shift.super_coop_id.name"/>
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<i class="fa fa-phone" aria-hidden="true"></i> <t t-esc="shift.super_coop_id.phone"/><br/>
<i class="fa fa-phone" aria-hidden="true"></i>
<t t-esc="shift.super_coop_id.phone"/>
<br/>
<i class="fa fa-envelope" aria-hidden="true"></i> <i class="fa fa-envelope" aria-hidden="true"></i>
<a t-att-href="'mailto:%s' % shift.super_coop_id.email"> <a t-att-href="'mailto:%s' % shift.super_coop_id.email">
<t t-esc="shift.super_coop_id.email"/> <t t-esc="shift.super_coop_id.email"/>
</a> </a>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary"
data-dismiss="modal">Close
</button>
</div> </div>
</div> </div>
</div> </div>
@ -179,7 +193,8 @@
</t> </t>
<div class="alert alert-warning" t-if="not subscribed_shifts"> <div class="alert alert-warning" t-if="not subscribed_shifts">
<strong>Warning !</strong> You have not yet signed up to a shift.
<strong>Warning !</strong>
You have not yet signed up to a shift.
</div> </div>
</template> </template>
@ -196,8 +211,10 @@
<div t-att-class="'card mb-4 %s' % highlight_class"> <div t-att-class="'card mb-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class"> <div t-att-class="'card-header %s clearfix' % highlight_header_class">
<div class="pull-left"> <div class="pull-left">
<span t-field="shift.start_time"/> -
<span t-field="shift.end_time" t-options='{"format": "HH:mm"}'/>
<span t-field="shift.start_time"/>
-
<span t-field="shift.end_time"
t-options='{"format": "HH:mm"}'/>
</div> </div>
<t t-call="beesdoo_website_shift.shift_status_label"> <t t-call="beesdoo_website_shift.shift_status_label">
<t t-set="label_css" t-value="'pull-right'"/> <t t-set="label_css" t-value="'pull-right'"/>
@ -210,7 +227,8 @@
</t> </t>
<div class="alert alert-info"> <div class="alert alert-info">
<strong>Info !</strong> You don't have any past shift.
<strong>Info !</strong>
You don't have any past shift.
</div> </div>
</template> </template>
@ -225,16 +243,20 @@
<t t-set="count" t-value="shift_count_subscribed[1]"/> <t t-set="count" t-value="shift_count_subscribed[1]"/>
<t t-set="is_subscribed" t-value="shift_count_subscribed[2]"/> <t t-set="is_subscribed" t-value="shift_count_subscribed[2]"/>
<t t-set="has_enough_workers" t-value="shift_count_subscribed[3]"/> <t t-set="has_enough_workers" t-value="shift_count_subscribed[3]"/>
<t t-set="highlight_class" t-value="'panel-warning' if not has_enough_workers else 'panel-default'"/>
<t t-set="highlight_class"
t-value="'panel-warning' if not has_enough_workers else 'panel-default'"/>
<div t-att-class="'card mb-4 %s' % highlight_class"> <div t-att-class="'card mb-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class"> <div t-att-class="'card-header %s clearfix' % highlight_header_class">
<div class="pull-left"> <div class="pull-left">
<span t-field="shift.start_time"/> -
<span t-field="shift.end_time" t-options='{"format": "HH:mm"}'/>
<span t-field="shift.start_time"/>
-
<span t-field="shift.end_time"
t-options='{"format": "HH:mm"}'/>
</div> </div>
<div class="badge badge-secondary pull-right" <div class="badge badge-secondary pull-right"
t-if="count > 0"> t-if="count > 0">
<t t-esc="count"/> space(s)
<t t-esc="count"/>
space(s)
</div> </div>
<div class="badge badge-secondary pull-right" <div class="badge badge-secondary pull-right"
t-if="count == 0"> t-if="count == 0">
@ -265,26 +287,37 @@
<t t-set="shift" t-value="shift_count_subscribed[0]"/> <t t-set="shift" t-value="shift_count_subscribed[0]"/>
<t t-set="count" t-value="shift_count_subscribed[1]"/> <t t-set="count" t-value="shift_count_subscribed[1]"/>
<t t-set="is_subscribed" t-value="shift_count_subscribed[2]"/> <t t-set="is_subscribed" t-value="shift_count_subscribed[2]"/>
<div class="modal fade" t-att-id="'subscribe-shift-%s' % shift.id" tabindex="-1" role="dialog"
<div class="modal fade"
t-att-id="'subscribe-shift-%s' % shift.id" tabindex="-1"
role="dialog"
t-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id"> t-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<button type="button" class="close"
data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
</button> </button>
<h4 class="modal-title" t-att-id="'subscribe-shift-%s-label' % shift.id">
<h4 class="modal-title"
t-att-id="'subscribe-shift-%s-label' % shift.id">
Please confirm subscription Please confirm subscription
</h4> </h4>
</div> </div>
<div class="modal-body"> <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"/><br/>
<t t-esc="count"/> available space(s)
<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"/>
<br/>
<t t-esc="count"/>
available space(s)
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-default"
data-dismiss="modal">Close
</button>
<a class="btn btn-primary" <a class="btn btn-primary"
t-if="irregular_enable_sign_up" t-if="irregular_enable_sign_up"
t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)"> t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)">
@ -313,7 +346,11 @@
id="help_text_common" id="help_text_common"
name="Help Text Common"> name="Help Text Common">
<div class="alert alert-info"> <div class="alert alert-info">
<strong>Info!</strong> If you do not agree with your status, please contact the members office by mail (membre@bees-coop.be) or during the open hours of the office (Monday 5PM to 7:30PM, Wednesday 5PM to 7:30 PM and Friday 2:30PM to 5 PM).
<strong>Info!</strong>
If you do not agree with your status, please contact the members
office by mail (membre@bees-coop.be) or during the open hours of the
office (Monday 5PM to 7:30PM, Wednesday 5PM to 7:30 PM and Friday
2:30PM to 5 PM).
</div> </div>
<p> <p>
@ -322,7 +359,8 @@
<p> <p>
<strong>Up To Date:</strong> <strong>Up To Date:</strong>
That's perfect! You are in order. Thanks a lot. You can come and shop, so can your eaters if you have any.
That's perfect! You are in order. Thanks a lot. You can come and
shop, so can your eaters if you have any.
</p> </p>
</template> </template>
@ -331,31 +369,47 @@
name="Help Text for Regular Worker"> name="Help Text for Regular Worker">
<p class="h_reg_alert"> <p class="h_reg_alert">
<strong>Alert:</strong> <strong>Alert:</strong>
If you are in alert status, that means you didn't do your last shift. You have
until your next scheduled shift to do your compensation shift according to your situation.
Your compensation is either simple or double. If you don't how how many compensation shifts you have to do, please contact your supercooperator.
To do your compensation shift, no need to subscribe in advance : you come at the beginning of the shift that best suits you.
Add your name and the indication "compensation shift" on the attendance list.
No panic, you still can come and shop, so can your eaters if you have any.
If you are in alert status, that means you didn't do your last
shift. You have
until your next scheduled shift to do your compensation shift
according to your situation.
Your compensation is either simple or double. If you don't how how
many compensation shifts you have to do, please contact your
supercooperator.
To do your compensation shift, no need to subscribe in advance : you
come at the beginning of the shift that best suits you.
Add your name and the indication "compensation shift" on the
attendance list.
No panic, you still can come and shop, so can your eaters if you
have any.
</p> </p>
<p class="h_reg_suspended"> <p class="h_reg_suspended">
<strong>Suspended:</strong> <strong>Suspended:</strong>
If you are suspended, that means you didn't come to a shift and you didn't do you compensation shifts in the delay (4 weeks).
You cannot shop (so as your eaters). But no need to panic : a two-weeks delay is activable on demand at the entrance of the supermarket.
You will be able to shop during 2 more weeks and to put your situation in order.
To do your compensation shift, no need to subscribe in advance : you come at the beginning of the shift that best suits you.
Add your name and the indication "compensation shift" on the attendance list.
If you are suspended, that means you didn't come to a shift and you
didn't do you compensation shifts in the delay (4 weeks).
You cannot shop (so as your eaters). But no need to panic : a
two-weeks delay is activable on demand at the entrance of the
supermarket.
You will be able to shop during 2 more weeks and to put your
situation in order.
To do your compensation shift, no need to subscribe in advance : you
come at the beginning of the shift that best suits you.
Add your name and the indication "compensation shift" on the
attendance list.
</p> </p>
<p class="h_reg_autoextension"> <p class="h_reg_autoextension">
<strong>Auto-Extension:</strong> <strong>Auto-Extension:</strong>
You didn't manage to do your compensation shifts in the delay but you benefit from the auto-extension.
You didn't manage to do your compensation shifts in the delay but
you benefit from the auto-extension.
This is two more weeks to do your compensation shifts. You can shop. This is two more weeks to do your compensation shifts. You can shop.
If you don't do your compensation shifts, you'll be suspended. If you don't do your compensation shifts, you'll be suspended.
</p> </p>
<p class="h_reg_unsubscribed"> <p class="h_reg_unsubscribed">
<strong>Unsubscribed:</strong> <strong>Unsubscribed:</strong>
You did not attend two consecutive shifts. You are now unsubscribed. You cannot shop (nor can your eaters) nor come to work.
To subscribe again, please contact membre@bees-coop.be or come to the members office during the opening hours.
You did not attend two consecutive shifts. You are now unsubscribed.
You cannot shop (nor can your eaters) nor come to work.
To subscribe again, please contact membre@bees-coop.be or come to
the members office during the opening hours.
</p> </p>
</template> </template>
@ -364,31 +418,43 @@
name="Help Text for Irregular Worker"> name="Help Text for Irregular Worker">
<p class="h_irreg_alert"> <p class="h_irreg_alert">
<strong>Alert:</strong> <strong>Alert:</strong>
If you are in alert status, that means you didn't anticipate enough shifts.
If you are in alert status, that means you didn't anticipate enough
shifts.
Your counter is now negative, directly to -2. Your counter is now negative, directly to -2.
You have 4 weeks to do 2 shifts to be up to date. You have 4 weeks to do 2 shifts to be up to date.
For the compensation shifts, subscribe like you do for a normal shift.
Be careful, in addition to these 2 shifts, don't forget to do your normal shift in the same delay to prevent to be in the same situation next month.
For the compensation shifts, subscribe like you do for a normal
shift.
Be careful, in addition to these 2 shifts, don't forget to do your
normal shift in the same delay to prevent to be in the same
situation next month.
</p> </p>
<p class="h_irreg_suspended"> <p class="h_irreg_suspended">
<strong>Suspended:</strong> <strong>Suspended:</strong>
You did not anticipate enough shifts and you did not come back to a normal situation in the delay.
You did not anticipate enough shifts and you did not come back to a
normal situation in the delay.
You cannot shop anymore, nor can your eaters. You cannot shop anymore, nor can your eaters.
But no need to panic : a two-weeks delay is activable on demand at the entrance of the supermarket.
You will be able to shop during 2 more weeks and to put your situation in order.
For the compensation shifts, subscribe like you do for a normal shift.
But no need to panic : a two-weeks delay is activable on demand at
the entrance of the supermarket.
You will be able to shop during 2 more weeks and to put your
situation in order.
For the compensation shifts, subscribe like you do for a normal
shift.
</p> </p>
<p class="h_irreg_autoextension"> <p class="h_irreg_autoextension">
<strong>Auto-Extension:</strong> <strong>Auto-Extension:</strong>
You didn't manage to do your compensation shifts in the delay but you benefit from the auto-extension.
You didn't manage to do your compensation shifts in the delay but
you benefit from the auto-extension.
This is two more weeks to do your compensation shifts. You can shop. This is two more weeks to do your compensation shifts. You can shop.
If you don't do your compensation shifts, you'll be suspended. If you don't do your compensation shifts, you'll be suspended.
</p> </p>
<p class="h_irreg_unsubscribed"> <p class="h_irreg_unsubscribed">
<strong>Unsubscribed:</strong> <strong>Unsubscribed:</strong>
Your counter is negative and you haven't come to work for more than 8 weeks.
Your counter is negative and you haven't come to work for more than
8 weeks.
You are unsubscribed. You cannot shop nor can your eaters. You are unsubscribed. You cannot shop nor can your eaters.
To subscribe again of if it's a mistake, please contact membre@bees-coop.be or come to the members office during the opening hours.
To subscribe again of if it's a mistake, please contact
membre@bees-coop.be or come to the members office during the opening
hours.
</p> </p>
</template> </template>
@ -441,7 +507,8 @@
<div class="col"> <div class="col">
<div class="alert alert-info"> <div class="alert alert-info">
Please contact the members office to suscribe to shifts.
Please contact the members office to suscribe to
shifts.
</div> </div>
</div> </div>
@ -476,7 +543,8 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/> <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<p t-if="status.exempt_reason_id"> <p t-if="status.exempt_reason_id">
<label class="font-weight-bold">Exempt Reason:</label>
<label class="font-weight-bold">Exempt Reason:
</label>
<t t-esc="status.exempt_reason_id.name"/> <t t-esc="status.exempt_reason_id.name"/>
</p> </p>
@ -522,7 +590,8 @@
<div class="col-12 col-lg-8 m-auto"> <div class="col-12 col-lg-8 m-auto">
<div class="alert alert-info"> <div class="alert alert-info">
Please contact the members office to suscribe to shifts.
Please contact the members office to suscribe to
shifts.
</div> </div>
</div> </div>
@ -556,22 +625,28 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/> <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<p t-if="status.sr != 0"> <p t-if="status.sr != 0">
<label class="font-weight-bold">Shift in Advance:</label>
<label class="font-weight-bold">Shift in Advance:
</label>
<t t-esc="status.sr"/> <t t-esc="status.sr"/>
</p> </p>
<p t-if="status.sc != 0"> <p t-if="status.sc != 0">
<label class="font-weight-bold">Compensation Shift:</label>
<label class="font-weight-bold">Compensation
Shift:
</label>
<t t-esc="status.sc"/> <t t-esc="status.sc"/>
</p> </p>
<p t-if="status.alert_start_time"> <p t-if="status.alert_start_time">
<label class="font-weight-bold">In Alert Since:</label>
<label class="font-weight-bold">In Alert Since:
</label>
<t t-esc="status.alert_start_time"/> <t t-esc="status.alert_start_time"/>
</p> </p>
<p t-if="status.extension_start_time"> <p t-if="status.extension_start_time">
<label class="font-weight-bold">In Extension Since:</label>
<label class="font-weight-bold">In Extension
Since:
</label>
<t t-esc="status.extension_start_time"/> <t t-esc="status.extension_start_time"/>
</p> </p>
@ -621,27 +696,34 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/> <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<p> <p>
<label class="font-weight-bold">Shift in Advance:</label>
<label class="font-weight-bold">Shift in Advance:
</label>
<t t-esc="status.sr"/> <t t-esc="status.sr"/>
</p> </p>
<p t-if="status.next_countdown_date"> <p t-if="status.next_countdown_date">
<label class="font-weight-bold">Next Countdown Date:</label>
<label class="font-weight-bold">Next Countdown
Date:
</label>
<t t-esc="status.next_countdown_date"/> <t t-esc="status.next_countdown_date"/>
</p> </p>
<p t-if="status.future_alert_date"> <p t-if="status.future_alert_date">
<label class="font-weight-bold">Future Date of Alert:</label>
<label class="font-weight-bold">Future Date of
Alert:
</label>
<t t-esc="status.future_alert_date"/> <t t-esc="status.future_alert_date"/>
</p> </p>
<p t-if="status.irregular_absence_date"> <p t-if="status.irregular_absence_date">
<label class="font-weight-bold">Last Absence Date:</label>
<label class="font-weight-bold">Last Absence Date:
</label>
<t t-esc="status.irregular_absence_date"/> <t t-esc="status.irregular_absence_date"/>
</p> </p>
<p t-if="status.irregular_absence_counter"> <p t-if="status.irregular_absence_counter">
<label class="font-weight-bold">Number of Absence:</label>
<label class="font-weight-bold">Number of Absence:
</label>
<t t-esc="status.irregular_absence_counter"/> <t t-esc="status.irregular_absence_counter"/>
</p> </p>
@ -652,18 +734,24 @@
<div t-if="back_from_subscription" <div t-if="back_from_subscription"
role="alert" role="alert"
t-att-class="'alert alert-%s alert-dismissible' % ('success' if success else 'danger',)"> t-att-class="'alert alert-%s alert-dismissible' % ('success' if success else 'danger',)">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<button type="button" class="close"
data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span> <span aria-hidden="true">×</span>
</button> </button>
<t t-if="success"> <t t-if="success">
<strong>Success!</strong> Your subscription has succeded.
<strong>Success!</strong>
Your subscription has succeded.
</t> </t>
<t t-if="not success"> <t t-if="not success">
<strong>Failed!</strong> Your subscription has failed. Someone
subscribed before you or the shift was deleted. Try again in a
<strong>Failed!</strong>
Your subscription has failed. Someone
subscribed before you or the shift was deleted.
Try again in a
moment. moment.
Please note that you can't subscribe <t t-esc="subscription_time_limit"/> minutes before the shift.
Please note that you can't subscribe
<t t-esc="subscription_time_limit"/>
minutes before the shift.
</t> </t>
</div> </div>
@ -676,8 +764,12 @@
<div class="row"> <div class="row">
<div class="col-12 col-md-6 text-justify"> <div class="col-12 col-md-6 text-justify">
<p> <p>
Please, subscribe, in priority, to the highlighted shifts. To sign up to a shift click on the
subscribe button. Notice that you can not unsubscribe online. To unsubscribe to a shift, please,
Please, subscribe, in priority, to the
highlighted shifts. To sign up to a shift
click on the
subscribe button. Notice that you can not
unsubscribe online. To unsubscribe to a
shift, please,
contact us. contact us.
</p> </p>
</div> </div>

62
beesdoo_website_shift/views/res_config_views.xml

@ -11,47 +11,63 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<div id="webmaster_settings" position="after"> <div id="webmaster_settings" position="after">
<h2>Shift: Irregular Worker</h2> <h2>Shift: Irregular Worker</h2>
<div class="row mt16 o_settings_container" id="shift_irregular_settings">
<div id="irregular_shift_limit_settings" class="col-12 col-md-6 o_setting_box">
<div class="row mt16 o_settings_container"
id="shift_irregular_settings">
<div id="irregular_shift_limit_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="irregular_shift_limit"/> <label for="irregular_shift_limit"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="irregular_shift_limit"/> <field name="irregular_shift_limit"/>
</div> </div>
</div> </div>
</div> </div>
<div id="highlight_rule_pc_settings" class="col-12 col-md-6 o_setting_box">
<div id="highlight_rule_pc_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="highlight_rule_pc"/> <label for="highlight_rule_pc"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="highlight_rule_pc"/> <field name="highlight_rule_pc"/>
</div> </div>
</div> </div>
</div> </div>
<div id="hide_rule_settings" class="col-12 col-md-6 o_setting_box">
<div id="hide_rule_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="hide_rule"/> <label for="hide_rule"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="hide_rule"/> <field name="hide_rule"/>
</div> </div>
</div> </div>
</div> </div>
<div id="irregular_enable_sign_up_settings" class="col-12 col-md-6 o_setting_box">
<div id="irregular_enable_sign_up_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane"> <div class="o_setting_left_pane">
<field name="irregular_enable_sign_up"/> <field name="irregular_enable_sign_up"/>
</div> </div>
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="irregular_enable_sign_up"/> <label for="irregular_enable_sign_up"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
</div> </div>
</div> </div>
<div id="irregular_past_shift_limit_settings" class="col-12 col-md-6 o_setting_box">
<div id="irregular_past_shift_limit_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="irregular_past_shift_limit"/> <label for="irregular_past_shift_limit"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="irregular_past_shift_limit"/> <field name="irregular_past_shift_limit"/>
</div> </div>
@ -59,29 +75,39 @@
</div> </div>
</div> </div>
<h2>Shift: Regular Worker</h2> <h2>Shift: Regular Worker</h2>
<div class="row mt16 o_settings_container" id="shift_regular_settings">
<div id="regular_past_shift_limit_settings" class="col-12 col-md-6 o_setting_box">
<div class="row mt16 o_settings_container"
id="shift_regular_settings">
<div id="regular_past_shift_limit_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="regular_past_shift_limit"/> <label for="regular_past_shift_limit"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="regular_past_shift_limit"/> <field name="regular_past_shift_limit"/>
</div> </div>
</div> </div>
</div> </div>
<div id="regular_next_shift_limit_settings" class="col-12 col-md-6 o_setting_box">
<div id="regular_next_shift_limit_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="regular_next_shift_limit"/> <label for="regular_next_shift_limit"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="regular_next_shift_limit"/> <field name="regular_next_shift_limit"/>
</div> </div>
</div> </div>
</div> </div>
<div id="regular_highlight_rule_settings" class="col-12 col-md-6 o_setting_box">
<div id="regular_highlight_rule_settings"
class="col-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane"> <div class="o_setting_right_pane">
<label for="regular_highlight_rule"/> <label for="regular_highlight_rule"/>
<span class="fa fa-lg fa-globe" title="Values set here are website-specific." groups="website.group_multi_website"/>
<span class="fa fa-lg fa-globe"
title="Values set here are website-specific."
groups="website.group_multi_website"/>
<div class="mt8"> <div class="mt8">
<field name="regular_highlight_rule"/> <field name="regular_highlight_rule"/>
</div> </div>

18
beesdoo_website_shift/views/shift_website_templates.xml

@ -75,20 +75,26 @@
<t t-foreach="task_tpls_data" t-as="template_data"> <t t-foreach="task_tpls_data" t-as="template_data">
<t t-set="template" t-value="template_data[0]"/> <t t-set="template" t-value="template_data[0]"/>
<t t-set="has_enough_workers" t-value="template_data[1]"/>
<t t-set="highlight_header_class" t-value="'bg-warning' if not has_enough_workers else ''"/>
<t t-set="highlight_class" t-value="'border-warning' if not has_enough_workers else ''"/>
<t t-set="has_enough_workers"
t-value="template_data[1]"/>
<t t-set="highlight_header_class"
t-value="'bg-warning' if not has_enough_workers else ''"/>
<t t-set="highlight_class"
t-value="'border-warning' if not has_enough_workers else ''"/>
<div t-att-class="'card mt-4 %s' % highlight_class"> <div t-att-class="'card mt-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class"> <div t-att-class="'card-header %s clearfix' % highlight_header_class">
<div class="pull-left"> <div class="pull-left">
<t t-esc="template.planning_id.name"/> :
<t t-esc="template.planning_id.name"/>
:
<t t-esc="template.day_nb_id.name"/> <t t-esc="template.day_nb_id.name"/>
<t t-esc='float_to_time(template.start_time)' /> -
<t t-esc='float_to_time(template.start_time)'/>
-
<t t-esc='float_to_time(template.end_time)'/> <t t-esc='float_to_time(template.end_time)'/>
</div> </div>
<div class="badge badge-secondary pull-right" <div class="badge badge-secondary pull-right"
t-if="template.remaining_worker > 0"> t-if="template.remaining_worker > 0">
<t t-esc="template.remaining_worker"/> space(s)
<t t-esc="template.remaining_worker"/>
space(s)
</div> </div>
<div class="badge badge-secondary pull-right" <div class="badge badge-secondary pull-right"
t-if="template.remaining_worker == 0"> t-if="template.remaining_worker == 0">

45
beesdoo_worker_status/demo/tasks.xml

@ -5,42 +5,57 @@
--> -->
<odoo> <odoo>
<record id="beesdoo_shift_task_template_1_demo" model="beesdoo.shift.template">
<record id="beesdoo_shift_task_template_1_demo"
model="beesdoo.shift.template">
<field name="name">A_LUN_7:00-9:30</field> <field name="name">A_LUN_7:00-9:30</field>
<field name="planning_id" ref="beesdoo_shift.beesdoo_shift_planning_1_demo" />
<field name="day_nb_id" ref="beesdoo_shift.beesdoo_shift_daynumber_1_demo" />
<field name="task_type_id" ref="beesdoo_shift.beesdoo_shift_task_type_3_demo" />
<field name="planning_id"
ref="beesdoo_shift.beesdoo_shift_planning_1_demo"/>
<field name="day_nb_id"
ref="beesdoo_shift.beesdoo_shift_daynumber_1_demo"/>
<field name="task_type_id"
ref="beesdoo_shift.beesdoo_shift_task_type_3_demo"/>
<field name="start_time">7</field> <field name="start_time">7</field>
<field name="end_time">9.5</field> <field name="end_time">9.5</field>
<field name="duration">2.5</field> <field name="duration">2.5</field>
<field name="worker_nb">12</field> <field name="worker_nb">12</field>
<field name="worker_ids" eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_1_demo')])]"/>
<field name="worker_ids"
eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_1_demo')])]"/>
</record> </record>
<record id="beesdoo_shift_task_template_2_demo" model="beesdoo.shift.template">
<record id="beesdoo_shift_task_template_2_demo"
model="beesdoo.shift.template">
<field name="name">A_MAR_12:00-14:30</field> <field name="name">A_MAR_12:00-14:30</field>
<field name="planning_id" ref="beesdoo_shift.beesdoo_shift_planning_1_demo" />
<field name="day_nb_id" ref="beesdoo_shift.beesdoo_shift_daynumber_2_demo" />
<field name="task_type_id" ref="beesdoo_shift.beesdoo_shift_task_type_2_demo" />
<field name="planning_id"
ref="beesdoo_shift.beesdoo_shift_planning_1_demo"/>
<field name="day_nb_id"
ref="beesdoo_shift.beesdoo_shift_daynumber_2_demo"/>
<field name="task_type_id"
ref="beesdoo_shift.beesdoo_shift_task_type_2_demo"/>
<field name="start_time">12</field> <field name="start_time">12</field>
<field name="end_time">14.5</field> <field name="end_time">14.5</field>
<field name="duration">2.5</field> <field name="duration">2.5</field>
<field name="worker_nb">9</field> <field name="worker_nb">9</field>
<!-- WARNING: issue, worker not registered in demo --> <!-- WARNING: issue, worker not registered in demo -->
<field name="worker_ids" eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_3_demo')])]"/>
<field name="worker_ids"
eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_3_demo')])]"/>
</record> </record>
<record id="beesdoo_shift_task_template_3_demo" model="beesdoo.shift.template">
<record id="beesdoo_shift_task_template_3_demo"
model="beesdoo.shift.template">
<field name="name">A_VEN_7:00-9:30</field> <field name="name">A_VEN_7:00-9:30</field>
<field name="planning_id" ref="beesdoo_shift.beesdoo_shift_planning_1_demo" />
<field name="day_nb_id" ref="beesdoo_shift.beesdoo_shift_daynumber_5_demo" />
<field name="task_type_id" ref="beesdoo_shift.beesdoo_shift_task_type_1_demo" />
<field name="planning_id"
ref="beesdoo_shift.beesdoo_shift_planning_1_demo"/>
<field name="day_nb_id"
ref="beesdoo_shift.beesdoo_shift_daynumber_5_demo"/>
<field name="task_type_id"
ref="beesdoo_shift.beesdoo_shift_task_type_1_demo"/>
<field name="start_time">7</field> <field name="start_time">7</field>
<field name="end_time">9.5</field> <field name="end_time">9.5</field>
<field name="duration">2.5</field> <field name="duration">2.5</field>
<field name="worker_nb">7</field> <field name="worker_nb">7</field>
<!-- WARNING: issue, worker not registered in demo --> <!-- WARNING: issue, worker not registered in demo -->
<field name="worker_ids" eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_6_demo')])]"/>
<field name="worker_ids"
eval="[(6, 0, [ref('beesdoo_base.res_partner_cooperator_6_demo')])]"/>
</record> </record>
</odoo> </odoo>

3
macavrac_base/views/res_partner.xml

@ -9,7 +9,8 @@
<attribute name="autofocus">0</attribute> <attribute name="autofocus">0</attribute>
</xpath> </xpath>
<xpath expr="//notebook" position="inside"> <xpath expr="//notebook" position="inside">
<page string="Google Sheet Infos" name="google_sheet" autofocus="autofocus">
<page string="Google Sheet Infos" name="google_sheet"
autofocus="autofocus">
<group> <group>
<field name="date_stamp"/> <field name="date_stamp"/>
<field name="coop_number"/> <field name="coop_number"/>

3
purchase_order_generator/views/purchase_order.xml

@ -6,7 +6,8 @@
<field name="inherit_id" ref="purchase.purchase_order_form"/> <field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='date_order']" position="after"> <xpath expr="//field[@name='date_order']" position="after">
<field name="original_cpo_id" attrs="{'invisible': [('original_cpo_id','=',False)]}"/>
<field name="original_cpo_id"
attrs="{'invisible': [('original_cpo_id','=',False)]}"/>
</xpath> </xpath>
</field> </field>
</record> </record>

Loading…
Cancel
Save