Browse Source

[REF] format xml files

pull/142/head
robin.keunen 5 years ago
parent
commit
fec11128dc
  1. 4
      beesdoo_account/views/account_invoice.xml
  2. 36
      beesdoo_base/demo/cooperators.xml
  3. 38
      beesdoo_base/report/beescard.xml
  4. 2
      beesdoo_base/security/groups.xml
  5. 44
      beesdoo_base/views/partner.xml
  6. 28
      beesdoo_base/wizard/views/member_card.xml
  7. 10
      beesdoo_base/wizard/views/partner.xml
  8. 30
      beesdoo_easy_my_coop/demo/product_share.xml
  9. 18
      beesdoo_easy_my_coop/views/product.xml
  10. 3
      beesdoo_easy_my_coop/views/res_company.xml
  11. 7
      beesdoo_easy_my_coop/views/subscription_templates.xml
  12. 18
      beesdoo_inventory/views/stock.xml
  13. 30
      beesdoo_pos/static/src/xml/templates.xml
  14. 3
      beesdoo_pos/views/beesdoo_pos.xml
  15. 2
      beesdoo_product/data/product_label.xml
  16. 3
      beesdoo_product/views/assets.xml
  17. 51
      beesdoo_product/views/beesdoo_product.xml
  18. 12
      beesdoo_product/wizard/views/label_printing_utils.xml
  19. 6
      beesdoo_product_usability/views/beesdoo_product.xml
  20. 8
      beesdoo_purchase/report/report_purchaseorder.xml
  21. 9
      beesdoo_purchase/views/purchase_order.xml
  22. 20
      beesdoo_shift/data/cron.xml
  23. 11
      beesdoo_shift/data/mail_template.xml
  24. 61
      beesdoo_shift/demo/workers.xml
  25. 8
      beesdoo_shift/security/group.xml
  26. 156
      beesdoo_shift/views/cooperative_status.xml
  27. 2
      beesdoo_shift/views/exempt_reason.xml
  28. 39
      beesdoo_shift/views/menu.xml
  29. 24
      beesdoo_shift/views/planning.xml
  30. 152
      beesdoo_shift/views/task.xml
  31. 150
      beesdoo_shift/views/task_template.xml
  32. 14
      beesdoo_shift/wizard/assign_super_coop.xml
  33. 22
      beesdoo_shift/wizard/batch_template.xml
  34. 12
      beesdoo_shift/wizard/extension.xml
  35. 8
      beesdoo_shift/wizard/holiday.xml
  36. 8
      beesdoo_shift/wizard/instanciate_planning.xml
  37. 46
      beesdoo_shift/wizard/subscribe.xml
  38. 10
      beesdoo_shift/wizard/temporary_exemption.xml
  39. 17
      beesdoo_shift_attendance/data/cron.xml
  40. 5
      beesdoo_shift_attendance/data/mail_template.xml
  41. 3
      beesdoo_shift_attendance/data/system_parameter.xml
  42. 3
      beesdoo_shift_attendance/demo/users.xml
  43. 14
      beesdoo_shift_attendance/security/group.xml
  44. 87
      beesdoo_shift_attendance/views/attendance_sheet.xml
  45. 42
      beesdoo_shift_attendance/views/res_config_settings_view.xml
  46. 12
      beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.xml
  47. 8
      beesdoo_shift_attendance/wizard/validate_attendance_sheet.xml
  48. 3
      beesdoo_stock/views/stock_view.xml
  49. 2
      beesdoo_stock_coverage/data/cron.xml
  50. 2
      beesdoo_website_eater/views/beesdoo_website_eater_templates.xml
  51. 3
      beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml
  52. 3
      beesdoo_website_shift/data/res_config_data.xml
  53. 248
      beesdoo_website_shift/views/my_shift_website_templates.xml
  54. 64
      beesdoo_website_shift/views/res_config_views.xml
  55. 18
      beesdoo_website_shift/views/shift_website_templates.xml
  56. 45
      beesdoo_worker_status/demo/tasks.xml
  57. 3
      macavrac_base/views/res_partner.xml
  58. 3
      purchase_order_generator/views/purchase_order.xml

4
beesdoo_account/views/account_invoice.xml

@ -2,7 +2,7 @@
<record model="ir.ui.view" id="beesdoo_account_invoice_form_view">
<field name="name">beesdoo.account.invoice.form.view</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>
@ -13,7 +13,7 @@
<record model="ir.ui.view" id="beesdoo_account_invoice_supplier_form_view">
<field name="name">beesdoo.account.invoice.supplier.form.view</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>

36
beesdoo_base/demo/cooperators.xml

@ -87,48 +87,48 @@
<record id="member_card_1_demo" model="member.card">
<field name="barcode">421457731741</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=15)" />
<field name="partner_id" ref="res_partner_cooperator_1_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=15)"/>
<field name="partner_id" ref="res_partner_cooperator_1_demo"/>
<field name="valid" eval="True"/>
</record>
<record id="member_card_2_demo" model="member.card">
<field name="barcode">429919251493</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=10)" />
<field name="partner_id" ref="res_partner_cooperator_2_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=10)"/>
<field name="partner_id" ref="res_partner_cooperator_2_demo"/>
<field name="valid" eval="True"/>
</record>
<record id="member_card_3_demo" model="member.card">
<field name="barcode">421457731742</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=15)" />
<field name="partner_id" ref="res_partner_cooperator_3_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=15)"/>
<field name="partner_id" ref="res_partner_cooperator_3_demo"/>
<field name="valid" eval="True"/>
</record>
<record id="member_card_4_demo" model="member.card">
<field name="barcode">421457731743</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=15)" />
<field name="partner_id" ref="res_partner_cooperator_4_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=15)"/>
<field name="partner_id" ref="res_partner_cooperator_4_demo"/>
<field name="valid" eval="True"/>
</record>
<record id="member_card_5_demo" model="member.card">
<field name="barcode">421457731744</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=15)" />
<field name="partner_id" ref="res_partner_cooperator_5_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=15)"/>
<field name="partner_id" ref="res_partner_cooperator_5_demo"/>
<field name="valid" eval="True"/>
</record>
<record id="member_card_6_demo" model="member.card">
<field name="barcode">421457731745</field>
<field name="comment">Demo data</field>
<field name="create_date" eval="datetime.now() - timedelta(days=15)" />
<field name="partner_id" ref="res_partner_cooperator_6_demo" />
<field name="valid" eval="True" />
<field name="create_date" eval="datetime.now() - timedelta(days=15)"/>
<field name="partner_id" ref="res_partner_cooperator_6_demo"/>
<field name="valid" eval="True"/>
</record>
</odoo>

38
beesdoo_base/report/beescard.xml

@ -2,7 +2,7 @@
<report id="report_beescard_cm" string="Beescaard" model="res.partner"
report_type="qweb-html" file="beesdoo_base.beescard_template_cm"
name="beesdoo_base.beescard_template_cm" />
name="beesdoo_base.beescard_template_cm"/>
<!-- Use paper format a4 low margin -->
@ -53,30 +53,34 @@
style="padding-top:0.2cm;padding-left:0.1cm;padding-bottom:0.2cm;">
<img alt="Embedded Image"
t-att-src="'data:image/png;base64,' + partner.image"
style="width:4.7cm;height:6.4cm" />
style="width:4.7cm;height:6.4cm"/>
</div>
</td>
<td
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;">
<span t-raw="partner.firstname and partner.firstname[:30] or ''" style="font-family:Roboto-Regular" />
<br />
<span t-raw="partner.lastname and partner.lastname[:26] or ''" style="font-family:Roboto-Bold;" />
<br />
<span t-raw="partner.firstname and partner.firstname[:30] or ''"
style="font-family:Roboto-Regular"/>
<br/>
<span t-raw="partner.lastname and partner.lastname[:26] or ''"
style="font-family:Roboto-Bold;"/>
<br/>
</p>
<p style="text-align: left;padding-top: 0.2cm;font-size: 1em;">
<t t-if="partner.parent_eater_id and partner.eater == 'eater'">
<!--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-if="partner.parent_eater_id and partner.parent_eater_id.cooperator_type == 'share_b'">
<!--fix here never true-->
<span
t-raw="'[' + (partner.parent_eater_id.name[:60] or '') + ']'"
style="font-family:Roboto-Regular" />
style="font-family:Roboto-Regular"/>
</t>
</p>
@ -84,7 +88,7 @@
<div style="padding-top:0.3cm">
<img
t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;humanreadable=%s'%('EAN13', partner.barcode if not partner.parent_eater_id else partner.parent_barcode, 340, 70, 1)"
style="width:7.2cm;height:2.52cm" />
style="width:7.2cm;height:2.52cm"/>
</div>
@ -93,12 +97,12 @@
<t t-if="partner.cooperator_type == 'share_a' or partner.parent_eater_id.cooperator_type == 'share_a'">
<img
src="/beesdoo_base/static/src/img/redline.png"
style="width:7.2cm;height:0.2cm" />
style="width:7.2cm;height:0.2cm"/>
</t>
<t t-if="partner.cooperator_type == 'share_b' or partner.parent_eater_id.cooperator_type == 'share_b'">
<img
src="/beesdoo_base/static/src/img/blueline.png"
style="width:7.2cm;height:0.2cm" />
style="width:7.2cm;height:0.2cm"/>
</t>
</div>
</div>
@ -110,7 +114,8 @@
<td colspan="2"
style="vertical-align:center;height: 1.20cm;">
<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
membre@bees-coop.be
</p>
@ -145,7 +150,7 @@
<img
src="/beesdoo_base/static/src/img/logo.png"
style="display: block;margin-left: auto;margin-right: auto;margin-top:0.2cm;margin-bottom:0.2cm;width:6.46cm;height:6.46cm" />
style="display: block;margin-left: auto;margin-right: auto;margin-top:0.2cm;margin-bottom:0.2cm;width:6.46cm;height:6.46cm"/>
</td>
<td></td>
</tr>
@ -153,7 +158,8 @@
<td></td>
<td style="height: 1.20cm;">
<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>
</td>
<td></td>
@ -168,7 +174,7 @@
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
</table>
<br />
<br/>
</t>
</div>
</t>

2
beesdoo_base/security/groups.xml

@ -2,6 +2,6 @@
<odoo>
<record id="group_force_barcode" model="res.groups">
<field name="name">Bees Card Force Barcode</field>
<field name="users" eval="[(6, 0, [ref('base.user_root')])]" />
<field name="users" eval="[(6, 0, [ref('base.user_root')])]"/>
</record>
</odoo>

44
beesdoo_base/views/partner.xml

@ -17,47 +17,50 @@
<record model="ir.ui.view" id="beesdoo_partner_form_view">
<field name="name">beesdoo.partner.form.view</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="website" position="after">
<field name="eater"
attrs="{'invisible': [('customer', '=', False)]}" />
attrs="{'invisible': [('customer', '=', False)]}"/>
<field name="parent_eater_id"
attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
attrs="{'invisible' : [('eater', '!=', 'eater')]}"/>
</field>
<xpath expr="//notebook" position="inside">
<page string="Member Card"
attrs="{'invisible': ['|', ('customer', '=', False), ('eater', 'not in', ('worker_eater', 'eater'))]}">
<group>
<group>
<field name="member_card_to_be_printed" />
<field name="last_printed" />
<field name="member_card_to_be_printed"/>
<field name="last_printed"/>
</group>
</group>
<group attrs="{'invisible': ['|', ('customer', '=', False), ('eater', '!=', 'worker_eater')]}">
<separator string="Eaters" />
<separator string="Eaters"/>
<field name="child_eater_ids" widget="many2many_tags"
options="{'no_create': True}"
context="{'default_eater' : 'eater', 'default_customer' : True}" />
context="{'default_eater' : 'eater', 'default_customer' : True}"/>
<group>
<button string="New Eater" name="%(action_eater_wizard)d"
type="action" />
<button string="New Eater"
name="%(action_eater_wizard)d"
type="action"/>
</group>
<separator string="Cards" />
<separator string="Cards"/>
<field string="Cards" name="member_card_ids">
<tree editable="bottom">
<field name="barcode" />
<field name="create_date" />
<field name="end_date" />
<field name="responsible_id" />
<field name="comment" />
<field name="valid" />
<field name="barcode"/>
<field name="create_date"/>
<field name="end_date"/>
<field name="responsible_id"/>
<field name="comment"/>
<field name="valid"/>
</tree>
</field>
<group>
<button string="New Card"
name="%(action_membercard_wizard)d" type="action" />
name="%(action_membercard_wizard)d"
type="action"/>
</group>
</group>
</page>
@ -71,18 +74,19 @@
</field>
<field name="barcode" position="after">
<field name="parent_barcode"
attrs="{'invisible' : [('eater', '!=', 'eater')]}" />
attrs="{'invisible' : [('eater', '!=', 'eater')]}"/>
</field>
<!-- Temporary fix for the partner_view -->
<xpath expr="//field[@name='customer']" position='before'>
<field name="is_company" invisible="True" />
<field name="is_company" invisible="True"/>
</xpath>
</field>
</record>
<!-- 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">{
'search_default_supplier': 1,
'default_customer': 0,

28
beesdoo_base/wizard/views/member_card.xml

@ -7,15 +7,15 @@
<field name="arch" type="xml">
<form>
<group groups="beesdoo_base.group_force_barcode">
<field name="force_barcode" />
<field name="force_barcode"/>
</group>
<separator string="Reason" />
<field name="new_comment" string="Reason" editable="True" />
<field name="partner_id" invisible="1" />
<separator string="Reason"/>
<field name="new_comment" string="Reason" editable="True"/>
<field name="partner_id" invisible="1"/>
<footer>
<button type="object" name="create_new_card" string="Create"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
@ -27,15 +27,15 @@
<field name="model">membercard.requestprinting.wizard</field>
<field name="arch" type="xml">
<form>
<separator string="Request Printing for" />
<field name="partner_ids" />
<separator string="Request Printing for"/>
<field name="partner_ids"/>
<footer>
<button
type="object"
name="request_printing"
string="Request Beescard Printing"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
@ -57,15 +57,15 @@
<field name="model">membercard.set_as_printed.wizard</field>
<field name="arch" type="xml">
<form>
<separator string="Set as Printed for" />
<field name="partner_ids" />
<separator string="Set as Printed for"/>
<field name="partner_ids"/>
<footer>
<button
type="object"
name="set_as_printed"
string="Set as Printed"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>

10
beesdoo_base/wizard/views/partner.xml

@ -7,14 +7,14 @@
<field name="arch" type="xml">
<form string="Create a new eater">
<group>
<field name="first_name" />
<field name="last_name" />
<field name="email" />
<field name="first_name"/>
<field name="last_name"/>
<field name="email"/>
</group>
<footer>
<button type="object" name="create_new_eater"
string="Create" class="oe_highlight" />
<button special="cancel" string="Cancel" />
string="Create" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

30
beesdoo_easy_my_coop/demo/product_share.xml

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Share products -->
<record id="share_a" model="product.product" >
<record id="share_a" model="product.product">
<field name="name">Acquisition de parts A de Beescoop scrl</field>
<field name="default_code">share_a</field>
<field name="customer" eval="True" />
<field name="allow_working" eval="True" />
<field name="allow_shopping" eval="True" />
<field name="customer" eval="True"/>
<field name="allow_working" eval="True"/>
<field name="allow_shopping" eval="True"/>
<field name="max_nb_eater_allowed">3</field>
<field name="is_share" eval="True" />
<field name="is_share" eval="True"/>
</record>
<record id="share_b" model="product.product" >
<record id="share_b" model="product.product">
<field name="name">Acquisition de parts B de Beescoop scrl</field>
<field name="default_code">share_b</field>
<field name="customer" eval="True" />
<field name="allow_working" eval="False" />
<field name="allow_shopping" eval="True" />
<field name="customer" eval="True"/>
<field name="allow_working" eval="False"/>
<field name="allow_shopping" eval="True"/>
<field name="max_nb_eater_allowed">2</field>
<field name="is_share" eval="True" />
<field name="is_share" eval="True"/>
</record>
<record id="share_c" model="product.product" >
<record id="share_c" model="product.product">
<field name="name">Acquisition de parts C de Beescoop scrl</field>
<field name="default_code">share_c</field>
<field name="customer" eval="True" />
<field name="allow_working" eval="False" />
<field name="allow_shopping" eval="False" />
<field name="customer" eval="True"/>
<field name="allow_working" eval="False"/>
<field name="allow_shopping" eval="False"/>
<field name="max_nb_eater_allowed">-1</field>
<field name="is_share" eval="True" />
<field name="is_share" eval="True"/>
</record>
<!-- Share lines -->

18
beesdoo_easy_my_coop/views/product.xml

@ -1,17 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="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="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 name="minimum_quantity" position="after">
<field name="eater" attrs="{'invisible':[('is_share','=',False)]}"/>
<field name="eater"
attrs="{'invisible':[('is_share','=',False)]}"/>
</field>
</field>
</record>

3
beesdoo_easy_my_coop/views/res_company.xml

@ -9,7 +9,8 @@
<field name="model">res.company</field>
<field name="inherit_id" ref="easy_my_coop.view_company_inherit_form2"/>
<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="info_session_confirmation_required"/>
<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)"
inherit_id="easy_my_coop_website.becomecooperator">
<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="checkbox">
<label for="info_session_confirmed">

18
beesdoo_inventory/views/stock.xml

@ -3,10 +3,10 @@
<record model="ir.ui.view" id="beesdoo_stock_tree_view">
<field name="name">beesdoo.stock.tree.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree" />
<field name="inherit_id" ref="stock.vpicktree"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="responsible" />
<field name="responsible"/>
</field>
</field>
</record>
@ -14,19 +14,23 @@
<record model="ir.ui.view" id="beesdoo_stock_form_view">
<field name="name">beesdoo.stock.form.view</field>
<field name="model">stock.picking</field>
<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="scheduled_date" position="after">
<field name="max_shipping_date" placeholder="Max shipping date" />
<field name="max_shipping_date"
placeholder="Max shipping date"/>
</field>
<field name="backorder_id" position="after">
<field name="responsible" />
<field name="responsible"/>
</field>
<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')]}"/>
</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>
</xpath>
</field>

30
beesdoo_pos/static/src/xml/templates.xml

@ -4,11 +4,11 @@
<t t-jquery="t[t-if='widget.pos.get_client()']" t-operation="after">
<t t-if="widget.pos.get_client()">
<div class='customer-information-pay'>
<span class='customer-delegate1' />
<br />
<span class='customer-delegate2' />
<br />
<span class='customer-delegate3' />
<span class='customer-delegate1'/>
<br/>
<span class='customer-delegate2'/>
<br/>
<span class='customer-delegate3'/>
</div>
</t>
</t>
@ -18,14 +18,14 @@
<t t-jquery=".paymentmethods-container" t-operation="inner">
<t t-if="widget.pos.get_client()">
<div class="customer-information">
<span class='customer-name' />
<br />
<span class='customer-delegate1' />
<br />
<span class='customer-delegate2' />
<br />
<span class='customer-delegate3' />
<br />
<span class='customer-name'/>
<br/>
<span class='customer-delegate1'/>
<br/>
<span class='customer-delegate2'/>
<br/>
<span class='customer-delegate3'/>
<br/>
</div>
</t>
</t>
@ -53,7 +53,9 @@
<t t-extend="ClientLine">
<t t-jquery=".client-line" t-operation="replace">
<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>
</t>
</t>

3
beesdoo_pos/views/beesdoo_pos.xml

@ -3,7 +3,8 @@
<xpath expr="." position="inside">
<script type="text/javascript"
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>
</template>
</odoo>

2
beesdoo_product/data/product_label.xml

@ -63,7 +63,7 @@
</record>
<record id="consignes_group_tax" model="account.tax.group">
<field name="name">Consignes</field>
<field name="sequence" eval="10" />
<field name="sequence" eval="10"/>
</record>
</data>
</odoo>

3
beesdoo_product/views/assets.xml

@ -2,7 +2,8 @@
<odoo>
<template id="assets_frontend" inherit_id="point_of_sale.assets">
<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>
</template>
</odoo>

51
beesdoo_product/views/beesdoo_product.xml

@ -3,13 +3,16 @@
<record model="ir.ui.view" id="beesdoo_product_form">
<field name="name">bees.product.template.form</field>
<field name="model">product.template</field>
<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="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 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 name="purchase_method" position="attributes">
<attribute name="invisible">1</attribute>
@ -29,8 +32,8 @@
<field name="display_weight"/>
<field name="display_unit"/>
<field name="default_reference_unit"/>
<field name="total_with_vat_by_unit" />
<field name="total_deposit" />
<field name="total_with_vat_by_unit"/>
<field name="total_deposit"/>
</group>
<group>
<field name="main_seller_id"/>
@ -43,10 +46,11 @@
</group>
</group>
<group>
<field name="note" />
<field name="note"/>
</group>
</page>
<page string="Scale labels" attrs="{'invisible':[('to_weight','=',False)]}">
<page string="Scale labels"
attrs="{'invisible':[('to_weight','=',False)]}">
<group>
<group name="scale_label">
<field name="deadline_for_sale"/>
@ -69,7 +73,8 @@
<record model="ir.ui.view" id="beesdoo_product_sales_form">
<field name="name">bees.product.sales.form</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="invoice_policy" position="attributes">
<attribute name="invisible">1</attribute>
@ -83,10 +88,10 @@
<field name="arch" type="xml">
<form>
<group>
<field name="name" />
<field name="type" />
<field name="color_code" />
<field name="active" />
<field name="name"/>
<field name="type"/>
<field name="color_code"/>
<field name="active"/>
</group>
</form>
</field>
@ -97,10 +102,10 @@
<field name="model">beesdoo.product.label</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="type" />
<field name="color_code" />
<field name="active" />
<field name="name"/>
<field name="type"/>
<field name="color_code"/>
<field name="active"/>
</tree>
</field>
</record>
@ -108,7 +113,7 @@
<record model="ir.ui.view" id="beesdoo_product_category_list">
<field name="name">beesdoo.product.category.list</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_list_view" />
<field name="inherit_id" ref="product.product_category_list_view"/>
<field name="arch" type="xml">
<field name="display_name" position="after">
<field name="profit_margin"></field>
@ -119,7 +124,7 @@
<record model="ir.ui.view" id="beesdoo_product_category_form">
<field name="name">beesdoo.product.category.form</field>
<field name="model">product.category</field>
<field name="inherit_id" ref="product.product_category_form_view" />
<field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="profit_margin"></field>
@ -130,7 +135,7 @@
<record model="ir.ui.view" id="beesdoo_product_supplierinfo_tree_view">
<field name="name">beesdoo.product.supplierinfo.tree</field>
<field name="model">product.supplierinfo</field>
<field name="inherit_id" ref="product.product_supplierinfo_tree_view" />
<field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
<field name="arch" type="xml">
<field name="price" position="replace">
<field name="price"></field>
@ -144,13 +149,14 @@
<field name="view_mode">tree,form</field>
</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"/>
<record id="beesdoo_product_uom_categ_form" model="ir.ui.view">
<field name="name">uom.category.form</field>
<field name="model">uom.category</field>
<field name="inherit_id" ref="uom.product_uom_categ_form_view" />
<field name="inherit_id" ref="uom.product_uom_categ_form_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="type"/>
@ -188,6 +194,7 @@
<field name="view_mode">tree,form</field>
</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"/>
</odoo>

12
beesdoo_product/wizard/views/label_printing_utils.xml

@ -5,14 +5,14 @@
<field name="model">label.printing.wizard</field>
<field name="arch" type="xml">
<form>
<field name="product_ids" />
<field name="product_ids"/>
<footer>
<button
type="object"
name="request_printing"
string="Request label printing"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
@ -31,14 +31,14 @@
<field name="model">label.printing.wizard</field>
<field name="arch" type="xml">
<form>
<field name="product_ids" />
<field name="product_ids"/>
<footer>
<button
type="object"
name="set_as_printed"
string="Set labels as printed"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

6
beesdoo_product_usability/views/beesdoo_product.xml

@ -24,7 +24,8 @@
</field>
</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>
</record>
@ -32,7 +33,8 @@
<field name="view_mode">tree,form,kanban</field>
</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>
</record>

8
beesdoo_purchase/report/report_purchaseorder.xml

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_purchaseorder_document" inherit_id="purchase.report_purchaseorder_document" name="beesdoo purchaseorder">
<data>
<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.create_uid.name" class="col-xs-3">
@ -12,5 +14,5 @@
</div>
</template>
</data>
</data>
</odoo>

9
beesdoo_purchase/views/purchase_order.xml

@ -3,13 +3,16 @@
<record model="ir.ui.view" id="beesdoo_purchase_order_form_view">
<field name="name">beesdoo.purchase.order.form.view</field>
<field name="model">purchase.order</field>
<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="date_order" position="after">
<field name="supervisor_id"/>
</field>
<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>
</record>
@ -17,7 +20,7 @@
<record model="ir.ui.view" id="beesdoo_purchase_order_tree_view">
<field name="name">beesdoo.purchase.order.tree.view</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_tree" />
<field name="inherit_id" ref="purchase.purchase_order_tree"/>
<field name="arch" type="xml">
<field name="origin" position="after">
<field name="supervisor_id"/>

20
beesdoo_shift/data/cron.xml

@ -2,52 +2,52 @@
<data noupdate="1">
<record id="ir_cron_update_today" model="ir.cron">
<field name="name">Update Cooperatoor status base on the date</field>
<field name="model_id" ref="model_cooperative_status" />
<field name="model_id" ref="model_cooperative_status"/>
<field name="state">code</field>
<field name="code">model._set_today()</field>
<field name="interval_number">24</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="doall" eval="False"/>
</record>
<record id="ir_cron_generate_next_planning" model="ir.cron">
<field name="name">Generate Next Planning</field>
<field name="model_id" ref="model_beesdoo_shift_planning" />
<field name="model_id" ref="model_beesdoo_shift_planning"/>
<field name="state">code</field>
<field name="code">model._generate_next_planning()</field>
<field name="interval_number">1</field>
<field name="interval_type">weeks</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="doall" eval="False"/>
</record>
<record id="ir_cron_compute_shift_counter" model="ir.cron">
<field name="name">Compute Shift Counter</field>
<field name="model_id" ref="model_cooperative_status" />
<field name="model_id" ref="model_cooperative_status"/>
<field name="state">code</field>
<field name="code">model._cron_compute_counter_irregular()</field>
<field name="interval_number">4</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True" />
<field name="active" eval="False" />
<field name="doall" eval="True"/>
<field name="active" eval="False"/>
<field name="state">code</field>
</record>
<record id="ir_cron_send_weekly_emails" model="ir.cron">
<field name="name">Send weekly shift summary</field>
<field name="model_id" ref="model_beesdoo_shift_shift" />
<field name="model_id" ref="model_beesdoo_shift_shift"/>
<field name="state">code</field>
<field name="code">model._cron_send_weekly_emails()</field>
<field name="interval_number">7</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True" />
<field name="doall" eval="True"/>
<field name="nextcall"
eval="datetime.now() + timedelta((6 - datetime.now().weekday()) % 7)"
/>
<field name="active" eval="False" />
<field name="active" eval="False"/>
</record>
</data>

11
beesdoo_shift/data/mail_template.xml

@ -5,9 +5,14 @@
<data noupdate="1">
<record id="email_template_shift_summary" model="mail.template">
<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="auto_delete" eval="True"/>
<field name="lang">${object.worker_id.lang}</field>

61
beesdoo_shift/demo/workers.xml

@ -6,10 +6,12 @@
<odoo>
<record id="cooperative_status_1_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_1_demo" />
<field name="info_session" eval="True" />
<field name="info_session_date" eval="datetime.now() - timedelta(days=58)" />
<field name="super" eval="True" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_1_demo"/>
<field name="info_session" eval="True"/>
<field name="info_session_date"
eval="datetime.now() - timedelta(days=58)"/>
<field name="super" eval="True"/>
<field name="sr">2</field>
<field name="working_mode">regular</field>
</record>
@ -17,27 +19,33 @@
<record id="beesdoo_base.res_partner_cooperator_1_demo" model="res.partner">
<field name="working_mode">regular</field>
<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 id="cooperative_status_2_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_2_demo" />
<field name="info_session" eval="False" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_2_demo"/>
<field name="info_session" eval="False"/>
<field name="sr">2</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 id="beesdoo_base.res_partner_cooperator_2_demo" model="res.partner">
<field name="working_mode">irregular</field>
<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 id="cooperative_status_3_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_3_demo" />
<field name="info_session" eval="True" />
<field name="info_session_date" eval="datetime.now() - timedelta(days=98)" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_3_demo"/>
<field name="info_session" eval="True"/>
<field name="info_session_date"
eval="datetime.now() - timedelta(days=98)"/>
<field name="sc">2</field>
<field name="working_mode">regular</field>
</record>
@ -45,24 +53,29 @@
<record id="beesdoo_base.res_partner_cooperator_3_demo" model="res.partner">
<field name="working_mode">regular</field>
<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 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="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 id="beesdoo_base.res_partner_cooperator_4_demo" model="res.partner">
<field name="working_mode">irregular</field>
<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 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="working_mode">regular</field>
</record>
@ -70,13 +83,16 @@
<record id="beesdoo_base.res_partner_cooperator_5_demo" model="res.partner">
<field name="working_mode">regular</field>
<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 id="cooperative_status_6_demo" model="cooperative.status">
<field name="cooperator_id" ref="beesdoo_base.res_partner_cooperator_6_demo" />
<field name="info_session" eval="True" />
<field name="info_session_date" eval="datetime.now() - timedelta(days=36)" />
<field name="cooperator_id"
ref="beesdoo_base.res_partner_cooperator_6_demo"/>
<field name="info_session" eval="True"/>
<field name="info_session_date"
eval="datetime.now() - timedelta(days=36)"/>
<field name="sc">2</field>
<field name="working_mode">regular</field>
</record>
@ -84,7 +100,8 @@
<record id="beesdoo_base.res_partner_cooperator_6_demo" model="res.partner">
<field name="working_mode">regular</field>
<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>
</odoo>

8
beesdoo_shift/security/group.xml

@ -1,11 +1,13 @@
<odoo>
<record id="group_shift_attendance" model="res.groups">
<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 id="group_shift_management" model="res.groups">
<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'))]"/>
</record>
<record id="group_planning_management" model="res.groups">
@ -20,7 +22,7 @@
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_planning_management'))]" />
eval="[(4, ref('group_planning_management'))]"/>
<field name="users"
eval="[(4, ref('base.user_root')),
(4, ref('base.user_admin'))]"/>

156
beesdoo_shift/views/cooperative_status.xml

@ -7,33 +7,45 @@
<field name="arch" type="xml">
<xpath expr="//sheet" position="before">
<header>
<button name="coop_subscribe" string="Subscribe to shift" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
<button name="coop_subscribe" string="Subscribe to shift"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': [('is_worker', '=', False)]}"/>
<button name="auto_extension" 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': ['|',
('is_worker', '=', False),
'|',
('state', '!=', 'suspended'),
('extension_start_time', '!=', False)]}" />
<button name="manual_extension" string="Manual Extension" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
('extension_start_time', '!=', False)]}"/>
<button name="manual_extension" string="Manual Extension"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': ['|',
('is_worker', '=', False),
'|',
('state', '!=', 'suspended'),
('extension_start_time', '=', False)]}" />
<button name="coop_unsubscribe" string="Unsubscribe" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management"
('extension_start_time', '=', False)]}"/>
<button name="coop_unsubscribe" string="Unsubscribe"
class="oe_highlight"
type="object"
groups="beesdoo_shift.group_shift_management"
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')]}"/>
<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')]}"/>
<field name="state" widget="statusbar" attrs="{'invisible': [('is_worker', '=', False)]}" />
<field name="state" widget="statusbar"
attrs="{'invisible': [('is_worker', '=', False)]}"/>
</header>
</xpath>
<xpath expr="//field[@name='type']" position="before">
@ -47,19 +59,21 @@
<group name="info_session"/>
<group>
<group>
<field name="info_session" />
<field name="info_session"/>
<field name="info_session_date"
attrs="{'invisible': ['|', ('info_session', '=', False)]}" />
<field name="extension_start_time" attrs="{'invisible': [('extension_start_time', '=', False)]}" />
attrs="{'invisible': ['|', ('info_session', '=', False)]}"/>
<field name="extension_start_time"
attrs="{'invisible': [('extension_start_time', '=', False)]}"/>
</group>
<group>
<field name="working_mode" />
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="super" />
<field name="working_mode"/>
<field name="exempt_reason_id"
attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="super"/>
</group>
</group>
<separator string="Subscribed Shift" />
<field name="subscribed_shift_ids" />
<separator string="Subscribed Shift"/>
<field name="subscribed_shift_ids"/>
</page>
</xpath>
</field>
@ -71,55 +85,62 @@
<field name="arch" type="xml">
<form>
<header>
<field name="status" widget="statusbar" />
<field name="status" widget="statusbar"/>
</header>
<group>
<group string="General information">
<field name="cooperator_id" />
<field name="super" />
<field name="working_mode" />
<field name="irregular_start_date" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="irregular_absence_date" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="cooperator_id"/>
<field name="super"/>
<field name="working_mode"/>
<field name="irregular_start_date"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="irregular_absence_date"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="exempt_reason_id" attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
<field name="exempt_reason_id"
attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
</group>
<group string="Counter and Status">
<field name="info_session" />
<field name="info_session_date" />
<field name="sr" />
<field name="sc" />
<field name="irregular_absence_counter" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="unsubscribed" />
<field name="resigning" />
<field name="can_shop" />
<field name="info_session"/>
<field name="info_session_date"/>
<field name="sr"/>
<field name="sc"/>
<field name="irregular_absence_counter"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="unsubscribed"/>
<field name="resigning"/>
<field name="can_shop"/>
</group>
<group string="Timing information">
<field name="next_countdown_date" readonly="1" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="future_alert_date" readonly="1" attrs="{'invisible':[('working_mode', '!=', 'irregular')]}" />
<field name="time_extension" />
<field name="holiday_start_time" />
<field name="holiday_end_time" />
<field name="alert_start_time" />
<field name="extension_start_time" />
<field name="next_countdown_date" readonly="1"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="future_alert_date" readonly="1"
attrs="{'invisible':[('working_mode', '!=', 'irregular')]}"/>
<field name="time_extension"/>
<field name="holiday_start_time"/>
<field name="holiday_end_time"/>
<field name="alert_start_time"/>
<field name="extension_start_time"/>
</group>
<group string="Temporary Exemption">
<field name="temporary_exempt_reason_id" />
<field name="temporary_exempt_start_date" />
<field name="temporary_exempt_end_date" />
<field name="temporary_exempt_reason_id"/>
<field name="temporary_exempt_start_date"/>
<field name="temporary_exempt_end_date"/>
</group>
</group>
<group groups="base.group_no_one" col="3">
<separator string="For testing purpose only" colspan="3"/>
<field name="today" />
<button name="clear_history" type="object" string="Clear History" />
<field name="today"/>
<button name="clear_history" type="object"
string="Clear History"/>
</group>
<separator string="History" colspan="2"/>
<field name="history_ids">
<tree>
<field name="create_date" string="Date" />
<field name="type" />
<field name="change" />
<field name="user_id" />
<field name="create_date" string="Date"/>
<field name="type"/>
<field name="change"/>
<field name="user_id"/>
</tree>
</field>
</form>
@ -131,16 +152,16 @@
<field name="model">cooperative.status</field>
<field name="arch" type="xml">
<tree>
<field name="cooperator_id" />
<field name="super" />
<field name="sr" />
<field name="sc" />
<field name="time_extension" />
<field name="holiday_start_time" />
<field name="holiday_end_time" />
<field name="alert_start_time" />
<field name="extension_start_time" />
<field name="status" widget="statusbar" />
<field name="cooperator_id"/>
<field name="super"/>
<field name="sr"/>
<field name="sc"/>
<field name="time_extension"/>
<field name="holiday_start_time"/>
<field name="holiday_end_time"/>
<field name="alert_start_time"/>
<field name="extension_start_time"/>
<field name="status" widget="statusbar"/>
</tree>
</field>
</record>
@ -151,17 +172,18 @@
<field name="arch" type="xml">
<form>
<header>
<button name="run" string="Run again for this day" type="object" />
<button name="run" string="Run again for this day"
type="object"/>
</header>
<group>
<group>
<field name="date" />
<field name="date"/>
</group>
</group>
<separator string="Assigned cooperator" />
<separator string="Assigned cooperator"/>
<field name="line_ids" readonly="1">
<tree>
<field name="cooperator_id" />
<field name="cooperator_id"/>
</tree>
</field>
</form>

2
beesdoo_shift/views/exempt_reason.xml

@ -5,7 +5,7 @@
<field name="model">cooperative.exempt.reason</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="name"/>
</tree>
</field>
</record>

39
beesdoo_shift/views/menu.xml

@ -3,46 +3,53 @@
<!-- Root menu -->
<menuitem name="Shift Management" id="menu_root"
groups="beesdoo_shift.group_shift_attendance" />
groups="beesdoo_shift.group_shift_attendance"/>
<!-- Planning -->
<menuitem name="Planning" id="menu_task_top" parent="menu_root"
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"
action="action_task" groups="beesdoo_shift.group_shift_attendance" />
action="action_task"
groups="beesdoo_shift.group_shift_attendance"/>
<!-- Worker -->
<menuitem name="Worker" id="menu_worker_top" parent="menu_root"
groups="beesdoo_shift.group_shift_attendance" sequence="1" />
groups="beesdoo_shift.group_shift_attendance" sequence="1"/>
<menuitem name="Worker" id="menu_worker" parent="menu_worker_top"
action="action_worker" />
action="action_worker"/>
<!-- Templates -->
<menuitem name="Templates" id="menu_template_top" parent="menu_root"
groups="beesdoo_shift.group_shift_management"
sequence="20" />
sequence="20"/>
<menuitem name="Planning Week" id="menu_planning" parent="menu_template_top"
sequence="20" action="action_planning" />
sequence="20" action="action_planning"/>
<!-- Status -->
<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 -->
@ -54,9 +61,9 @@
/>
<menuitem name="Shift Day" id="menu_configuration_day"
parent="menu_configuration_top" action="action_day_number" />
parent="menu_configuration_top" action="action_day_number"/>
<menuitem name="Shift Type" id="menu_configuration_type"
parent="menu_configuration_top" action="action_type" />
parent="menu_configuration_top" action="action_type"/>
</odoo>

24
beesdoo_shift/views/planning.xml

@ -24,7 +24,7 @@
<header>
<button type="action"
name="%(action_generate_shift_wizard)d"
string="Generate shifts" colspan="2" />
string="Generate shifts" colspan="2"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
@ -35,11 +35,11 @@
</div>
<div class="oe_title">
<h1>
<field name="name" placeholder="name" />
<field name="name" placeholder="name"/>
</h1>
</div>
<group>
<field name="sequence" />
<field name="sequence"/>
</group>
</sheet>
</form>
@ -51,10 +51,10 @@
<field name="model">beesdoo.shift.planning</field>
<field name="arch" type="xml">
<tree>
<field name="sequence" />
<field name="name" />
<field name="sequence"/>
<field name="name"/>
<button type="action" name="%(action_shift_template)d"
string="Shifts Template" />
string="Shifts Template"/>
</tree>
</field>
</record>
@ -64,9 +64,9 @@
<field name="model">beesdoo.shift.daynumber</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="number" />
<field name="active" />
<field name="name"/>
<field name="number"/>
<field name="active"/>
</tree>
</field>
</record>
@ -76,9 +76,9 @@
<field name="model">beesdoo.shift.type</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
<field name="description" />
<field name="active" />
<field name="name"/>
<field name="description"/>
<field name="active"/>
</tree>
</field>
</record>

152
beesdoo_shift/views/task.xml

@ -4,15 +4,15 @@
<field name="model">beesdoo.shift.shift</field>
<field name="arch" type="xml">
<tree>
<field name="start_time" />
<field name="planning_id" />
<field name="task_type_id" />
<field name="name" />
<field name="super_coop_id" />
<field name="worker_id" />
<field name="replaced_id" />
<field name="end_time" />
<field name="state" />
<field name="start_time"/>
<field name="planning_id"/>
<field name="task_type_id"/>
<field name="name"/>
<field name="super_coop_id"/>
<field name="worker_id"/>
<field name="replaced_id"/>
<field name="end_time"/>
<field name="state"/>
</tree>
</field>
</record>
@ -22,52 +22,52 @@
<field name="model">beesdoo.shift.shift</field>
<field name="arch" type="xml">
<search>
<field name="planning_id" />
<field name="task_type_id" />
<field name="name" />
<field name="super_coop_id" />
<field name="worker_id" />
<field name="planning_id"/>
<field name="task_type_id"/>
<field name="name"/>
<field name="super_coop_id"/>
<field name="worker_id"/>
<filter string="My Team Shift"
name="my_team_shift"
domain="[('super_coop_id', '=', uid)]" />
domain="[('super_coop_id', '=', uid)]"/>
<filter string="My Shift"
name="my_shift"
domain="[('worker_id.user_ids', 'in', uid)]" />
<separator />
domain="[('worker_id.user_ids', 'in', uid)]"/>
<separator/>
<filter string="Assigned"
name="assigned"
domain="[('worker_id', '!=', False)]" />
domain="[('worker_id', '!=', False)]"/>
<filter string="Unassigned"
name="unassigned"
domain="[('worker_id', '=', False)]" />
<separator />
domain="[('worker_id', '=', False)]"/>
<separator/>
<filter string="4 next days" name="nextweek"
domain="[('end_time','&gt;', context_today().strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() + datetime.timedelta(days=4)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', context_today().strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() + datetime.timedelta(days=4)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="J-5" name="jminus5"
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=5)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=5)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=5)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=5)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="J-4" name="jminus4"
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=4)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=4)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=4)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=4)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="J-3" name="jminus3"
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=3)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=3)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=3)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=3)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="J-2" name="jminus2"
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=2)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=2)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=2)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=2)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="J-1" name="jminus1"
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d 23:59:59'))]"/>
<filter string="Today" name="today"
domain="[('end_time','&gt;', context_today().strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', context_today().strftime('%Y-%m-%d 23:59:59'))]" />
domain="[('end_time','&gt;', context_today().strftime('%Y-%m-%d 00:00:00')), ('start_time','&lt;', context_today().strftime('%Y-%m-%d 23:59:59'))]"/>
<group expand="1" string="Group By">
<filter string="Shift Template"
name="template"
context="{'group_by' : 'task_template_id'}" />
context="{'group_by' : 'task_template_id'}"/>
<filter string="Type"
name="gb_type"
context="{'group_by' : 'task_type_id'}" />
context="{'group_by' : 'task_type_id'}"/>
<filter string="Status"
name="gb_status"
context="{'group_by' : 'state'}" />
context="{'group_by' : 'state'}"/>
<filter string="Day"
name="gb_day"
context="{'group_by' : 'start_time:day'}" />
context="{'group_by' : 'start_time:day'}"/>
</group>
</search>
</field>
@ -79,9 +79,9 @@
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="start_time"
date_stop="end_time" color="task_type_id">
<field name="name" />
<field name="super_coop_id" />
<field name="worker_id" />
<field name="name"/>
<field name="super_coop_id"/>
<field name="worker_id"/>
</calendar>
</field>
</record>
@ -92,24 +92,27 @@
<field name="arch" type="xml">
<form>
<header>
<field name="state" widget="statusbar" clickable="1" />
<field name="state" widget="statusbar" clickable="1"/>
</header>
<sheet>
<div class="oe_title">
<h1>
<field name="name" />
<field name="name"/>
</h1>
</div>
<group>
<group>
<field name="task_template_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="task_template_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="replaced_id"
options="{'no_create': True, 'no_open': True}"
domain="[('working_mode', '=', 'regular')]"
attrs="{'invisible': [('working_mode', '!=', 'regular')]}" />
attrs="{'invisible': [('working_mode', '!=', 'regular')]}"/>
<field name="is_regular"
attrs="{'invisible': [('working_mode', '!=', 'regular')]}"/>
<field name="is_compensation"
@ -117,16 +120,16 @@
<field name="working_mode" invisible="1"/>
</group>
<group>
<field name="start_time" />
<field name="end_time" />
<field name="revert_info" invisible="0" />
<field name="start_time"/>
<field name="end_time"/>
<field name="revert_info" invisible="0"/>
</group>
</group>
</sheet>
<!-- Solution Ex1 -->
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
@ -137,55 +140,69 @@
<field name="model">beesdoo.shift.shift</field>
<field name="arch" type="xml">
<kanban>
<field name="color" />
<field name="task_type_id" />
<field name="name" />
<field name="state" />
<field name="worker_id" />
<field name="replaced_id" />
<field name="super_coop_id" />
<field name="is_regular" />
<field name="color"/>
<field name="task_type_id"/>
<field name="name"/>
<field name="state"/>
<field name="worker_id"/>
<field name="replaced_id"/>
<field name="super_coop_id"/>
<field name="is_regular"/>
<templates>
<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 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"/>
</a>
<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 class="oe_kanban_content">
<strong>
<field name="name" />
<field name="name"/>
</strong>
<div>
<field name="start_time"
widget="datetime" />
widget="datetime"/>
-
<field name="end_time" widget="datetime" />
<field name="end_time" widget="datetime"/>
</div>
<div>
Status:
<field name="state" />
<field name="state"/>
</div>
<div t-if="record.task_type_id.raw_value">
Type:
<field name="task_type_id" />
<field name="task_type_id"/>
</div>
<div>
Worker:
<field name="worker_id" />
<field name="worker_id"/>
</div>
<div t-if="record.replaced_id.raw_value">
Replacement worker:
<field name="replaced_id" />
<field name="replaced_id"/>
</div>
<div t-if="record.super_coop_id.raw_value">
Super Coop:
<field name="super_coop_id" />
<field name="super_coop_id"/>
</div>
<div t-if="record.is_regular.raw_value">
Regular Shift
@ -204,8 +221,7 @@
<field name="name">Shifts</field>
<field name="res_model">beesdoo.shift.shift</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>
</odoo>

150
beesdoo_shift/views/task_template.xml

@ -4,16 +4,16 @@
<field name="model">beesdoo.shift.template</field>
<field name="arch" type="xml">
<tree>
<field name="planning_id" />
<field name="task_type_id" />
<field name="day_nb_id" />
<field name="name" />
<field name="super_coop_id" />
<field name="start_time" />
<field name="end_time" />
<field name="duration" />
<field name="worker_nb" />
<field name="remaining_worker" />
<field name="planning_id"/>
<field name="task_type_id"/>
<field name="day_nb_id"/>
<field name="name"/>
<field name="super_coop_id"/>
<field name="start_time"/>
<field name="end_time"/>
<field name="duration"/>
<field name="worker_nb"/>
<field name="remaining_worker"/>
</tree>
</field>
</record>
@ -23,17 +23,20 @@
<field name="model">beesdoo.shift.template</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field name="planning_id" />
<field name="task_type_id" />
<field name="super_coop_id" />
<field name="day_nb_id" />
<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'}" />
<field name="name"/>
<field name="planning_id"/>
<field name="task_type_id"/>
<field name="super_coop_id"/>
<field name="day_nb_id"/>
<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="Place Available" name="available"
domain="[('remaining_worker', '>', 0)]" />
domain="[('remaining_worker', '>', 0)]"/>
</search>
</field>
</record>
@ -46,27 +49,27 @@
<sheet>
<div class="oe_title">
<h1>
<field name="name" placeholder="name" />
<field name="name" placeholder="name"/>
</h1>
</div>
<group>
<group>
<field name="day_nb_id" />
<field name="planning_id" />
<field name="task_type_id" />
<field name="worker_nb" />
<field name="remaining_worker" />
<field name="active" />
<field name="day_nb_id"/>
<field name="planning_id"/>
<field name="task_type_id"/>
<field name="worker_nb"/>
<field name="remaining_worker"/>
<field name="active"/>
</group>
<group>
<field name="start_time" widget="float_time" />
<field name="duration" widget="float_time" />
<field name="end_time" widget="float_time" />
<field name="super_coop_id" />
<field name="start_time" widget="float_time"/>
<field name="duration" widget="float_time"/>
<field name="end_time" widget="float_time"/>
<field name="super_coop_id"/>
</group>
</group>
<separator string="Recurring Workers" />
<field name="worker_ids" nolabel="1" />
<separator string="Recurring Workers"/>
<field name="worker_ids" nolabel="1"/>
</sheet>
</form>
</field>
@ -78,9 +81,9 @@
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="start_date"
date_stop="end_date" color="task_type_id">
<field name="name" />
<field name="super_coop_id" />
<field name="worker_ids" />
<field name="name"/>
<field name="super_coop_id"/>
<field name="worker_ids"/>
</calendar>
</field>
</record>
@ -90,65 +93,81 @@
<field name="model">beesdoo.shift.template</field>
<field name="arch" type="xml">
<kanban>
<field name="planning_id" />
<field name="color" />
<field name="task_type_id" />
<field name="name" />
<field name="day_nb_id" />
<field name="worker_nb" />
<field name="worker_ids" />
<field name="worker_name" />
<field name="super_coop_id" />
<field name="planning_id"/>
<field name="color"/>
<field name="task_type_id"/>
<field name="name"/>
<field name="day_nb_id"/>
<field name="worker_nb"/>
<field name="worker_ids"/>
<field name="worker_name"/>
<field name="super_coop_id"/>
<templates>
<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">
<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"/>
</a>
<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>
</t>
<div class="oe_kanban_content">
<strong>
<field name="name" />
<field name="name"/>
</strong>
<div>
<field name="planning_id" />
<field name="planning_id"/>
</div>
<div t-if="record.task_type_id.raw_value">
Type:
<field name="task_type_id" />
<field name="task_type_id"/>
</div>
<div t-if="record.super_coop_id.raw_value">
Super Coop:
<field name="super_coop_id" />
<field name="super_coop_id"/>
</div>
<div>
Worker Number:
<field name="worker_nb" />
<field name="worker_nb"/>
</div>
<div>
<field name="start_time"
widget="float_time" />
widget="float_time"/>
-
<field name="end_time" widget="float_time" />
<field name="end_time" widget="float_time"/>
</div>
</div>
<div>
<br />
<br/>
<strong>Recurring Workers</strong>
<t
t-foreach="record.worker_name.raw_value.split(',')"
t-as="worker">
<div>
<t t-esc="worker" />
<t t-esc="worker"/>
</div>
</t>
</div>
@ -159,7 +178,8 @@
</field>
</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="res_model">beesddoo.shift.generate_shift_template</field>
<field name="view_mode">form</field>
@ -174,19 +194,19 @@
<header>
<button type="action"
name="%(action_generate_shift_template_wizard)d"
string="Generate shift Templates" />
string="Generate shift Templates"/>
</header>
<sheet>
<group>
<group>
<field name="name" />
<field name="name"/>
</group>
<group>
<field name="active" />
<field name="active"/>
</group>
</group>
<separator string="Description" />
<field name="description" />
<separator string="Description"/>
<field name="description"/>
</sheet>
</form>
</field>

14
beesdoo_shift/wizard/assign_super_coop.xml

@ -5,23 +5,23 @@
<field name="arch" type="xml">
<form>
<group>
<field name="super_coop_id" />
<field name="shift_ids" invisible="1" />
<field name="super_coop_id"/>
<field name="shift_ids" invisible="1"/>
</group>
<footer>
<button type="object" name="write_super_coop"
string="Confirm" class="oe_highlight" />
string="Confirm" class="oe_highlight"/>
or
<button special="cancel" string="Cancel" />
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window id="act_assign_new_super_coop" name="Change Super Coop"
src_model="beesdoo.shift.shift" res_model="beesddoo.shift.assign_super_coop"
view_mode="form" target="new" key2="client_action_multi" />
src_model="beesdoo.shift.shift"
res_model="beesddoo.shift.assign_super_coop"
view_mode="form" target="new" key2="client_action_multi"/>
</odoo>

22
beesdoo_shift/wizard/batch_template.xml

@ -5,37 +5,37 @@
<field name="arch" type="xml">
<form>
<group>
<field name="planning_id" />
<field name="type_id" invisible="1" />
<field name="planning_id"/>
<field name="type_id" invisible="1"/>
</group>
<group>
<group>
<separator string="Daily Schedule"
colspan="2" />
colspan="2"/>
<field name="line_ids" nolabel="1">
<tree editable="bottom">
<field name="start_time" widget="float_time" />
<field name="end_time" widget="float_time" />
<field name="worker_nb" />
<field name="start_time" widget="float_time"/>
<field name="end_time" widget="float_time"/>
<field name="worker_nb"/>
</tree>
</field>
</group>
<group>
<separator string="Apply for Days"
colspan="2" />
colspan="2"/>
<field name="day_ids" nolabel="1">
<tree>
<field name="name" />
<field name="number" />
<field name="name"/>
<field name="number"/>
</tree>
</field>
</group>
</group>
<footer>
<button type="object" name="generate" string="Confirm"
class="oe_highlight" />
class="oe_highlight"/>
or
<button special="cancel" string="Cancel" />
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

12
beesdoo_shift/wizard/extension.xml

@ -7,18 +7,20 @@
<field name="cooperator_id" invisible="1"/>
<field name="auto" invisible="1"/>
<group attrs="{'invisible': [('auto', '=', False)]}">
<field name="extension_start_date" />
<field name="extension_start_date"/>
</group>
<group attrs="{'invisible': [('auto', '=', True)]}">
<field name="extension_days" />
<field name="extension_days"/>
</group>
<footer>
<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"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('auto', '=', False)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('auto', '=', False)]}"/>
or
<button special="cancel" string="Cancel" />
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

8
beesdoo_shift/wizard/holiday.xml

@ -6,13 +6,13 @@
<form>
<field name="cooperator_id" invisible="1"/>
<group>
<field name="holiday_start_day" />
<field name="holiday_end_day" />
<field name="holiday_start_day"/>
<field name="holiday_end_day"/>
</group>
<footer>
<button type="object" name="holidays"
string="Confirm" class="oe_highlight" />
<button special="cancel" string="Cancel" />
string="Confirm" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

8
beesdoo_shift/wizard/instanciate_planning.xml

@ -5,14 +5,14 @@
<field name="arch" type="xml">
<form>
<group>
<field name="date_start" />
<field name="planning_id" invisible="1" />
<field name="date_start"/>
<field name="planning_id" invisible="1"/>
</group>
<footer>
<button type="object" name="generate_task"
string="Confirm" class="oe_highlight" />
string="Confirm" class="oe_highlight"/>
or
<button special="cancel" string="Cancel" />
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

46
beesdoo_shift/wizard/subscribe.xml

@ -5,33 +5,43 @@
<field name="arch" type="xml">
<form>
<group attrs="{'invisible': [('unsubscribed', '=', False)]}">
<separator string="Are you sure to unsubscribe this cooperator ?" colspan="2"/>
<field name="resigning" />
<field name="unsubscribed" invisible="1" />
<separator
string="Are you sure to unsubscribe this cooperator ?"
colspan="2"/>
<field name="resigning"/>
<field name="unsubscribed" invisible="1"/>
</group>
<group attrs="{'invisible': [('unsubscribed', '=', True)]}">
<field name="cooperator_id" />
<field name="info_session" />
<field name="info_session_date" />
<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="cooperator_id"/>
<field name="info_session"/>
<field name="info_session_date"/>
<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="nb_shifts" attrs="{'invisible': True}"/>
<field name="irregular_start_date" attrs="{'invisible': [('working_mode', '!=', 'irregular')]}" />
<field name="super" />
<field name="reset_counter" />
<field name="reset_compensation_counter" /> <!-- TODO access right -->
<field name="irregular_start_date"
attrs="{'invisible': [('working_mode', '!=', 'irregular')]}"/>
<field name="super"/>
<field name="reset_counter"/>
<field name="reset_compensation_counter"/> <!-- TODO access right -->
</group>
<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>
<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"
string="Confirm" class="oe_highlight" attrs="{'invisible': [('unsubscribed', '=', False)]}" />
string="Confirm" class="oe_highlight"
attrs="{'invisible': [('unsubscribed', '=', False)]}"/>
or
<button special="cancel" string="Cancel" />
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

10
beesdoo_shift/wizard/temporary_exemption.xml

@ -6,14 +6,14 @@
<form>
<field name="cooperator_id" invisible="1"/>
<group>
<field name="temporary_exempt_reason_id" />
<field name="temporary_exempt_start_date" />
<field name="temporary_exempt_end_date" />
<field name="temporary_exempt_reason_id"/>
<field name="temporary_exempt_start_date"/>
<field name="temporary_exempt_end_date"/>
</group>
<footer>
<button type="object" name="exempt"
string="Confirm" class="oe_highlight" />
<button special="cancel" string="Cancel" />
string="Confirm" class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

17
beesdoo_shift_attendance/data/cron.xml

@ -2,28 +2,29 @@
<data noupdate="1">
<record id="ir_cron_generate_attendance_sheet" model="ir.cron">
<field name="name">Generate Attendance Sheets</field>
<field name="model_id" ref="model_beesdoo_shift_sheet" />
<field name="model_id" ref="model_beesdoo_shift_sheet"/>
<field name="state">code</field>
<field name="code">model._generate_attendance_sheet()</field>
<field name="user_id" ref="base.user_root" />
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">4</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="active" eval="False" />
<field name="doall" eval="False"/>
<field name="active" eval="False"/>
</record>
<record id="ir_cron_check_non_validated_sheet" model="ir.cron">
<field name="name">Check for non-validated sheets</field>
<field name="model_id" ref="model_beesdoo_shift_sheet" />
<field name="model_id" ref="model_beesdoo_shift_sheet"/>
<field name="state">code</field>
<field name="code">model._cron_non_validated_sheets()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="nextcall" eval="datetime.now().replace(hour=00, minute=00, second=10)" />
<field name="active" eval="False" />
<field name="doall" eval="False"/>
<field name="nextcall"
eval="datetime.now().replace(hour=00, minute=00, second=10)"/>
<field name="active" eval="False"/>
</record>
</data>
</odoo>

5
beesdoo_shift_attendance/data/mail_template.xml

@ -7,7 +7,8 @@
<field name="name">Shift Non-attendance</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="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="lang">${object.worker_id.lang}</field>
<field name="body_html"><![CDATA[
@ -100,7 +101,7 @@
<record id="email_template_non_validated_sheet" model="mail.template">
<field name="name">Non-validated sheet</field>
<field name="subject">[${object.day}] Non-validated sheet ${object.time_slot}</field>
<field name="subject">[${object.day}] Non-validated sheet ${object.time_slot} </field>
<field name="model_id" ref="model_beesdoo_shift_sheet"/>
<field name="auto_delete" eval="True"/>
<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="value">False</field>
</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="value">15</field>
</record>

3
beesdoo_shift_attendance/demo/users.xml

@ -34,7 +34,8 @@
<field name="partner_id" ref="beesdoo_shift_partner_2_demo"/>
<field name="login">permanent</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>
</odoo>

14
beesdoo_shift_attendance/security/group.xml

@ -1,15 +1,19 @@
<odoo>
<record id="group_shift_attendance_sheet" model="res.groups">
<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 id="group_shift_attendance_sheet_validation" model="res.groups">
<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="users" eval="[(6, 0, [ref('base.user_root')])]" />
<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')])]"/>
</record>
<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>
</odoo>

87
beesdoo_shift_attendance/views/attendance_sheet.xml

@ -7,26 +7,24 @@
<field name="model">beesdoo.shift.sheet</field>
<field name="arch" type="xml">
<search>
<field name="day" />
<field name="validated_by" />
<field name="day"/>
<field name="validated_by"/>
<filter string="Annotated (unread)"
name="annotated"
domain="[('is_annotated', '=', True),
('is_read', '=', False)]" />
domain="[('is_annotated', '=', True), ('is_read', '=', False)]"/>
<filter string="Annotated (read)"
name="annotated_read"
domain="[('is_annotated', '=', True),
('is_read', '=', True)]" />
<separator />
domain="[('is_annotated', '=', True), ('is_read', '=', True)]"/>
<separator/>
<filter string="Archived"
name="archived"
domain="[('active', '=', False)]" />
domain="[('active', '=', False)]"/>
<group expand="1" string="Group By">
<filter string="Day" name="gb_day"
context="{'group_by' : 'start_time:day'}" />
context="{'group_by' : 'start_time:day'}"/>
<filter string="Feedback on number of workers"
name="gb_worker_nb_feedback"
context="{'group_by' : 'worker_nb_feedback'}" />
context="{'group_by' : 'worker_nb_feedback'}"/>
</group>
</search>
</field>
@ -39,12 +37,15 @@
<tree create="false"
decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] "
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="working_mode" />
<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="replaced_id" readonly="True"/>
<field name="state" readonly="True" />
<field name="state" readonly="True"/>
</tree>
</field>
</record>
@ -57,15 +58,15 @@
<tree decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] "
decoration-success="state == 'done'">
<field name="task_type_id"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }"/>
<field name="worker_id"
domain="[
('eater', '=', 'worker_eater'),
('working_mode', 'in', ('regular', 'irregular')),
('state', 'not in', ('unsubscribed', 'resigning')),
]"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="working_mode" />
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }"/>
<field name="working_mode"/>
<field name="is_compensation"
attrs="{'invisible':
[('working_mode','=','irregular')]}"/>
@ -81,14 +82,16 @@
<field name="arch" type="xml">
<form readonly="True">
<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="working_mode" />
<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="replaced_id"
attrs="{'invisible':
[('working_mode','=','irregular')]}"
options="{'no_create': True, 'no_create_edit':True}"/>
<field name="state" />
<field name="state"/>
</group>
</form>
</field>
@ -99,18 +102,18 @@
<field name="name">Added Shifts Form</field>
<field name="model">beesdoo.shift.sheet.added</field>
<field name="arch" type="xml">
<form readonly="True" >
<form readonly="True">
<group>
<field name="task_type_id"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }"/>
<field name="worker_id"
domain="[
('eater', '=', 'worker_eater'),
('working_mode', 'in', ('regular', 'irregular')),
('state', 'not in', ('unsubscribed', 'resigning')),
]"
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }" />
<field name="working_mode" />
options="{'no_open': True, 'no_create': True, 'no_create_edit':True }"/>
<field name="working_mode"/>
<field name="is_compensation"
attrs="{'invisible':
[('working_mode','=','irregular')]}"/>
@ -126,15 +129,16 @@
<field name="name">Attendance Sheet List</field>
<field name="model">beesdoo.shift.sheet</field>
<field name="arch" type="xml">
<tree create="false" delete="false" decoration-danger="state == 'not_validated'">
<field name="week" />
<field name="day" />
<field name="time_slot" />
<tree create="false" delete="false"
decoration-danger="state == 'not_validated'">
<field name="week"/>
<field name="day"/>
<field name="time_slot"/>
<field name="max_worker_no" type="char"/>
<field name="state" />
<field name="validated_by" />
<field name="state"/>
<field name="validated_by"/>
<field name="attended_worker_no" type="char"/>
<field name="is_annotated" />
<field name="is_annotated"/>
</tree>
</field>
</record>
@ -168,22 +172,23 @@
groups="beesdoo_shift.group_shift_attendance"
class="oe_stat_button"
icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<separator string="Expected Shifts"/>
<field name="expected_shift_ids" />
<field name="expected_shift_ids"/>
<separator string="Added Shifts"/>
<field name="added_shift_ids" />
<field name="added_shift_ids"/>
<group>
<field name="max_worker_no" />
<field name="max_worker_no"/>
</group>
<group string="Feedback"
groups="beesdoo_shift.group_shift_attendance">
<field name="attended_worker_no" />
<field name="notes" />
<field name="feedback" />
<field name="worker_nb_feedback" />
<field name="attended_worker_no"/>
<field name="notes"/>
<field name="feedback"/>
<field name="worker_nb_feedback"/>
<field name="validated_by" readonly="True"/>
</group>
</sheet>

42
beesdoo_shift_attendance/views/res_config_settings_view.xml

@ -7,13 +7,18 @@
<data>
<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="priority" eval="50"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<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"/>
<h2>Attendance Sheets</h2>
<div class="row mt16 o_settings_container">
@ -22,9 +27,11 @@
<field name="card_support"/>
</div>
<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">
If not checked, user credentials are asked.
If not checked, user credentials are
asked.
</div>
</div>
</div>
@ -32,14 +39,20 @@
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<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">
Generate attendance sheets before shifts start.
</div>
<div class="content-group">
<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>
@ -48,14 +61,20 @@
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<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">
For attendance sheets automatic pre-filling.
</div>
<div class="content-group">
<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>
@ -67,7 +86,8 @@
</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="res_model">beesdoo.shift.generate_missing_attendance_sheets</field>
<field name="view_mode">form</field>

12
beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.xml

@ -5,10 +5,11 @@
<field name="arch" type="xml">
<form>
<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>
<field name="date_start" />
<field name="date_end" />
<field name="date_start"/>
<field name="date_end"/>
</group>
</sheet>
<footer>
@ -22,9 +23,10 @@
</field>
</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"
view_mode="form" target="new" />
view_mode="form" target="new"/>
<menuitem id="menu_missing_attendance_sheets"
name="Generate missing past attendance sheets"

8
beesdoo_shift_attendance/wizard/validate_attendance_sheet.xml

@ -19,13 +19,13 @@
<group string="Login"
attrs="{'invisible': [('card_support', '=', True)]}"
>
<field name="login" />
<field name="login"/>
<field name="password" password="True"/>
</group>
<group string="Scan your card"
attrs="{'invisible': [('card_support', '=', False)]}"
>
<field name="barcode" />
<field name="barcode"/>
</group>
<field name="warning_regular_workers"
readonly="1"
@ -39,8 +39,8 @@
class="oe_highlight"
/>
<button type="object" name="save"
string="Save" />
<button special="cancel" string="Cancel" />
string="Save"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>

3
beesdoo_stock/views/stock_view.xml

@ -6,7 +6,8 @@
<field name="inherit_id" ref="stock.view_picking_form"></field>
<field name="arch" type="xml">
<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>
</field>
</record>

2
beesdoo_stock_coverage/data/cron.xml

@ -9,7 +9,7 @@
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="doall" eval="False"/>
<field name="state">code</field>
<field name="model_id" ref="product.model_product_template"/>
<field name="code">model.cron_compute_stock_coverage()</field>

2
beesdoo_website_eater/views/beesdoo_website_eater_templates.xml

@ -14,7 +14,7 @@
<xpath expr="//div[@class='o_portal_my_details']" position="after">
<div class="o_my_details_eater mt-2">
<h4 class="page-header">Your Eaters</h4>
<hr class="mt-1 mb-0" />
<hr class="mt-1 mb-0"/>
<p>
<ul t-if="eaters">
<li t-foreach="eaters" t-as="eater">

3
beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml

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

3
beesdoo_website_shift/data/res_config_data.xml

@ -5,7 +5,8 @@
-->
<odoo>
<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="value">28</field>
</record>

248
beesdoo_website_shift/views/my_shift_website_templates.xml

@ -6,9 +6,11 @@
<odoo>
<!-- 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">
<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>
</template>
@ -118,7 +120,9 @@
</h2>
<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.
</div>
@ -126,8 +130,10 @@
<div t-att-class="'card mb-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class">
<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>
<t t-call="beesdoo_website_shift.shift_status_label">
<t t-set="label_css" t-value="'pull-right'"/>
@ -151,27 +157,35 @@
<!-- Super Cooperator info modal -->
<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">
<div class="modal-dialog" role="document">
<div class="modal-content">
<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>
</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"/>
</h4>
</div>
<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>
<a t-att-href="'mailto:%s' % shift.super_coop_id.email">
<t t-esc="shift.super_coop_id.email"/>
</a>
</div>
<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>
@ -179,7 +193,8 @@
</t>
<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>
</template>
@ -196,8 +211,10 @@
<div t-att-class="'card mb-4 %s' % highlight_class">
<div t-att-class="'card-header %s clearfix' % highlight_header_class">
<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>
<t t-call="beesdoo_website_shift.shift_status_label">
<t t-set="label_css" t-value="'pull-right'"/>
@ -210,7 +227,8 @@
</t>
<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>
</template>
@ -221,20 +239,24 @@
>
<t t-foreach="shift_templates" t-as="shift_count_subscribed">
<t t-set="shift" t-value="shift_count_subscribed[0]" />
<t t-set="count" t-value="shift_count_subscribed[1]" />
<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="highlight_class" t-value="'panel-warning' if not has_enough_workers else 'panel-default'"/>
<t t-set="shift" t-value="shift_count_subscribed[0]"/>
<t t-set="count" t-value="shift_count_subscribed[1]"/>
<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="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-header %s clearfix' % highlight_header_class">
<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 class="badge badge-secondary pull-right"
t-if="count > 0">
<t t-esc="count"/> space(s)
<t t-esc="count"/>
space(s)
</div>
<div class="badge badge-secondary pull-right"
t-if="count == 0">
@ -262,29 +284,40 @@
<!-- Subscribe check -->
<t t-foreach="shift_templates" t-as="shift_count_subscribed">
<t t-set="shift" t-value="shift_count_subscribed[0]" />
<t t-set="count" t-value="shift_count_subscribed[1]" />
<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"
<t t-set="shift" t-value="shift_count_subscribed[0]"/>
<t t-set="count" t-value="shift_count_subscribed[1]"/>
<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"
t-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id">
<div class="modal-dialog" role="document">
<div class="modal-content">
<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>
</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
</h4>
</div>
<div class="modal-body">
<span t-field="shift.start_time"/> -
<span t-field="shift.end_time" t-options='{"format": "HH:mm"}'/><br/>
<t t-esc="shift.task_type_id.name"/><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 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"
t-if="irregular_enable_sign_up"
t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)">
@ -313,7 +346,11 @@
id="help_text_common"
name="Help Text Common">
<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>
<p>
@ -322,7 +359,8 @@
<p>
<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>
</template>
@ -331,31 +369,47 @@
name="Help Text for Regular Worker">
<p class="h_reg_alert">
<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 class="h_reg_suspended">
<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 class="h_reg_autoextension">
<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.
If you don't do your compensation shifts, you'll be suspended.
</p>
<p class="h_reg_unsubscribed">
<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>
</template>
@ -364,31 +418,43 @@
name="Help Text for Irregular Worker">
<p class="h_irreg_alert">
<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.
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 class="h_irreg_suspended">
<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.
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 class="h_irreg_autoextension">
<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.
If you don't do your compensation shifts, you'll be suspended.
</p>
<p class="h_irreg_unsubscribed">
<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.
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>
</template>
@ -441,7 +507,8 @@
<div class="col">
<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>
@ -476,7 +543,8 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<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"/>
</p>
@ -522,7 +590,8 @@
<div class="col-12 col-lg-8 m-auto">
<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>
@ -556,22 +625,28 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<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"/>
</p>
<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"/>
</p>
<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"/>
</p>
<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"/>
</p>
@ -621,27 +696,34 @@
<t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
<p>
<label class="font-weight-bold">Shift in Advance:</label>
<label class="font-weight-bold">Shift in Advance:
</label>
<t t-esc="status.sr"/>
</p>
<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"/>
</p>
<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"/>
</p>
<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"/>
</p>
<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"/>
</p>
@ -652,18 +734,24 @@
<div t-if="back_from_subscription"
role="alert"
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>
</button>
<t t-if="success">
<strong>Success!</strong> Your subscription has succeded.
<strong>Success!</strong>
Your subscription has succeded.
</t>
<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.
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>
</div>
@ -676,8 +764,12 @@
<div class="row">
<div class="col-12 col-md-6 text-justify">
<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.
</p>
</div>

64
beesdoo_website_shift/views/res_config_views.xml

@ -7,51 +7,67 @@
<record id="view_website_shift_config_irregular" model="ir.ui.view">
<field name="name">Website Shift Settings Irregular Worker</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website.res_config_settings_view_form" />
<field name="inherit_id" ref="website.res_config_settings_view_form"/>
<field name="arch" type="xml">
<div id="webmaster_settings" position="after">
<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">
<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">
<field name="irregular_shift_limit"/>
</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">
<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">
<field name="highlight_rule_pc"/>
</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">
<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">
<field name="hide_rule"/>
</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">
<field name="irregular_enable_sign_up"/>
</div>
<div class="o_setting_right_pane">
<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 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">
<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">
<field name="irregular_past_shift_limit"/>
</div>
@ -59,29 +75,39 @@
</div>
</div>
<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">
<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">
<field name="regular_past_shift_limit"/>
</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">
<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">
<field name="regular_next_shift_limit"/>
</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">
<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">
<field name="regular_highlight_rule"/>
</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-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-header %s clearfix' % highlight_header_class">
<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='float_to_time(template.start_time)' /> -
<t t-esc='float_to_time(template.start_time)'/>
-
<t t-esc='float_to_time(template.end_time)'/>
</div>
<div class="badge badge-secondary pull-right"
t-if="template.remaining_worker > 0">
<t t-esc="template.remaining_worker"/> space(s)
<t t-esc="template.remaining_worker"/>
space(s)
</div>
<div class="badge badge-secondary pull-right"
t-if="template.remaining_worker == 0">

45
beesdoo_worker_status/demo/tasks.xml

@ -5,42 +5,57 @@
-->
<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="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="end_time">9.5</field>
<field name="duration">2.5</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 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="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="end_time">14.5</field>
<field name="duration">2.5</field>
<field name="worker_nb">9</field>
<!-- 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 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="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="end_time">9.5</field>
<field name="duration">2.5</field>
<field name="worker_nb">7</field>
<!-- 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>
</odoo>

3
macavrac_base/views/res_partner.xml

@ -9,7 +9,8 @@
<attribute name="autofocus">0</attribute>
</xpath>
<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>
<field name="date_stamp"/>
<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="arch" type="xml">
<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>
</field>
</record>

Loading…
Cancel
Save