| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="view_pos_preset_form" model="ir.ui.view"> |
| 4 |
<field name="name">pos.preset.form</field> |
| 5 |
<field name="model">pos.preset</field> |
| 6 |
<field name="arch" type="xml"> |
| 7 |
<form string="Preset"> |
| 8 |
<sheet> |
| 9 |
<div class="oe_button_box" name="button_box"> |
| 10 |
<button name="action_open_linked_orders" |
| 11 |
type="object" |
| 12 |
class="oe_stat_button" |
| 13 |
icon="fa-shopping-cart" |
| 14 |
invisible="count_linked_orders == 0"> |
| 15 |
<field string="Order(s)" name="count_linked_orders" widget="statinfo"/> |
| 16 |
</button> |
| 17 |
<button name="action_open_linked_config" |
| 18 |
type="object" |
| 19 |
class="oe_stat_button" |
| 20 |
icon="fa-share-alt" |
| 21 |
invisible="count_linked_config == 0"> |
| 22 |
<field string="PoS Config" name="count_linked_config" widget="statinfo"/> |
| 23 |
</button> |
| 24 |
</div> |
| 25 |
<field name="image_512" widget="image" class="oe_avatar"/> |
| 26 |
<div class="oe_title mb-2"> |
| 27 |
<label for="name"/> |
| 28 |
<h1><field name="name" placeholder="e.g. Dine in"/></h1> |
| 29 |
</div> |
| 30 |
<group class="w-100" name="Presets"> |
| 31 |
<group> |
| 32 |
<field name="pricelist_id" placeholder="Default"/> |
| 33 |
<field name="fiscal_position_id" placeholder="Default"/> |
| 34 |
<field name="use_timing" /> |
| 35 |
|
| 36 |
<label for="resource_calendar_id" string="Schedule based on" class="fw-bold" /> |
| 37 |
<div> |
| 38 |
<field name="resource_calendar_id" readonly="not use_timing" required="use_timing"/> |
| 39 |
</div> |
| 40 |
|
| 41 |
<label for="slots_per_interval" string="Preparation capacity" class="fw-bold" /> |
| 42 |
<div class="o_row"> |
| 43 |
<field name="slots_per_interval" class="text-center" readonly="not use_timing" /> |
| 44 |
<label for="slots_per_interval" string="orders per" /> |
| 45 |
<field name="interval_time" class="text-center" readonly="not use_timing" /> |
| 46 |
<label for="interval_time" string="minutes" /> |
| 47 |
</div> |
| 48 |
</group> |
| 49 |
<group> |
| 50 |
<field name="identification"/> |
| 51 |
<label for="return" string="Return mode"/> |
| 52 |
<div> |
| 53 |
<field id="return" name="is_return" class="oe_inline"/> |
| 54 |
<span invisible="not is_return or pricelist_id" class="oe_inline ps-2 text-info">Tip: add a return pricelist (i.e. 0€)</span> |
| 55 |
</div> |
| 56 |
<field name="color" widget="color_picker"/> |
| 57 |
</group> |
| 58 |
</group> |
| 59 |
<notebook> |
| 60 |
<page string="Schedule" name="resource" invisible="not use_timing or not resource_calendar_id"> |
| 61 |
<field name="attendance_ids" widget="section_one2many" /> |
| 62 |
</page> |
| 63 |
</notebook> |
| 64 |
</sheet> |
| 65 |
</form> |
| 66 |
</field> |
| 67 |
</record> |
| 68 |
|
| 69 |
<record id="view_pos_preset_tree" model="ir.ui.view"> |
| 70 |
<field name="name">pos.preset.list</field> |
| 71 |
<field name="model">pos.preset</field> |
| 72 |
<field name="arch" type="xml"> |
| 73 |
<list string="Presets"> |
| 74 |
<field name="name"/> |
| 75 |
<field name="use_timing"/> |
| 76 |
<field name="identification"/> |
| 77 |
<field name="color" widget="color_picker"/> |
| 78 |
</list> |
| 79 |
</field> |
| 80 |
</record> |
| 81 |
|
| 82 |
<record id="action_pos_preset_form" model="ir.actions.act_window"> |
| 83 |
<field name="name">Presets</field> |
| 84 |
<field name="res_model">pos.preset</field> |
| 85 |
<field name="view_mode">list,form</field> |
| 86 |
<field name="help" type="html"> |
| 87 |
<p class="o_view_nocontent_smiling_face"> |
| 88 |
Add a new preset |
| 89 |
</p> |
| 90 |
</field> |
| 91 |
</record> |
| 92 |
|
| 93 |
<menuitem id="menu_pos_preset" parent="menu_point_config_product" action="action_pos_preset_form" sequence="3" groups="group_pos_preset"/> |
| 94 |
</odoo> |