Odoo modules related to point of sales
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.

103 lines
4.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="restaurant_table_booking_form" model="ir.ui.view">
  4. <field name="name">Booking restaurant.table_booking form</field>
  5. <field name="model">restaurant.table_booking</field>
  6. <field name="arch" type="xml">
  7. <form create="0" edit="0" delete="0">
  8. <sheet>
  9. <group>
  10. <group>
  11. <field name="booking_id" readonly="1"/>
  12. <field name="table_id" options="{'no_open':1, 'no_create':1}"/>
  13. </group>
  14. <group>
  15. <field name="datetime_start"/>
  16. <field name="datetime_stop"/>
  17. <field name="duration"/>
  18. </group>
  19. </group>
  20. </sheet>
  21. </form>
  22. </field>
  23. </record>
  24. <record id="restaurant_table_booking_tree" model="ir.ui.view">
  25. <field name="name">Booking restaurant.table_booking tree</field>
  26. <field name="model">restaurant.table_booking</field>
  27. <field name="arch" type="xml">
  28. <tree create="0" edit="0" delete="0">
  29. <field name="booking_id" options="{'no_create':1}"/>
  30. <field name="table_id" options="{'no_open':1, 'no_create':1}"/>
  31. <field name="datetime_start"/>
  32. <field name="datetime_stop"/>
  33. <field name="duration"/>
  34. </tree>
  35. </field>
  36. </record>
  37. <record id="restaurant_table_booking_gantt" model="ir.ui.view">
  38. <field name="name">Booking restaurant.table_booking gantt</field>
  39. <field name="model">restaurant.table_booking</field>
  40. <field name="arch" type="xml">
  41. <gantt string="Tables bookings" date_start="datetime_start" date_stop="datetime_stop" scales="day,week"
  42. default_scale="day" precision="{'day': 'hour:half', 'week': 'day:half'}" default_group_by="table_id" color="color"
  43. create="true" on_create="pos_restaurant_table_booking.create_new_booking_act_window" cell_create="true" edit="false">
  44. <field name="name"/>
  45. <field name="booking_id"/>
  46. <field name="duration"/>
  47. <field name="count"/>
  48. <templates>
  49. <div t-name="gantt-popover" class="container-fluid">
  50. <div class="row no-gutters">
  51. <div class="col">
  52. <ul class="pl-1 mb-0">
  53. <li><strong>Start : </strong> <span t-esc="userTimezoneStartDate.format('YYYY-MM-DD hh:mm A')"/></li>
  54. <li><strong>Stop : </strong> <span t-esc="userTimezoneStopDate.format('YYYY-MM-DD hh:mm A')"/></li>
  55. <li><strong>Duration : </strong> <span t-field="record.duration" t-options="{'widget':'float_time'}"/> hours</li>
  56. <li><strong>People count : </strong> <span t-field="record.count"/> pers.</li>
  57. </ul>
  58. </div>
  59. </div>
  60. </div>
  61. </templates>
  62. </gantt>
  63. </field>
  64. </record>
  65. <record id="restaurant_table_booking_search" model="ir.ui.view">
  66. <field name="name">Booking restaurant.table_booking search</field>
  67. <field name="model">restaurant.table_booking</field>
  68. <field name="arch" type="xml">
  69. <search>
  70. <field name="name"/>
  71. <field name="table_id"/>
  72. <field name="datetime_start"/>
  73. </search>
  74. </field>
  75. </record>
  76. <record id="restaurant_table_booking_act_window" model="ir.actions.act_window">
  77. <field name="name">Tables bookings</field>
  78. <field name="res_model">restaurant.table_booking</field>
  79. <field name="view_mode">gantt,form</field>
  80. <!-- <field name="context">{'search_default_today':1}</field> -->
  81. <!-- <field name="help" type="html">
  82. <p class="o_view_nocontent_smiling_face">
  83. Prendre une nouvelle réservation.
  84. </p><p>
  85. Une réservation compreend un nom, une date, des horaires et une ou plusieurs tables.
  86. </p>
  87. </field> -->
  88. </record>
  89. <menuitem
  90. id="restaurant_table_booking_menu"
  91. name="Tables bookings"
  92. parent="restaurant_booking_root_menu"
  93. action="restaurant_table_booking_act_window"
  94. sequence="20"
  95. groups="point_of_sale.group_pos_user"/>
  96. </odoo>