You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.5 KiB

  1. <odoo>
  2. <record model="ir.ui.view" id="subscribe_coop_wizard_view_form">
  3. <field name="name">Subscribe Cooperator</field>
  4. <field name="model">beesdoo.shift.subscribe</field>
  5. <field name="arch" type="xml">
  6. <form>
  7. <group attrs="{'invisible': [('unsubscribed', '=', False)]}">
  8. <separator
  9. string="Are you sure to unsubscribe this cooperator ?"
  10. colspan="2"/>
  11. <field name="resigning"/>
  12. <field name="unsubscribed" invisible="1"/>
  13. </group>
  14. <group attrs="{'invisible': [('unsubscribed', '=', True)]}">
  15. <field name="cooperator_id"/>
  16. <field name="info_session"/>
  17. <field name="info_session_date"/>
  18. <field name="working_mode"/>
  19. <field name="exempt_reason_id"
  20. attrs="{'invisible':[('working_mode', '!=', 'exempt')]}"/>
  21. <field name="shift_id"
  22. domain="[('remaining_worker', '>', 0)]"
  23. attrs="{'invisible': [('working_mode', '!=', 'regular')]}"/>
  24. <field name="nb_shifts" attrs="{'invisible': True}"/>
  25. <field name="irregular_start_date"
  26. attrs="{'invisible': [('working_mode', '!=', 'irregular')]}"/>
  27. <field name="super"/>
  28. <field name="reset_counter"/>
  29. <field name="reset_compensation_counter"/> <!-- TODO access right -->
  30. </group>
  31. <footer>
  32. <div class="alert alert-danger" role="alert"
  33. attrs="{'invisible': [('nb_shifts', '&lt;', 2)]}">
  34. Current worker has more than one shift, subscribing him
  35. to a new shift will erase all previous shifts.
  36. </div>
  37. <button type="object" name="subscribe"
  38. string="Confirm" class="oe_highlight"
  39. attrs="{'invisible': [('unsubscribed', '=', True)]}"/>
  40. <button type="object" name="unsubscribe"
  41. string="Confirm" class="oe_highlight"
  42. attrs="{'invisible': [('unsubscribed', '=', False)]}"/>
  43. or
  44. <button special="cancel" string="Cancel"/>
  45. </footer>
  46. </form>
  47. </field>
  48. </record>
  49. </odoo>