| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="pos_config_view_form" model="ir.ui.view"> |
| 5 |
<field name="name">pos.config.form.view</field> |
| 6 |
<field name="model">pos.config</field> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<form string="Point of Sale Configuration"> |
| 9 |
<sheet> |
| 10 |
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/> |
| 11 |
<field name="active" invisible="1"/> |
| 12 |
<field name="company_has_template" invisible="1"/> |
| 13 |
<field name="has_active_session" invisible="1"/> |
| 14 |
<field name="other_devices" invisible="1"/> |
| 15 |
<field name="is_posbox" invisible="1"/> |
| 16 |
<field name="module_pos_hr" invisible="1"/> |
| 17 |
|
| 18 |
<div class="oe_title" id="title"> |
| 19 |
<label for="name"/> |
| 20 |
<h1><field name="name" placeholder="e.g. NYC Shop"/></h1> |
| 21 |
</div> |
| 22 |
<!-- HIDE this div in create_mode (when '+ New Shop' is clicked in the general settings.) --> |
| 23 |
<div invisible="context.get('pos_config_create_mode', False)"> |
| 24 |
<div class="o_notification_alert alert alert-warning" invisible="not has_active_session" role="alert"> |
| 25 |
A session is currently opened for this PoS. Some settings can only be changed after the session is closed. |
| 26 |
<button class="btn" style="padding:0" name="close_ui" type="object">Click here to close the session</button> |
| 27 |
</div> |
| 28 |
<div class="o_notification_alert alert alert-warning" invisible="company_has_template" role="alert"> |
| 29 |
There is no Chart of Accounts configured on the company. Please go to the invoicing settings to install a Chart of Accounts. |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
|
| 33 |
<!-- SHOW this div in create_mode (when '+ New Shop' is clicked in the general settings.) --> |
| 34 |
<div id="restaurant_on_create" class="row mt16 o_settings_container" invisible="not context.get('pos_config_create_mode', False)"> |
| 35 |
<setting> |
| 36 |
<field name="module_pos_restaurant" /> |
| 37 |
</setting> |
| 38 |
</div> |
| 39 |
|
| 40 |
<!-- HIDE this div in create_mode (when '+ New Shop' is clicked in the general settings.) --> |
| 41 |
<div class="row mt16 o_settings_container" invisible="context.get('pos_config_create_mode', False)"> |
| 42 |
<setting |
| 43 |
title="Employees can scan their badge or enter a PIN to log in to a PoS session. These credentials are configurable in the *HR Settings* tab of the employee form." |
| 44 |
string="Log in with Employees" |
| 45 |
help="Allow to log and switch between selected Employees"> |
| 46 |
<field name="module_pos_hr" readonly="has_active_session" /> |
| 47 |
<div class="content-group mt16" invisible="not module_pos_hr"> |
| 48 |
<div class="text-warning" id="warning_text_employees"> |
| 49 |
Save this page and come back here to set up the feature. |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
</setting> |
| 53 |
<setting id="other_devices" string="ePos Printer" help="Connect device to your PoS without an IoT Box"> |
| 54 |
<field name="other_devices" /> |
| 55 |
<div class="content-group" invisible="not other_devices"> |
| 56 |
<div class="row mb-2"> |
| 57 |
<div class="col-lg-6"> |
| 58 |
<field name="epson_printer_ip" placeholder="Epson Receipt Printer IP Address" class="w-100 pt-1" /> |
| 59 |
</div> |
| 60 |
<div class="col-lg-6"> |
| 61 |
<widget name="point_of_sale_test_epos" /> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
<div class="row" invisible="epson_printer_ip in [False, '']"> |
| 65 |
<div class="col-lg-6 o_light_label"> |
| 66 |
<label string="Link Cashdrawer" for="iface_cashdrawer"/> |
| 67 |
</div> |
| 68 |
<div class="col-lg-6"> |
| 69 |
<field name="iface_cashdrawer"/> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
<div role="alert" class="alert alert-warning" invisible="not iface_print_via_proxy or not other_devices or epson_printer_ip in [False, '']"> |
| 74 |
The Epson receipt printer will be used instead of the receipt printer connected to the IoT Box. |
| 75 |
</div> |
| 76 |
</setting> |
| 77 |
<setting string="IoT Box" help="Connect devices using an IoT Box"> |
| 78 |
<field name="is_posbox" /> |
| 79 |
<div class="content-group pos_iot_config ms-3" invisible="not is_posbox"> |
| 80 |
<div class="row"> |
| 81 |
<div class="col-lg-4 o_light_label"> |
| 82 |
<label string="IoT Box IP Address" for="proxy_ip"/> |
| 83 |
</div> |
| 84 |
<div class="col-lg-8"> |
| 85 |
<field name="proxy_ip"/> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
<div class="row iot_barcode_scanner"> |
| 89 |
<div class="col-lg-5 o_light_label"> |
| 90 |
<label string="Scanner" for="iface_scan_via_proxy"/> |
| 91 |
</div> |
| 92 |
<div class="col-lg-7"> |
| 93 |
<field name="iface_scan_via_proxy"/> |
| 94 |
</div> |
| 95 |
</div> |
| 96 |
<div class="row"> |
| 97 |
<div class="col-lg-5 o_light_label"> |
| 98 |
<label string="Electronic Scale" for="iface_electronic_scale"/> |
| 99 |
</div> |
| 100 |
<div class="col-lg-7"> |
| 101 |
<field name="iface_electronic_scale"/> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
<div class="row"> |
| 105 |
<div class="col-lg-5 o_light_label"> |
| 106 |
<label string="Receipt Printer" for="iface_print_via_proxy"/> |
| 107 |
</div> |
| 108 |
<div class="col-lg-7"> |
| 109 |
<field name="iface_print_via_proxy"/> |
| 110 |
</div> |
| 111 |
</div> |
| 112 |
<div class="row" invisible="not iface_print_via_proxy"> |
| 113 |
<div class="col-lg-5 o_light_label ps-4"> |
| 114 |
<label string="Cashdrawer" for="iface_cashdrawer"/> |
| 115 |
</div> |
| 116 |
<div class="col-lg-7"> |
| 117 |
<field name="iface_cashdrawer"/> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
</setting> |
| 122 |
<div groups="base.group_system"> |
| 123 |
<p> |
| 124 |
More settings: <a href="#" name="%(action_pos_configuration)d" type="action" class="btn-link o_form_uri" role="button">Configurations > Settings</a> |
| 125 |
</p> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
</sheet> |
| 129 |
|
| 130 |
<!-- Replace the default save/discard buttons so that when any of the buttons is clicked, the modal immediately closes. --> |
| 131 |
<footer invisible="not context.get('pos_config_open_modal', False)"> |
| 132 |
<button string="Save" special="save" class="btn-primary"/> |
| 133 |
<button string="Discard" class="btn-secondary" special="cancel"/> |
| 134 |
</footer> |
| 135 |
</form> |
| 136 |
</field> |
| 137 |
</record> |
| 138 |
|
| 139 |
<record id="view_pos_config_tree" model="ir.ui.view"> |
| 140 |
<field name="name">pos.config.list.view</field> |
| 141 |
<field name="model">pos.config</field> |
| 142 |
<field name="arch" type="xml"> |
| 143 |
<list string="Point of Sale Configuration"> |
| 144 |
<field name="name" /> |
| 145 |
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> |
| 146 |
<field name="last_session_closing_date" string="Closing"/> |
| 147 |
<field name="currency_id" column_invisible="True"/> |
| 148 |
<field name="last_session_closing_cash" widget="monetary" string="Balance"/> |
| 149 |
</list> |
| 150 |
</field> |
| 151 |
</record> |
| 152 |
|
| 153 |
<record id="view_pos_config_search" model="ir.ui.view"> |
| 154 |
<field name="name">pos.config.search.view</field> |
| 155 |
<field name="model">pos.config</field> |
| 156 |
<field name="arch" type="xml"> |
| 157 |
<search string="Point of Sale Config"> |
| 158 |
<field name="name"/> |
| 159 |
<field name="picking_type_id" /> |
| 160 |
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> |
| 161 |
</search> |
| 162 |
</field> |
| 163 |
</record> |
| 164 |
|
| 165 |
<record id="action_pos_config_kanban" model="ir.actions.act_window"> |
| 166 |
<field name="name">Point of Sale</field> |
| 167 |
<field name="path">point-of-sale</field> |
| 168 |
<field name="res_model">pos.config</field> |
| 169 |
<field name="view_mode">kanban,list,form</field> |
| 170 |
<field name="domain"></field> |
| 171 |
<field name="search_view_id" ref="view_pos_config_search" /> |
| 172 |
<field name="help" type="html"> |
| 173 |
<p class="o_view_nocontent_smiling_face"> |
| 174 |
Create a new PoS |
| 175 |
</p><p> |
| 176 |
Configure at least one Point of Sale. |
| 177 |
</p> |
| 178 |
</field> |
| 179 |
</record> |
| 180 |
|
| 181 |
<record id="action_pos_config_tree" model="ir.actions.act_window"> |
| 182 |
<field name="name">Point of Sale List</field> |
| 183 |
<field name="res_model">pos.config</field> |
| 184 |
<field name="view_mode">list,form</field> |
| 185 |
<field name="domain"></field> |
| 186 |
<field name="search_view_id" ref="view_pos_config_search" /> |
| 187 |
<field name="help" type="html"> |
| 188 |
<p class="o_view_nocontent_smiling_face"> |
| 189 |
Create a new PoS |
| 190 |
</p><p> |
| 191 |
Configure at least one Point of Sale. |
| 192 |
</p> |
| 193 |
</field> |
| 194 |
</record> |
| 195 |
|
| 196 |
<!-- Products sub Category --> |
| 197 |
<menuitem id="menu_products_pos_category" |
| 198 |
action="point_of_sale.product_pos_category_action" |
| 199 |
parent="point_of_sale.pos_menu_products_configuration" |
| 200 |
sequence="1"/> |
| 201 |
<menuitem id="pos_menu_products_attribute_action" |
| 202 |
action="product.attribute_action" |
| 203 |
parent="point_of_sale.pos_menu_products_configuration" groups="product.group_product_variant" sequence="2"/> |
| 204 |
|
| 205 |
<menuitem id="menu_pos_dashboard" action="action_pos_config_kanban" parent="menu_point_root" name="Dashboard" sequence="1"/> |
| 206 |
<menuitem id="menu_point_of_sale_list" name="Point of Sales" parent="menu_point_config_product" |
| 207 |
action="action_pos_config_tree" sequence="10"/> |
| 208 |
|
| 209 |
</odoo> |