-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] fermente_pos_restaurant: Add simple settings in the simple pos.…
…config form view.
- Loading branch information
1 parent
98e0e93
commit 4a8110e
Showing
4 changed files
with
184 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
from . import models | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Customize Odoo / odoo / ``point_of_sale`` module. | ||
|
||
* Allow non admin user to create ``restaurant.floor`` and ``restaurant.table`` elements. | ||
|
||
* Add simple settings in the simple ``pos.config`` form view. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop) | ||
@author: Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<odoo> | ||
|
||
<record id="view_pos_config_form" model="ir.ui.view"> | ||
<field name="model">pos.config</field> | ||
<field name="inherit_id" ref="fermente_pos.view_pos_config_form" /> | ||
<field name="arch" type="xml"> | ||
|
||
<xpath expr="//field[@name='ship_later']/../.." position="after"> | ||
|
||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_left_pane"> | ||
<field name="module_pos_restaurant" /> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="module_pos_restaurant"/> | ||
</div> | ||
</div> | ||
|
||
<div class="col-12 col-lg-6 o_setting_box" | ||
attrs="{'invisible': [('module_pos_restaurant', '=', False)]}"> | ||
<div class="o_setting_left_pane"> | ||
<field name="is_table_management" attrs="{'readonly': [('has_active_session','=', True)]}" | ||
/> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="is_table_management" string="Floors & Tables Map"/> | ||
<div class="text-muted"> | ||
Design floors and assign orders to tables | ||
</div> | ||
<div class="content-group" attrs="{'invisible': [('is_table_management','=',False)]}"> | ||
<div class="mt16"> | ||
<label string="Floors" for="floor_ids" class="o_light_label"/> | ||
<field name="floor_ids" widget="many2many_tags" attrs="{'readonly': [('has_active_session','=', True)]}" /> | ||
</div> | ||
<div> | ||
<button name="%(pos_restaurant.action_restaurant_floor_form)d" icon="fa-arrow-right" type="action" string="Floors" class="btn-link"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</xpath> | ||
|
||
|
||
</field> | ||
</record> | ||
|
||
</odoo> | ||
|
||
<!-- | ||
<div class="col-12 col-lg-6 o_setting_box" groups="account.group_account_readonly"> | ||
<div class="o_setting_right_pane"> | ||
<div> | ||
<label string="Default Temporary Account" for="account_default_pos_receivable_account_id"/> | ||
<i class="fa fa-info-circle me-1" title="This setting is common to all PoS." pos-data-toggle="tooltip"/> | ||
<div class="text-muted"> | ||
Intermediary account used for unidentified customers. | ||
</div> | ||
<div class="content-group mt16"> | ||
<field name="account_default_pos_receivable_account_id" colspan="4" nolabel="1" domain="[('reconcile', '=', True), ('account_type', '=', 'asset_receivable'), ('company_id', '=', company_id)]"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_right_pane"> | ||
<span class="o_form_label">Default Journals</span> | ||
<div class="text-muted"> | ||
Default journals for orders and invoices | ||
</div> | ||
<div class="content-group mt16"> | ||
<div class="row" title="Whenever you close a session, one entry is generated in the following accounting journal for all the orders not invoiced. Invoices are recorded in accounting separately."> | ||
<label string="Orders" for="journal_id" class="col-lg-3 o_light_label" options="{'no_open': True, 'no_create': True}"/> | ||
<field name="journal_id" domain="[('company_id', '=', company_id), ('type', 'in', ('general', 'sale'))]" context="{'default_company_id': company_id, 'default_type': 'general'}" attrs="{'required': [('company_has_template', '=', True)]}"/> | ||
</div> | ||
<div class="row"> | ||
<label string="Invoices" for="invoice_journal_id" class="col-lg-3 o_light_label"/> | ||
<field name="invoice_journal_id" domain="[('company_id', '=', company_id), ('type', '=', 'sale')]" attrs="{'required': [('company_has_template', '=', True)]}" context="{'default_company_id': company_id, 'default_type': 'sale'}"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12 col-lg-6 o_setting_box" id="multiple_prices_setting"> | ||
<div class="o_setting_left_pane"> | ||
<field name="use_pricelist" attrs="{'readonly': [('has_active_session','=', True)]}"/> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="use_pricelist" string="Flexible Pricelists"/> | ||
<div class="text-muted"> | ||
Set multiple prices per product, automated discounts, etc. | ||
</div> | ||
<div class="content-group" attrs="{'invisible': [('use_pricelist' ,'=', False)]}"> | ||
<div class="row mt16"> | ||
<label string="Available" for="available_pricelist_ids" class="col-lg-3 o_light_label"/> | ||
<field name="available_pricelist_ids" widget="many2many_tags" domain="['|',('company_id', '=', company_id),('company_id', '=', False)]" attrs="{'readonly': [('has_active_session','=', True)]}"/> | ||
</div> | ||
<div class="row mt16"> | ||
<label string="Default" for="pricelist_id" class="col-lg-3 o_light_label"/> | ||
<field name="pricelist_id" domain="[('id', 'in', available_pricelist_ids)]" options="{'no_create': True}"/> | ||
</div> | ||
<div class="mt8"> | ||
<button name="156" icon="fa-arrow-right" type="action" string="Pricelists" groups="product.group_product_pricelist" class="btn-link"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_left_pane"> | ||
<field name="is_header_or_footer"/> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="is_header_or_footer"/> | ||
<div class="text-muted"> | ||
Add a custom message to header and footer | ||
</div> | ||
<div class="content-group mt16" attrs="{'invisible' : [('is_header_or_footer', '=', False)]}"> | ||
<div> | ||
<label string="Header" for="receipt_header" class="col-lg-2 o_light_label"/> | ||
<field name="receipt_header" placeholder="e.g. Company Address, Website"/> | ||
</div> | ||
<div> | ||
<label string="Footer" for="receipt_footer" class="col-lg-2 o_light_label"/> | ||
<field name="receipt_footer" placeholder="e.g. Return Policy, Thanks for shopping with us!"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_right_pane"> | ||
<span class="o_form_label">Payment Methods</span> | ||
<div class="text-muted"> | ||
Payment methods available | ||
</div> | ||
<div class="content-group mt16"> | ||
<field name="payment_method_ids" colspan="4" nolabel="1" widget="many2many_tags" attrs="{'readonly': [('has_active_session','=', True)], 'required': [('company_has_template', '=', True)]}" options="{'no_create': True}" /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-12 col-lg-6 o_setting_box"> | ||
<div class="o_setting_left_pane"> | ||
<field name="ship_later"/> | ||
</div> | ||
<div class="o_setting_right_pane"> | ||
<label for="ship_later" string="Allow Ship Later"/> | ||
<div class="text-muted"> | ||
Sell products and deliver them later. | ||
</div> | ||
<div class="mt16" attrs="{'invisible' : [('ship_later', '=', False)]}"> | ||
<div> | ||
<label for="warehouse_id" string="Warehouse" class="fw-normal"/> | ||
<field name="warehouse_id" attrs="{'required': [('ship_later', '=', True)]}"/> | ||
</div> | ||
<div groups="stock.group_adv_location"> | ||
<label for="route_id" string="Specific route" class="fw-normal"/> | ||
<field name="route_id"/> | ||
</div> | ||
<div> | ||
<label for="picking_policy" class="fw-normal"/> | ||
<field name="picking_policy" attrs="{'required': [('ship_later', '=', True)]}"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> --> |