Browse Source

[REF] format xml files

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

40
beesdoo_account/views/account_invoice.xml

@ -1,23 +1,23 @@
<odoo>
<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="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>
</field>
</field>
</record>
<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="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>
</field>
</field>
</record>
<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="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>
</field>
</field>
</record>
<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="arch" type="xml">
<field name="date_invoice" position="attributes">
<attribute name="required">True</attribute>
</field>
</field>
</record>
</odoo>

38
beesdoo_base/demo/cooperators.xml

@ -84,51 +84,51 @@
<field name="country_id" ref="base.be"/>
</record>
<record id="member_card_1_demo" model="member.card">
<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>

96
beesdoo_base/report/beescard.xml

@ -1,8 +1,8 @@
<odoo>
<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" />
report_type="qweb-html" file="beesdoo_base.beescard_template_cm"
name="beesdoo_base.beescard_template_cm"/>
<!-- Use paper format a4 low margin -->
@ -35,70 +35,74 @@
<t t-foreach="docs" t-as="partner">
<table
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
<tr>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
<tr>
<td></td>
<td
style="width: 4.98cm;vertical-align:bottom;height: 6.87cm;">
style="width: 4.98cm;vertical-align:bottom;height: 6.87cm;">
<div
style="padding-top:0.2cm;padding-left:0.1cm;padding-bottom:0.2cm;">
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" />
t-att-src="'data:image/png;base64,' + partner.image"
style="width:4.7cm;height:6.4cm"/>
</div>
</td>
<td
style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;">
style="vertical-align:top;width:7.72cm;height: 6.87cm;position: relative;">
<p style="text-align: left;padding-top: 0.2cm;font-size: 1.2em;">
<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" />
t-raw="'[' + (partner.parent_eater_id.name[:60] or '') + ']'"
style="font-family:Roboto-Regular"/>
</t>
</p>
<div style="position: absolute;bottom: 0;">
<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" />
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"/>
</div>
<div
style="padding-top:0.2cm;padding-bottom:0.2cm;">
style="padding-top:0.2cm;padding-bottom:0.2cm;">
<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" />
src="/beesdoo_base/static/src/img/redline.png"
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" />
src="/beesdoo_base/static/src/img/blueline.png"
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>
@ -119,33 +124,33 @@
</tr>
<tr>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
</table>
<table
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
style="width: 14.02cm;height: 9.39cm;table-layout:fixed;display: inline-block;">
<tr>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-bottom: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
</tr>
<tr>
<td></td>
<td style="width: 12.7cm;height: 6.87cm;">
<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" />
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"/>
</td>
<td></td>
</tr>
@ -153,22 +158,23 @@
<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>
</tr>
<tr>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
<td
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
style="border-left: 1px solid black;border-right: 1px solid black;"
colspan="2"></td>
<td
style="border-top: 1px solid black;width: 0.66cm;height: 0.66cm;"></td>
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>

48
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'))]}">
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}" />
options="{'no_create': 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,

82
beesdoo_base/wizard/views/member_card.xml

@ -1,54 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- New card generation wizard -->
<!-- New card generation wizard -->
<record id="MemberCard Wizard" model="ir.ui.view">
<field name="name">New MemberCard Wizard</field>
<field name="model">membercard.new.wizard</field>
<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>
</record>
<record id="printing_membercard_request_wizard" model="ir.ui.view">
<record id="printing_membercard_request_wizard" model="ir.ui.view">
<field name="name">Request Membercard Printing Wizard</field>
<field name="model">membercard.requestprinting.wizard</field>
<field name="arch" type="xml">
<form>
<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" />
</footer>
</form>
<form>
<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"/>
</footer>
</form>
</field>
</record>
<act_window name="Request BEES card printing"
res_model="membercard.requestprinting.wizard"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="beesdoo_base_action_request_membercard_printing"
res_model="membercard.requestprinting.wizard"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="beesdoo_base_action_request_membercard_printing"
/>
@ -57,26 +57,26 @@
<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" />
</footer>
<button
type="object"
name="set_as_printed"
string="Set as Printed"
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window name="Set BEES card as printed"
res_model="membercard.set_as_printed.wizard"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="beesdoo_base_action_set_membercard_as_printed"
res_model="membercard.set_as_printed.wizard"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="beesdoo_base_action_set_membercard_as_printed"
/>
</odoo>

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>

42
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 -->
@ -35,10 +35,10 @@
<field name="share_number">2</field>
<field name="effective_date">2020-01-01</field>
<field name="partner_id"
ref="beesdoo_base.res_partner_cooperator_1_demo"/>
ref="beesdoo_base.res_partner_cooperator_1_demo"/>
</record>
<record id="beesdoo_base.res_partner_cooperator_1_demo"
model="res.partner">
model="res.partner">
<field name="cooperator" eval="True"/>
<field name="member" eval="True"/>
<field name="share_ids" eval="[(4, ref('shareline_coop_1'))]"/>
@ -50,10 +50,10 @@
<field name="share_number">4</field>
<field name="effective_date">2020-01-01</field>
<field name="partner_id"
ref="beesdoo_base.res_partner_cooperator_2_demo"/>
ref="beesdoo_base.res_partner_cooperator_2_demo"/>
</record>
<record id="beesdoo_base.res_partner_cooperator_2_demo"
model="res.partner">
model="res.partner">
<field name="cooperator" eval="True"/>
<field name="member" eval="True"/>
<field name="share_ids" eval="[(4, ref('shareline_coop_2'))]"/>
@ -65,10 +65,10 @@
<field name="share_number">6</field>
<field name="effective_date">2020-01-01</field>
<field name="partner_id"
ref="beesdoo_base.res_partner_cooperator_3_demo"/>
ref="beesdoo_base.res_partner_cooperator_3_demo"/>
</record>
<record id="beesdoo_base.res_partner_cooperator_3_demo"
model="res.partner">
model="res.partner">
<field name="cooperator" eval="True"/>
<field name="member" eval="True"/>
<field name="share_ids" eval="[(4, ref('shareline_coop_3'))]"/>

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"/>

43
beesdoo_easy_my_coop/views/subscription_templates.xml

@ -4,25 +4,28 @@
<odoo>
<template id="beesdoo_easy_my_coop.becomecooperator"
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 class="col-md-9 col-sm-8">
<div class="checkbox">
<label for="info_session_confirmed">
<input type="checkbox"
name="info_session_confirmed"
t-att="{'required': 'required'} if info_session_required else {}"
t-attf-value="#{data_policy_approved or ''}"/>
<t t-raw="info_session_text"/>
</label>
</div>
</div>
</div>
</xpath>
</template>
<template id="beesdoo_easy_my_coop.becomecooperator"
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 class="col-md-9 col-sm-8">
<div class="checkbox">
<label for="info_session_confirmed">
<input type="checkbox"
name="info_session_confirmed"
t-att="{'required': 'required'} if info_session_required else {}"
t-attf-value="#{data_policy_approved or ''}"/>
<t t-raw="info_session_text"/>
</label>
</div>
</div>
</div>
</xpath>
</template>
</odoo>

20
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"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/>
<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>

34
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,22 +18,22 @@
<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>
</t>
<t t-extend="ClientListScreenWidget">
<t t-jquery='.new-customer' t-operation='replace'>
</t>
<t t-jquery='.new-customer' t-operation='replace'>
</t>
<t t-jquery=".client-list" t-operation="replace">
@ -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>

5
beesdoo_pos/views/beesdoo_pos.xml

@ -2,8 +2,9 @@
<template id="assets" inherit_id="point_of_sale.assets">
<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" />
src="/beesdoo_pos/static/src/js/beesdoo.js"></script>
<link rel='stylesheet'
href="/beesdoo_pos/static/src/css/beesdoo.css"/>
</xpath>
</template>
</odoo>

20
beesdoo_product/data/barcode_rule.xml

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record model="barcode.rule" id="beesdoo_product_barcode_rule">
<field name="name">Beescoop Product Barcodes</field>
<field name="barcode_nomenclature_id">1</field>
<field name="type">product</field>
<field name="pattern">043</field>
<field name="sequence">45</field>
<field name="encoding">ean13</field>
</record>
</data>
<data noupdate="1">
<record model="barcode.rule" id="beesdoo_product_barcode_rule">
<field name="name">Beescoop Product Barcodes</field>
<field name="barcode_nomenclature_id">1</field>
<field name="type">product</field>
<field name="pattern">043</field>
<field name="sequence">45</field>
<field name="encoding">ean13</field>
</record>
</data>
</odoo>

132
beesdoo_product/data/product_label.xml

@ -1,69 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record model="beesdoo.product.label" id="eco_green">
<field name="name">Label Bio ou Confiance</field>
<field name="type">eco</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="eco_orange">
<field name="name">Agriculture raisonnée</field>
<field name="type">eco</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="eco_red">
<field name="name">Conventionnel</field>
<field name="type">eco</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="local_green">
<field name="name">Belgique</field>
<field name="type">local</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="local_orange">
<field name="name">Europe</field>
<field name="type">local</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="local_red">
<field name="name">Monde</field>
<field name="type">local</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="fair_green">
<field name="name">Label par tiers</field>
<field name="type">fair</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="fair_orange">
<field name="name">Préserve l’intérêt</field>
<field name="type">fair</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="fair_red">
<field name="name">Aucune garantie</field>
<field name="type">fair</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="delivery_green">
<field name="name">Intermédiaire coopératif</field>
<field name="type">delivery</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="delivery_orange">
<field name="name">Grossiste biologique</field>
<field name="type">delivery</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="delivery_red">
<field name="name">Grossiste industriel</field>
<field name="type">delivery</field>
<field name="color_code">#ff4000</field>
</record>
<record id="consignes_group_tax" model="account.tax.group">
<field name="name">Consignes</field>
<field name="sequence" eval="10" />
</record>
</data>
<data noupdate="1">
<record model="beesdoo.product.label" id="eco_green">
<field name="name">Label Bio ou Confiance</field>
<field name="type">eco</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="eco_orange">
<field name="name">Agriculture raisonnée</field>
<field name="type">eco</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="eco_red">
<field name="name">Conventionnel</field>
<field name="type">eco</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="local_green">
<field name="name">Belgique</field>
<field name="type">local</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="local_orange">
<field name="name">Europe</field>
<field name="type">local</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="local_red">
<field name="name">Monde</field>
<field name="type">local</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="fair_green">
<field name="name">Label par tiers</field>
<field name="type">fair</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="fair_orange">
<field name="name">Préserve l’intérêt</field>
<field name="type">fair</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="fair_red">
<field name="name">Aucune garantie</field>
<field name="type">fair</field>
<field name="color_code">#ff4000</field>
</record>
<record model="beesdoo.product.label" id="delivery_green">
<field name="name">Intermédiaire coopératif</field>
<field name="type">delivery</field>
<field name="color_code">#40ff00</field>
</record>
<record model="beesdoo.product.label" id="delivery_orange">
<field name="name">Grossiste biologique</field>
<field name="type">delivery</field>
<field name="color_code">#ffa200</field>
</record>
<record model="beesdoo.product.label" id="delivery_red">
<field name="name">Grossiste industriel</field>
<field name="type">delivery</field>
<field name="color_code">#ff4000</field>
</record>
<record id="consignes_group_tax" model="account.tax.group">
<field name="name">Consignes</field>
<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>

115
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>
@ -18,21 +21,21 @@
<attribute name="invisible">1</attribute>
</field>
<field name="property_account_creditor_price_difference"
position="attributes">
position="attributes">
<attribute name="invisible">1</attribute>
</field>
<xpath expr="//group[@name='inventory']/.." position="after">
<page string="Label">
<group>
<group name="label">
<page string="Label">
<group>
<group name="label">
<field name="total_with_vat"/>
<field name="display_weight"/>
<field name="display_unit"/>
<field name="default_reference_unit"/>
<field name="total_with_vat_by_unit" />
<field name="total_deposit" />
</group>
<group>
<field name="total_with_vat_by_unit"/>
<field name="total_deposit"/>
</group>
<group>
<field name="main_seller_id"/>
<field name="eco_label"/>
<field name="local_label"/>
@ -40,36 +43,38 @@
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
</group>
</group>
<group>
<field name="note" />
</group>
</page>
<page string="Scale labels" attrs="{'invisible':[('to_weight','=',False)]}">
<group>
<group name="scale_label">
<field name="deadline_for_sale"/>
<field name="deadline_for_consumption"/>
<field name="ingredients"/>
<field name="scale_label_info_1"/>
<field name="scale_label_info_2"/>
</group>
<group>
<field name="scale_sale_unit"/>
<field name="scale_category" widget="selection"/>
<field name="scale_category_code"/>
</group>
</group>
</page>
</xpath>
</group>
</group>
<group>
<field name="note"/>
</group>
</page>
<page string="Scale labels"
attrs="{'invisible':[('to_weight','=',False)]}">
<group>
<group name="scale_label">
<field name="deadline_for_sale"/>
<field name="deadline_for_consumption"/>
<field name="ingredients"/>
<field name="scale_label_info_1"/>
<field name="scale_label_info_2"/>
</group>
<group>
<field name="scale_sale_unit"/>
<field name="scale_category" widget="selection"/>
<field name="scale_category_code"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
<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"/>
@ -163,9 +169,9 @@
<field name="model">beesdoo.scale.category</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="code"/>
</tree>
<field name="name"/>
<field name="code"/>
</tree>
</field>
</record>
@ -175,8 +181,8 @@
<field name="arch" type="xml">
<form>
<group>
<field name="name"/>
<field name="code"/>
<field name="name"/>
<field name="code"/>
</group>
</form>
</field>
@ -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>

72
beesdoo_product/wizard/views/label_printing_utils.xml

@ -4,52 +4,52 @@
<field name="name">Request Label Printing Wizard</field>
<field name="model">label.printing.wizard</field>
<field name="arch" type="xml">
<form>
<field name="product_ids" />
<footer>
<button
type="object"
name="request_printing"
string="Request label printing"
class="oe_highlight" />
<button special="cancel" string="Cancel" />
</footer>
</form>
<form>
<field name="product_ids"/>
<footer>
<button
type="object"
name="request_printing"
string="Request label printing"
class="oe_highlight"/>
<button special="cancel" string="Cancel"/>
</footer>
</form>
</field>
</record>
<act_window name="Request label printing"
res_model="label.printing.wizard"
src_model="product.template"
view_mode="form"
target="new"
view_id="printing_label_request_wizard"
key2="client_action_multi"
id="beesdoo_product_action_request_label_printing"
res_model="label.printing.wizard"
src_model="product.template"
view_mode="form"
target="new"
view_id="printing_label_request_wizard"
key2="client_action_multi"
id="beesdoo_product_action_request_label_printing"
/>
<record id="set_label_as_printed_wizard" model="ir.ui.view">
<field name="name">Request Label Printing Wizard</field>
<field name="model">label.printing.wizard</field>
<field name="arch" type="xml">
<form>
<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" />
</footer>
</form>
<form>
<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"/>
</footer>
</form>
</field>
</record>
<act_window name="Set label as printed"
res_model="label.printing.wizard"
src_model="product.template"
view_mode="form"
view_id="set_label_as_printed_wizard"
target="new"
key2="client_action_multi"
id="beesdoo_product_action_set_label_as_printed"
res_model="label.printing.wizard"
src_model="product.template"
view_mode="form"
view_id="set_label_as_printed_wizard"
target="new"
key2="client_action_multi"
id="beesdoo_product_action_set_label_as_printed"
/>
</odoo>

12
beesdoo_product_usability/views/beesdoo_product.xml

@ -24,16 +24,18 @@
</field>
</record>
<record id="purchase.product_normal_action_puchased" model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
<record id="purchase.product_normal_action_puchased"
model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
</record>
<record id="product.product_template_action" model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
<field name="view_mode">tree,form,kanban</field>
</record>
<record id="stock.product_template_action_product" model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
<record id="stock.product_template_action_product"
model="ir.actions.act_window">
<field name="view_mode">tree,form,kanban</field>
</record>

24
beesdoo_purchase/report/report_purchaseorder.xml

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_purchaseorder_document" inherit_id="purchase.report_purchaseorder_document" name="beesdoo purchaseorder">
<div t-if="o.date_order" position="after">
<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">
<strong>Your Referent:</strong>
<div t-field="o.create_uid"
t-options='{"widget": "contact", "fields": ["name", "phone", "mobile"], "no_marker": true, "phone_icons": true}'/>
</div>
<div t-if="o.create_uid.name" class="col-xs-3">
<strong>Your Referent:</strong>
<div t-field="o.create_uid"
t-options='{"widget": "contact", "fields": ["name", "phone", "mobile"], "no_marker": true, "phone_icons": true}'/>
</div>
</div>
</template>
</data>
</div>
</template>
</data>
</odoo>

17
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="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,11 +20,11 @@
<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"/>
</field>
<field name="supervisor_id"/>
</field>
</field>
</record>

38
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="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="nextcall"
eval="datetime.now() + timedelta((6 - datetime.now().weekday()) % 7)"
/>
<field name="active" eval="False" />
<field name="name">Send weekly shift summary</field>
<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="nextcall"
eval="datetime.now() + timedelta((6 - datetime.now().weekday()) % 7)"
/>
<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>

2
beesdoo_shift/data/system_parameter.xml

@ -19,7 +19,7 @@
<field name="key">last_planning_seq</field>
<field name="value">0</field>
</record>
<record id="next_planning_date" model="ir.config_parameter">
<record id="next_planning_date" model="ir.config_parameter">
<field name="key">next_planning_date</field>
<field name="value">1970-01-01</field>
</record>

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>

52
beesdoo_shift/security/group.xml

@ -1,28 +1,30 @@
<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"/>
</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="implied_ids" eval="[(4, ref('group_shift_attendance'))]"/>
</record>
<record id="group_planning_management" model="res.groups">
<field name="name">Planning Management</field>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_management'))]"/>
</record>
<record id="group_cooperative_admin" model="res.groups">
<field name="name">Cooperative Admin</field>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_planning_management'))]" />
<field name="users"
eval="[(4, ref('base.user_root')),
<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"/>
</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="implied_ids" eval="[(4, ref('group_shift_attendance'))]"/>
</record>
<record id="group_planning_management" model="res.groups">
<field name="name">Planning Management</field>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_management'))]"/>
</record>
<record id="group_cooperative_admin" model="res.groups">
<field name="name">Cooperative Admin</field>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_planning_management'))]"/>
<field name="users"
eval="[(4, ref('base.user_root')),
(4, ref('base.user_admin'))]"/>
</record>
</record>
</odoo>

162
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"
<button name="temporary_exempt" string="Temporary Exemption"
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">
@ -42,24 +54,26 @@
</xpath>
<xpath expr="//notebook" position="inside">
<page string="Worker information"
attrs="{'invisible': [('is_worker', '=', False)]}"
name="work">
attrs="{'invisible': [('is_worker', '=', False)]}"
name="work">
<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>

4
beesdoo_shift/views/exempt_reason.xml

@ -5,11 +5,11 @@
<field name="model">cooperative.exempt.reason</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_exempt_reason">
<record model="ir.actions.act_window" id="action_exempt_reason">
<field name="name">Exempt Reason</field>
<field name="res_model">cooperative.exempt.reason</field>
<field name="view_mode">tree</field>

41
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" />
groups="beesdoo_shift.group_shift_management"
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>

28
beesdoo_shift/views/planning.xml

@ -24,22 +24,22 @@
<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">
<button class="oe_stat_button" type="action"
name="%(action_shift_template)d" icon="fa-book"
string="Shifts Template">
name="%(action_shift_template)d" icon="fa-book"
string="Shifts Template">
</button>
</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>

186
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" />
<filter string="My Team Shift"
name="my_team_shift"
domain="[('super_coop_id', '=', uid)]" />
<filter string="My Shift"
name="my_shift"
domain="[('worker_id.user_ids', 'in', uid)]" />
<separator />
<filter string="Assigned"
name="assigned"
domain="[('worker_id', '!=', False)]" />
<filter string="Unassigned"
name="unassigned"
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'))]" />
<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'))]" />
<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'))]" />
<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'))]" />
<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'))]" />
<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'))]" />
<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'))]" />
<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)]"/>
<filter string="My Shift"
name="my_shift"
domain="[('worker_id.user_ids', 'in', uid)]"/>
<separator/>
<filter string="Assigned"
name="assigned"
domain="[('worker_id', '!=', False)]"/>
<filter string="Unassigned"
name="unassigned"
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'))]"/>
<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'))]"/>
<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'))]"/>
<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'))]"/>
<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'))]"/>
<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'))]"/>
<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'))]"/>
<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>
@ -78,10 +78,10 @@
<field name="model">beesdoo.shift.shift</field>
<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" />
date_stop="end_time" color="task_type_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">
<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>

158
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>
@ -77,10 +80,10 @@
<field name="model">beesdoo.shift.template</field>
<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" />
date_stop="end_date" color="task_type_id">
<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">
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>
@ -173,20 +193,20 @@
<form>
<header>
<button type="action"
name="%(action_generate_shift_template_wizard)d"
string="Generate shift Templates" />
name="%(action_generate_shift_template_wizard)d"
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>

5
beesdoo_shift_attendance/demo/users.xml

@ -27,14 +27,15 @@
<field name="login">generic</field>
<field name="password">demo</field>
<field name="groups_id"
eval="[(4,ref('base.group_user')), (4,ref('beesdoo_shift_attendance.group_shift_attendance_sheet'))]"/>
eval="[(4,ref('base.group_user')), (4,ref('beesdoo_shift_attendance.group_shift_attendance_sheet'))]"/>
</record>
<record id="beesdoo_shift_user_2_demo" model="res.users">
<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>

131
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>
@ -55,17 +56,17 @@
<field name="model">beesdoo.shift.sheet.added</field>
<field name="arch" type="xml">
<tree decoration-danger="state in ['absent_0', 'absent_1', 'absent_2'] "
decoration-success="state == 'done'">
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="[
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="[
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>
@ -200,38 +205,38 @@
<!-- Actions -->
<act_window id="action_sheet_admin_non_validated"
name="Non-validated sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('state','=','not_validated')]"
name="Non-validated sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('state','=','not_validated')]"
/>
<!-- Annotated sheets should display only the both annotated and validated ones-->
<act_window id="action_sheet_admin_annotated"
name="Unread notes"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('is_annotated','=',True),
name="Unread notes"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('is_annotated','=',True),
('is_read','=',False)]"
/>
<act_window id="action_sheet_admin_list"
name="All sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
name="All sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
/>
<act_window id="action_sheet_daily"
name="Daily attendance sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('end_time','&gt;', datetime.datetime.now().replace(hour=00, minute=00, second=10)),
name="Daily attendance sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('end_time','&gt;', datetime.datetime.now().replace(hour=00, minute=00, second=10)),
('start_time','&lt;', datetime.datetime.now().replace(hour=23, minute=59, second=59))]"
/>
<!-- Top menu item -->
<menuitem id="menu_sheet_top"
name="Attendance Sheets"
parent="beesdoo_shift.menu_root"
groups="beesdoo_shift_attendance.group_shift_attendance_sheet"
sequence="1"
name="Attendance Sheets"
parent="beesdoo_shift.menu_root"
groups="beesdoo_shift_attendance.group_shift_attendance_sheet"
sequence="1"
/>
<!-- Menu actions -->

178
beesdoo_shift_attendance/views/res_config_settings_view.xml

@ -4,90 +4,110 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data>
<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="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">
<field name="has_accounting_entries" invisible="1"/>
<h2>Attendance Sheets</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="card_support"/>
</div>
<div class="o_setting_right_pane">
<label for="card_support" string="Scan cards for validation" />
<div class="text-muted">
If not checked, user credentials are asked.
</div>
</div>
</div>
</div>
<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>
<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"/>
</div>
</div>
</div>
</div>
</div>
<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>
<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"/>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">
res.config.settings.view.form.inherit.beesdoo.shift
</field>
</record>
<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">
<field name="has_accounting_entries" invisible="1"/>
<h2>Attendance Sheets</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="card_support"/>
</div>
<div class="o_setting_right_pane">
<label for="card_support"
string="Scan cards for validation"/>
<div class="text-muted">
If not checked, user credentials are
asked.
</div>
</div>
</div>
</div>
<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>
<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"/>
</div>
</div>
</div>
</div>
</div>
<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>
<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"/>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<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>
</record>
<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>
</record>
<record model="ir.actions.act_window" id="action_shift_settings">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'beesdoo_shift'}</field>
</record>
<record model="ir.actions.act_window" id="action_shift_settings">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'beesdoo_shift'}</field>
</record>
<menuitem name="Shift Settings"
id="menu_shift_settings"
parent="beesdoo_shift.menu_configuration_top"
action="action_shift_settings"
groups="beesdoo_shift.group_cooperative_admin"
/>
<menuitem name="Shift Settings"
id="menu_shift_settings"
parent="beesdoo_shift.menu_configuration_top"
action="action_shift_settings"
groups="beesdoo_shift.group_cooperative_admin"
/>
</data>
</data>
</odoo>

20
beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.xml

@ -5,26 +5,28 @@
<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>
<button type="object"
name="generate_missing_attendance_sheets"
string="Generate"
class="oe_highlight"
name="generate_missing_attendance_sheets"
string="Generate"
class="oe_highlight"
/>
</footer>
</form>
</field>
</record>
<act_window id="action_missing_attendance_sheets" name="Generate Missing Sheets"
res_model="beesdoo.shift.generate_missing_attendance_sheets"
view_mode="form" target="new" />
<act_window id="action_missing_attendance_sheets"
name="Generate Missing Sheets"
res_model="beesdoo.shift.generate_missing_attendance_sheets"
view_mode="form" target="new"/>
<menuitem id="menu_missing_attendance_sheets"
name="Generate missing past attendance sheets"

24
beesdoo_shift_attendance/wizard/validate_attendance_sheet.xml

@ -9,23 +9,23 @@
<field name="card_support" invisible="1"/>
<field name="active_sheet" invisible="1"/>
<field name="_barcode_scanned" widget="barcode_handler"/>
<label for="notes"/>
<field name="notes"/>
<label for="feedback"/>
<field name="feedback"/>
<label for="notes"/>
<field name="notes"/>
<label for="feedback"/>
<field name="feedback"/>
<group>
<field name="worker_nb_feedback"/>
</group>
<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)]}"
attrs="{'invisible': [('card_support', '=', False)]}"
>
<field name="barcode" />
<field name="barcode"/>
</group>
<field name="warning_regular_workers"
readonly="1"
@ -34,13 +34,13 @@
</sheet>
<footer>
<button type="object"
name="validate_sheet"
string="Validate"
class="oe_highlight"
name="validate_sheet"
string="Validate"
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>

54
beesdoo_stock_coverage/views/product_template_view.xml

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<group name="traceability" position="after">
<group name="stock_coverage" string="Stock Coverage">
<field name="computation_range"/>
<field name="daily_sales"/>
<field name="range_sales"/>
<field name="stock_coverage"/>
</group>
</group>
</field>
</record>
<record id="product_template_only_form_view" model="ir.ui.view">
<field name="name">product.template.product.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<group name="traceability" position="after">
<group name="stock_coverage" string="Stock Coverage">
<field name="computation_range"/>
<field name="daily_sales"/>
<field name="range_sales"/>
<field name="stock_coverage"/>
</group>
</group>
</field>
</record>
<record id="product_template_tree_view" model="ir.ui.view">
<field name="name">product.template.product.tree</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="virtual_available" position="after">
<field name="range_sales"/>
<field name="daily_sales"/>
<field name="stock_coverage"/>
</field>
</field>
</record>
<record id="product_template_tree_view" model="ir.ui.view">
<field name="name">product.template.product.tree</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<field name="virtual_available" position="after">
<field name="range_sales"/>
<field name="daily_sales"/>
<field name="stock_coverage"/>
</field>
</field>
</record>
</odoo>

46
beesdoo_website_eater/views/beesdoo_website_eater_templates.xml

@ -5,28 +5,28 @@
-->
<odoo>
<!-- Add eater information -->
<template
id="website_eater_details_side"
name="Website Eater Details Side"
priority="50"
inherit_id="portal.portal_layout">
<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" />
<p>
<ul t-if="eaters">
<li t-foreach="eaters" t-as="eater">
<t t-esc="eater.name"/>
</li>
</ul>
<span t-if="not eaters">
You have no eaters
</span>
</p>
</div>
</xpath>
</template>
<!-- Add eater information -->
<template
id="website_eater_details_side"
name="Website Eater Details Side"
priority="50"
inherit_id="portal.portal_layout">
<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"/>
<p>
<ul t-if="eaters">
<li t-foreach="eaters" t-as="eater">
<t t-esc="eater.name"/>
</li>
</ul>
<span t-if="not eaters">
You have no eaters
</span>
</p>
</div>
</xpath>
</template>
</odoo>

37
beesdoo_website_posorder_amount/templates/portal_posorder_amount.xml

@ -5,23 +5,24 @@
-->
<odoo>
<!-- Add pos.order total amount -->
<template
id="total_pos_order_amount"
name="Portal total POS order amount"
priority="40"
inherit_id="portal.portal_layout">
<xpath expr="//div[@class='o_portal_my_details']" position="after">
<div class="o_my_details_eater mt-2">
<h4 class="page-header">Purchases</h4>
<hr class="mt-1 mb-0"/>
<p>
You have purchased a total amount of
<span t-esc="posorder_amount"
t-esc-options='{"widget": "monetary", "display_currency": "company_currency"}'/>.
</p>
</div>
</xpath>
</template>
<!-- Add pos.order total amount -->
<template
id="total_pos_order_amount"
name="Portal total POS order amount"
priority="40"
inherit_id="portal.portal_layout">
<xpath expr="//div[@class='o_portal_my_details']" position="after">
<div class="o_my_details_eater mt-2">
<h4 class="page-header">Purchases</h4>
<hr class="mt-1 mb-0"/>
<p>
You have purchased a total amount of
<span t-esc="posorder_amount"
t-esc-options='{"widget": "monetary", "display_currency": "company_currency"}'/>
.
</p>
</div>
</xpath>
</template>
</odoo>

13
beesdoo_website_shift/data/res_config_data.xml

@ -4,10 +4,11 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data noupdate="1">
<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>
</data>
<data noupdate="1">
<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>
</data>
</odoo>

384
beesdoo_website_shift/views/my_shift_website_templates.xml

@ -6,16 +6,18 @@
<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>
<!-- Reusable templates -->
<template
id="my_shift_title"
name="My Shift Title">
id="my_shift_title"
name="My Shift Title">
<h1>
Your shifts
@ -23,8 +25,8 @@
</template>
<template
id="my_shift_worker_status_title"
name="My Shift Worker Status Title">
id="my_shift_worker_status_title"
name="My Shift Worker Status Title">
<h2>
Worker status
@ -42,8 +44,8 @@
</template>
<template
id="my_shift_worker_status_common"
name="My Shift Worker Status Common">
id="my_shift_worker_status_common"
name="My Shift Worker Status Common">
<p>
<label class="font-weight-bold">Working Mode:</label>
@ -73,36 +75,36 @@
<template
id="shift_status_label"
name="Shift Status Label">
id="shift_status_label"
name="Shift Status Label">
<span t-if="shift.state == 'draft'"
t-attf-class="badge badge-default {{label_css}}">
t-attf-class="badge badge-default {{label_css}}">
<t t-esc="shift.state"/>
</span>
<span t-if="shift.state == 'done'"
t-attf-class="badge badge-success {{label_css}}">
t-attf-class="badge badge-success {{label_css}}">
<t t-esc="shift.state"/>
</span>
<span t-if="shift.state == 'absent_2'"
t-attf-class="badge badge-warning {{label_css}}">
t-attf-class="badge badge-warning {{label_css}}">
<t t-esc="shift.state"/>
</span>
<span t-if="shift.state == 'absent_1'"
t-attf-class="badge badge-info {{label_css}}">
t-attf-class="badge badge-info {{label_css}}">
<t t-esc="shift.state"/>
</span>
<span t-if="shift.state == 'absent_0'"
t-attf-class="badge badge-info {{label_css}}">
t-attf-class="badge badge-info {{label_css}}">
<t t-esc="shift.state"/>
</span>
<span t-if="shift.state == 'cancel'"
t-attf-class="badge badge-danger {{label_css}}">
t-attf-class="badge badge-danger {{label_css}}">
<t t-esc="shift.state"/>
</span>
@ -110,15 +112,17 @@
<template
id="my_shift_next_shifts"
name="My Shift : Next Shifts">
id="my_shift_next_shifts"
name="My Shift : Next Shifts">
<h2>
Your next shifts
</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'"/>
@ -136,12 +142,12 @@
<div class="card-body clearfix">
<t t-esc="shift.task_type_id.name"/>
<button
type="button"
class="btn btn-default btn-sm pull-right"
t-if="shift.super_coop_id.name"
data-toggle="modal"
t-att-data-target="'#super_coop-shift-%s' % shift_index"
>
type="button"
class="btn btn-default btn-sm pull-right"
t-if="shift.super_coop_id.name"
data-toggle="modal"
t-att-data-target="'#super_coop-shift-%s' % shift_index"
>
<span class="fa fa-info" aria-hidden="true"></span>
Super Cooperator Info
</button>
@ -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"
t-att-aria-labelledby="'super_coop-shift-%s-label' % shift_index">
<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,14 +193,15 @@
</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>
<template
id="my_shift_past_shifts"
name="My Shift : Past Shifts">
id="my_shift_past_shifts"
name="My Shift : Past Shifts">
<h2>
Your past shifts
@ -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,50 +227,55 @@
</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>
<template
id="available_shift_irregular_worker"
name="Available Shift for Irregular Worker"
>
id="available_shift_irregular_worker"
name="Available Shift for Irregular Worker"
>
<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-if="count > 0">
<t t-esc="count"/>
space(s)
</div>
<div class="badge badge-secondary pull-right"
t-if="count == 0">
t-if="count == 0">
full
</div>
</div>
<div class="card-body clearfix">
<t t-esc="shift.task_type_id.name"/>
<div class="badge badge-success pull-right"
t-if="is_subscribed">
t-if="is_subscribed">
Subscribed
</div>
<button
type="button"
class="btn btn-default btn-sm pull-right"
data-toggle="modal"
t-att-data-target="'#subscribe-shift-%s' % shift.id"
t-if="irregular_enable_sign_up and not is_subscribed"
>
type="button"
class="btn btn-default btn-sm pull-right"
data-toggle="modal"
t-att-data-target="'#subscribe-shift-%s' % shift.id"
t-if="irregular_enable_sign_up and not is_subscribed"
>
<span class="fa fa-user-plus" aria-hidden="true"></span>
Subscribe
</button>
@ -262,32 +284,43 @@
<!-- 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-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id">
<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)">
t-if="irregular_enable_sign_up"
t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)">
Subscribe
</a>
</div>
@ -302,18 +335,22 @@
<!-- Help Texts -->
<template
id="help_text_title"
name="Help Text Title">
id="help_text_title"
name="Help Text Title">
<h2>
Help
</h2>
</template>
<template
id="help_text_common"
name="Help Text Common">
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,81 +359,110 @@
<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>
<template
id="help_text_regular_worker"
name="Help Text for Regular Worker">
id="help_text_regular_worker"
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>
<template
id="help_text_irregular_worker"
name="Help Text for Irregular Worker">
id="help_text_irregular_worker"
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>
<!-- Shift for non-worker -->
<template
id="my_shift_non_worker"
name="My Shift for Non Worker"
>
id="my_shift_non_worker"
name="My Shift for Non Worker"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -423,9 +489,9 @@
<!-- Shift for new worker -->
<template
id="my_shift_new_worker"
name="My Shift for New Worker"
>
id="my_shift_new_worker"
name="My Shift for New Worker"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -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>
@ -453,9 +520,9 @@
<!-- Shifts Exempted Workers -->
<template
id="my_shift_exempted_worker"
name="My Shifts for Exempted Workers"
>
id="my_shift_exempted_worker"
name="My Shifts for Exempted Workers"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -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>
@ -497,9 +565,9 @@
<!-- Shifts regular worker without shift -->
<template
id="my_shift_regular_worker_without_shift"
name="My Shifts for regular worker without shift"
>
id="my_shift_regular_worker_without_shift"
name="My Shifts for regular worker without shift"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -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>
@ -535,9 +604,9 @@
<!-- Shifts for Regular Workers -->
<template
id="my_shift_regular_worker"
name="My Shifts for Regular Workers"
>
id="my_shift_regular_worker"
name="My Shifts for Regular Workers"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -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>
@ -600,9 +675,9 @@
<!-- Shifts for Irregular Workers -->
<template
id="my_shift_irregular_worker"
name="Shifts for Irregular Workers"
>
id="my_shift_irregular_worker"
name="Shifts for Irregular Workers"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -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>
@ -650,20 +732,26 @@
<div class="col-12 col-lg-8">
<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">
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">
<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>

40
beesdoo_website_shift/views/shift_website_templates.xml

@ -24,8 +24,8 @@
<!-- Help texts -->
<template
id="help_text_public_shift_template_regular_worker"
name="Help text for public available shifts template for irregular worker"
id="help_text_public_shift_template_regular_worker"
name="Help text for public available shifts template for irregular worker"
>
<p class="text-center">
Help text or information text.
@ -34,8 +34,8 @@
<template
id="help_text_public_shift_irregular_worker"
name="Help text for public Available Shifts for Irregular Worker"
id="help_text_public_shift_irregular_worker"
name="Help text for public Available Shifts for Irregular Worker"
>
<p class="text-center">
Help text or information text.
@ -45,8 +45,8 @@
<!-- Public Available Tasks Templates for Regular Workers -->
<template
id="public_shift_template_regular_worker"
name="Available Tasks Templates for Regular Workers"
id="public_shift_template_regular_worker"
name="Available Tasks Templates for Regular Workers"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>
@ -75,30 +75,36 @@
<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-if="template.remaining_worker > 0">
<t t-esc="template.remaining_worker"/>
space(s)
</div>
<div class="badge badge-secondary pull-right"
t-if="template.remaining_worker == 0">
t-if="template.remaining_worker == 0">
full
</div>
</div>
<div class="card-body clearfix">
<t t-esc="template.task_type_id.name"/>
<div class="badge badge-warning pull-right"
t-if="not template.super_coop_id">
t-if="not template.super_coop_id">
Need Super Co-operator
</div>
</div>
@ -117,8 +123,8 @@
<!-- Public Available Shifts for Irregular Workers -->
<template
id="public_shift_irregular_worker"
name="Available Shifts for Irregular Workers"
id="public_shift_irregular_worker"
name="Available Shifts for Irregular Workers"
>
<t t-call="portal.portal_layout">
<t t-set="no_breadcrumbs" t-value="True"/>

16
beesdoo_website_theme/views/assets.xml

@ -1,10 +1,10 @@
<odoo>
<!-- We add the css stylesheet -->
<template id="assets_frontend" name="beesdoo_website_theme_website_assets"
inherit_id="website.assets_frontend">
<xpath expr="." position="inside">
<link rel="stylesheet"
href="/beesdoo_website_theme/static/src/less/beesdoo_website_design.less"/>
</xpath>
</template>
<!-- We add the css stylesheet -->
<template id="assets_frontend" name="beesdoo_website_theme_website_assets"
inherit_id="website.assets_frontend">
<xpath expr="." position="inside">
<link rel="stylesheet"
href="/beesdoo_website_theme/static/src/less/beesdoo_website_design.less"/>
</xpath>
</template>
</odoo>

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>

11
macavrac_base/views/res_partner.xml

@ -5,11 +5,12 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority">99</field>
<field name="arch" type="xml">
<xpath expr="//notebook/page[1]" position="attributes">
<attribute name="autofocus">0</attribute>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="Google Sheet Infos" name="google_sheet" autofocus="autofocus">
<xpath expr="//notebook/page[1]" position="attributes">
<attribute name="autofocus">0</attribute>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="Google Sheet Infos" name="google_sheet"
autofocus="autofocus">
<group>
<field name="date_stamp"/>
<field name="coop_number"/>

34
purchase_order_generator/views/product_template.xml

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="product_template_tree" model="ir.ui.view">
<field name="name">product.template.tree</field>
<field name="model">product.template</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<record id="product_template_tree" model="ir.ui.view">
<field name="name">product.template.tree</field>
<field name="model">product.template</field>
<field eval="6" name="priority"/>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="ref interne"/>
<field name="supplier"/>
<field name="stock_coverage"/>
<field name="virtual_coverage"/>
<field name="categ_id"/>
<field name="qty_available"/>
<field name="expected quantity"/>
</tree>
<tree>
<field name="name"/>
<field name="ref interne"/>
<field name="supplier"/>
<field name="stock_coverage"/>
<field name="virtual_coverage"/>
<field name="categ_id"/>
<field name="qty_available"/>
<field name="expected quantity"/>
</tree>
</field>
</record>
</field>
</record>
</odoo>

21
purchase_order_generator/views/purchase_order.xml

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_purchase_order_form_inherit" model="ir.ui.view">
<field name="name">purchase.order.form.inherit</field>
<field name="model">purchase.order</field>
<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)]}"/>
</xpath>
</field>
</record>
<record id="view_purchase_order_form_inherit" model="ir.ui.view">
<field name="name">purchase.order.form.inherit</field>
<field name="model">purchase.order</field>
<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)]}"/>
</xpath>
</field>
</record>
</odoo>

2
purchase_order_generator/views/purchase_order_generator.xml

@ -107,7 +107,7 @@
<field name="binding_model_id" ref="product.model_product_template"/>
<field name="state">code</field>
<field name="code">
action = model.generate_cpo()
action = model.generate_cpo()
</field>
</record>
</odoo>
Loading…
Cancel
Save