diff --git a/pos_minimize_menu/README.rst b/pos_minimize_menu/README.rst new file mode 100644 index 0000000000..a7cc93b1ce --- /dev/null +++ b/pos_minimize_menu/README.rst @@ -0,0 +1,138 @@ +============================= +Point of Sale - Minimize Menu +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:bc36a1da44c6db76a0ff464f58f1511761851ac5673829cda4f6cb9efb53c881 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github + :target: https://github.com/OCA/pos/tree/17.0/pos_minimize_menu + :alt: OCA/pos +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_minimize_menu + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/pos&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to minimize the placeholder that contains all the +options in main point of sale menu part. + +It allows to have more place for the display of the current ticket. + +**Without this module:** + + |Without Module| + +**with this module:** + + |With Module| + +.. |Without Module| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_minimize_menu/static/img/without_module.png +.. |With Module| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_minimize_menu/static/img/with_module.png + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +if you want to display in the main screen some important buttons: + +- Go to 'Point of Sale > Configuration > Settings' + +- Edit the field 'Important Buttons' and write the technical name of the + buttons. + + |Configure Important Buttons| + +Here are for the official modules, the following possibles values: + + - ``point_of_sale`` : ProductInfoButton, SetFiscalPositionButton, + OrderlineCustomerNoteButton, SetPricelistButton, RefundButton + - ``pos_sale``: SetSaleOrderButton + - ``pos_discount``: DiscountButton + - ``pos_loyalty``: RewardButton, ResetProgramsButton, eWalletButton, + PromoCodeButton + - ``pos_restaurant``: SplitBillButton, SubmitOrderButton, + TransferOrderButton, PrintBillButton, TableGuestsButton, + OrderlineNoteButton + +As a result, selected buttons will be displayed in the main screen: + + |Important Buttons Displayed| + +.. |Configure Important Buttons| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_minimize_menu/static/img/configure_important_buttons.png +.. |Important Buttons Displayed| image:: https://raw.githubusercontent.com/OCA/pos/17.0/pos_minimize_menu/static/img/important_buttons_displayed.png + +Development +=========== + +Technically, it provides the same UI for the desktop version as for the +mobile version. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* GRAP + +Contributors +------------ + +- Sylvain LE GAL (https://twitter.com/legalsylvain) +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px + :target: https://github.com/legalsylvain + :alt: legalsylvain + +Current `maintainer `__: + +|maintainer-legalsylvain| + +This module is part of the `OCA/pos `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/pos_minimize_menu/__init__.py b/pos_minimize_menu/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/pos_minimize_menu/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/pos_minimize_menu/__manifest__.py b/pos_minimize_menu/__manifest__.py new file mode 100644 index 0000000000..3cefd7d2a9 --- /dev/null +++ b/pos_minimize_menu/__manifest__.py @@ -0,0 +1,26 @@ +# Copyright (C) 2023 - 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). +{ + "name": "Point of Sale - Minimize Menu", + "version": "17.0.1.0.0", + "category": "Point of Sale", + "summary": "Reduce size of the main menu of the point of sale.", + "depends": ["point_of_sale"], + "website": "https://github.com/OCA/pos", + "author": "GRAP,Odoo Community Association (OCA)", + "maintainers": ["legalsylvain"], + "demo": [ + "demo/pos_config.xml", + ], + "data": [ + "views/view_res_config_settings.xml", + ], + "assets": { + "point_of_sale._assets_pos": [ + "pos_minimize_menu/static/src/js/ProductScreen.esm.js", + "pos_minimize_menu/static/src/xml/ProductScreen.xml", + ], + }, + "license": "LGPL-3", +} diff --git a/pos_minimize_menu/demo/pos_config.xml b/pos_minimize_menu/demo/pos_config.xml new file mode 100644 index 0000000000..2336a6b1a2 --- /dev/null +++ b/pos_minimize_menu/demo/pos_config.xml @@ -0,0 +1,11 @@ + + + + + OrderlineCustomerNoteButton + + diff --git a/pos_minimize_menu/i18n/es.po b/pos_minimize_menu/i18n/es.po new file mode 100644 index 0000000000..7d40b80b93 --- /dev/null +++ b/pos_minimize_menu/i18n/es.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_minimize_menu +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-02-08 22:35+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes Config" + +#. module: pos_minimize_menu +#: model:ir.model.fields,field_description:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,field_description:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "Important Buttons" +msgstr "Botones Importantes" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configuración de Punto de Venta" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'" +msgstr "" +"Establezca los nombres técnicos de los botones que se mostrarán en la " +"pantalla principal del punto de venta. Otros botones estarán disponibles " +"pulsando el botón 'Más...'" + +#. module: pos_minimize_menu +#: model:ir.model.fields,help:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,help:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'." +msgstr "" +"Establezca los nombres técnicos de los botones que se mostrarán en la " +"pantalla principal del punto de venta. Otros botones estarán disponibles " +"pulsando el botón 'Más...'." + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "e.g. OrderlineCustomerNoteButton" +msgstr "p. ej. OrderlineCustomerNoteButton" diff --git a/pos_minimize_menu/i18n/fr.po b/pos_minimize_menu/i18n/fr.po new file mode 100644 index 0000000000..4615b56ac0 --- /dev/null +++ b/pos_minimize_menu/i18n/fr.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_minimize_menu +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model.fields,field_description:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,field_description:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "Important Buttons" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model.fields,help:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,help:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'." +msgstr "" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "e.g. OrderlineCustomerNoteButton" +msgstr "" diff --git a/pos_minimize_menu/i18n/it.po b/pos_minimize_menu/i18n/it.po new file mode 100644 index 0000000000..1e6107c820 --- /dev/null +++ b/pos_minimize_menu/i18n/it.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_minimize_menu +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-10-13 14:40+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: pos_minimize_menu +#: model:ir.model.fields,field_description:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,field_description:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "Important Buttons" +msgstr "Pulsanti importanti" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_pos_config +msgid "Point of Sale Configuration" +msgstr "Configurazione punto vendita" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'" +msgstr "" +"Imposta nomi tecnici dei pulsanti che verranno visualizzati nella schermata " +"principale del punto vendita. Altri pulsanti saranno disponibili facendo " +"clic sul pulsante 'Altro...'" + +#. module: pos_minimize_menu +#: model:ir.model.fields,help:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,help:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'." +msgstr "" +"Imposta nomi tecnici dei pulsanti che verranno visualizzati nella schermata " +"principale del punto vendita. Altri pulsanti saranno disponibili facendo " +"clic sul pulsante 'Altro...'." + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "e.g. OrderlineCustomerNoteButton" +msgstr "es. OrderlineCustomerNoteButton" diff --git a/pos_minimize_menu/i18n/pos_minimize_menu.pot b/pos_minimize_menu/i18n/pos_minimize_menu.pot new file mode 100644 index 0000000000..2054983d49 --- /dev/null +++ b/pos_minimize_menu/i18n/pos_minimize_menu.pot @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pos_minimize_menu +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model.fields,field_description:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,field_description:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "Important Buttons" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model,name:pos_minimize_menu.model_pos_config +msgid "Point of Sale Configuration" +msgstr "" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'" +msgstr "" + +#. module: pos_minimize_menu +#: model:ir.model.fields,help:pos_minimize_menu.field_pos_config__iface_important_buttons +#: model:ir.model.fields,help:pos_minimize_menu.field_res_config_settings__pos_iface_important_buttons +msgid "" +"Set technical names of buttons that will be displayed in the main point of " +"sale screen. Other buttons will be available by clicking on the button " +"'More...'." +msgstr "" + +#. module: pos_minimize_menu +#: model_terms:ir.ui.view,arch_db:pos_minimize_menu.view_res_config_settings_form +msgid "e.g. OrderlineCustomerNoteButton" +msgstr "" diff --git a/pos_minimize_menu/models/__init__.py b/pos_minimize_menu/models/__init__.py new file mode 100644 index 0000000000..2b92809a3b --- /dev/null +++ b/pos_minimize_menu/models/__init__.py @@ -0,0 +1,2 @@ +from . import pos_config +from . import res_config_settings diff --git a/pos_minimize_menu/models/pos_config.py b/pos_minimize_menu/models/pos_config.py new file mode 100644 index 0000000000..23b27f1ed0 --- /dev/null +++ b/pos_minimize_menu/models/pos_config.py @@ -0,0 +1,17 @@ +# Copyright (C) 2023 - 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). + +from odoo import fields, models + + +class PosConfig(models.Model): + _inherit = "pos.config" + + iface_important_buttons = fields.Text( + string="Important Buttons", + help="Set technical names of buttons that will" + " be displayed in the main point of sale screen." + " Other buttons will be available by clicking" + " on the button 'More...'.", + ) diff --git a/pos_minimize_menu/models/res_config_settings.py b/pos_minimize_menu/models/res_config_settings.py new file mode 100644 index 0000000000..eea95fe264 --- /dev/null +++ b/pos_minimize_menu/models/res_config_settings.py @@ -0,0 +1,14 @@ +# Copyright (C) 2023 - 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). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + pos_iface_important_buttons = fields.Text( + related="pos_config_id.iface_important_buttons", + readonly=False, + ) diff --git a/pos_minimize_menu/pyproject.toml b/pos_minimize_menu/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/pos_minimize_menu/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/pos_minimize_menu/readme/CONFIGURE.md b/pos_minimize_menu/readme/CONFIGURE.md new file mode 100644 index 0000000000..7ecd5e49d1 --- /dev/null +++ b/pos_minimize_menu/readme/CONFIGURE.md @@ -0,0 +1,24 @@ +if you want to display in the main screen some important buttons: + +- Go to 'Point of Sale \> Configuration \> Settings' + +- Edit the field 'Important Buttons' and write the technical name of the + buttons. + + ![Configure Important Buttons](../static/img/configure_important_buttons.png) + +Here are for the official modules, the following possibles values: + +> - `point_of_sale` : ProductInfoButton, SetFiscalPositionButton, +> OrderlineCustomerNoteButton, SetPricelistButton, RefundButton +> - `pos_sale`: SetSaleOrderButton +> - `pos_discount`: DiscountButton +> - `pos_loyalty`: RewardButton, ResetProgramsButton, eWalletButton, +> PromoCodeButton +> - `pos_restaurant`: SplitBillButton, SubmitOrderButton, +> TransferOrderButton, PrintBillButton, TableGuestsButton, +> OrderlineNoteButton + +As a result, selected buttons will be displayed in the main screen: + +> ![Important Buttons Displayed](../static/img/important_buttons_displayed.png) diff --git a/pos_minimize_menu/readme/CONTRIBUTORS.md b/pos_minimize_menu/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..ad1e39054e --- /dev/null +++ b/pos_minimize_menu/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Sylvain LE GAL () +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/pos_minimize_menu/readme/DESCRIPTION.md b/pos_minimize_menu/readme/DESCRIPTION.md new file mode 100644 index 0000000000..5516ca3289 --- /dev/null +++ b/pos_minimize_menu/readme/DESCRIPTION.md @@ -0,0 +1,12 @@ +This module allows you to minimize the placeholder that contains all the +options in main point of sale menu part. + +It allows to have more place for the display of the current ticket. + +**Without this module:** + +> ![Without Module](../static/img/without_module.png) + +**with this module:** + +> ![With Module](../static/img/with_module.png) diff --git a/pos_minimize_menu/readme/DEVELOP.md b/pos_minimize_menu/readme/DEVELOP.md new file mode 100644 index 0000000000..ad2746cd6d --- /dev/null +++ b/pos_minimize_menu/readme/DEVELOP.md @@ -0,0 +1,2 @@ +Technically, it provides the same UI for the desktop version as for the +mobile version. diff --git a/pos_minimize_menu/static/description/icon.png b/pos_minimize_menu/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/pos_minimize_menu/static/description/icon.png differ diff --git a/pos_minimize_menu/static/description/index.html b/pos_minimize_menu/static/description/index.html new file mode 100644 index 0000000000..896cbeb57f --- /dev/null +++ b/pos_minimize_menu/static/description/index.html @@ -0,0 +1,473 @@ + + + + + +Point of Sale - Minimize Menu + + + +
+

Point of Sale - Minimize Menu

+ + +

Beta License: LGPL-3 OCA/pos Translate me on Weblate Try me on Runboat

+

This module allows you to minimize the placeholder that contains all the +options in main point of sale menu part.

+

It allows to have more place for the display of the current ticket.

+

Without this module:

+
+Without Module
+

with this module:

+
+With Module
+

Table of contents

+ +
+

Configuration

+

if you want to display in the main screen some important buttons:

+
    +
  • Go to ‘Point of Sale > Configuration > Settings’

    +
  • +
  • Edit the field ‘Important Buttons’ and write the technical name of the +buttons.

    +

    Configure Important Buttons

    +
  • +
+

Here are for the official modules, the following possibles values:

+
+
    +
  • point_of_sale : ProductInfoButton, SetFiscalPositionButton, +OrderlineCustomerNoteButton, SetPricelistButton, RefundButton
  • +
  • pos_sale: SetSaleOrderButton
  • +
  • pos_discount: DiscountButton
  • +
  • pos_loyalty: RewardButton, ResetProgramsButton, eWalletButton, +PromoCodeButton
  • +
  • pos_restaurant: SplitBillButton, SubmitOrderButton, +TransferOrderButton, PrintBillButton, TableGuestsButton, +OrderlineNoteButton
  • +
+
+

As a result, selected buttons will be displayed in the main screen:

+
+Important Buttons Displayed
+
+
+

Development

+

Technically, it provides the same UI for the desktop version as for the +mobile version.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • GRAP
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

legalsylvain

+

This module is part of the OCA/pos project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/pos_minimize_menu/static/img/configure_important_buttons.png b/pos_minimize_menu/static/img/configure_important_buttons.png new file mode 100644 index 0000000000..f2130086e7 Binary files /dev/null and b/pos_minimize_menu/static/img/configure_important_buttons.png differ diff --git a/pos_minimize_menu/static/img/important_buttons_displayed.png b/pos_minimize_menu/static/img/important_buttons_displayed.png new file mode 100644 index 0000000000..0068587e81 Binary files /dev/null and b/pos_minimize_menu/static/img/important_buttons_displayed.png differ diff --git a/pos_minimize_menu/static/img/with_module.png b/pos_minimize_menu/static/img/with_module.png new file mode 100644 index 0000000000..3cb0efcaf1 Binary files /dev/null and b/pos_minimize_menu/static/img/with_module.png differ diff --git a/pos_minimize_menu/static/img/without_module.png b/pos_minimize_menu/static/img/without_module.png new file mode 100644 index 0000000000..438ddf2cf3 Binary files /dev/null and b/pos_minimize_menu/static/img/without_module.png differ diff --git a/pos_minimize_menu/static/src/js/ProductScreen.esm.js b/pos_minimize_menu/static/src/js/ProductScreen.esm.js new file mode 100644 index 0000000000..b83e4c61e8 --- /dev/null +++ b/pos_minimize_menu/static/src/js/ProductScreen.esm.js @@ -0,0 +1,26 @@ +/** @odoo-module **/ + +/* + Copyright (C) 2023 - Today: GRAP (http://www.grap.coop) + @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +*/ + +import {ProductScreen} from "@point_of_sale/app/screens/product_screen/product_screen"; +import {patch} from "@web/core/utils/patch"; + +patch(ProductScreen.prototype, { + get importantControlButtons() { + if (window.odoo && window.odoo.isTourReady) { + // Bypass button shrinking during tours to avoid test breakages + return this.controlButtons; + } + var importantButtons = []; + var important_names = this.pos.config.iface_important_buttons || ""; + for (const button of this.controlButtons) { + if (important_names.includes(button.name)) { + importantButtons.push(button); + } + } + return importantButtons; + }, +}); diff --git a/pos_minimize_menu/static/src/xml/ProductScreen.xml b/pos_minimize_menu/static/src/xml/ProductScreen.xml new file mode 100644 index 0000000000..850d7c8d37 --- /dev/null +++ b/pos_minimize_menu/static/src/xml/ProductScreen.xml @@ -0,0 +1,38 @@ + + + + + + + controlButtons.length <= 3 + + + + + + + + + + + + diff --git a/pos_minimize_menu/views/view_res_config_settings.xml b/pos_minimize_menu/views/view_res_config_settings.xml new file mode 100644 index 0000000000..4ca6b1a78d --- /dev/null +++ b/pos_minimize_menu/views/view_res_config_settings.xml @@ -0,0 +1,27 @@ + + + + + + res.config.settings + + + + + + + + + + +