Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] pos_screen_element_custom_size: Migration to 17.0 #1306

Open
wants to merge 7 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions pos_screen_element_custom_size/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
===============================
POS Screen Elements Custom Size
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:710a3bce85eb1c23dbd7d520cc50d67f82dda4197a94df95ea0be680bb9a141d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-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_screen_element_custom_size
: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_screen_element_custom_size
: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 to define custom size values for certain POS screen
elements.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

POS can be run on different devices with different screen size and
resolution. By default all elements will be automatically scaled to fit
the device screen properly. However sometimes there might be some issues
like product captions do not fit into the tile or product picture looks
too small.

Configuration
=============

Go to **POS** -> **Configuration** -> **Settings** select a POS and
scroll down to the **POS Screen Custom Settings** section.

Configure custom screen settings for selected POS. Leave fields blank to
use the standard values:

- Product Tile Min Width: Minimum width of the product tile in pixels
- Product Text Font Size: Custom font size of the product name label
- Price Tag Font Size: Custom font size of the price label

Usage
=====

Just load POS as usual. Custom interface settings will be applied based
on configuration.

Known issues / Roadmap
======================

TODO: add more settings by inheriting and extending this module.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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 <https://github.com/OCA/pos/issues/new?body=module:%20pos_screen_element_custom_size%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Cetmix

Contributors
------------

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- 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.

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/17.0/pos_screen_element_custom_size>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_screen_element_custom_size/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions pos_screen_element_custom_size/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (C) 2024 Cetmix OÜ
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "POS Screen Elements Custom Size",
"version": "17.0.1.0.0",
"category": "Sales/Point of Sale",
"summary": "Set custom size for POS screen elements",
"license": "AGPL-3",
"website": "https://github.com/OCA/pos",
"author": "Cetmix, Odoo Community Association (OCA)",
"depends": ["point_of_sale"],
"data": [
"views/res_config_settings_views.xml",
],
"images": [],
"assets": {
"point_of_sale._assets_pos": [
"pos_screen_element_custom_size/static/src/js/*.js",
"pos_screen_element_custom_size/static/src/xml/*.xml",
],
},
"installable": True,
}
77 changes: 77 additions & 0 deletions pos_screen_element_custom_size/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_screen_element_custom_size
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-07-08 11:58+0000\n"
"Last-Translator: mymage <[email protected]>\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 5.6.2\n"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "<span>pixel</span>"
msgstr "<span>pixel</span>"

#. module: pos_screen_element_custom_size
#: model:ir.model,name:pos_screen_element_custom_size.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Custom font size of the price label"
msgstr "Dimensione carattere personalizzata dell'etichetta prezzo"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Custom font size of the product name label"
msgstr "Dimensione carattere personalizzata dell'etichetta nome prodotto"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Minimum width of the product tile in pixels"
msgstr "Larghezza minima in pixel del titolo prodotto"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "POS Screen Custom Settings"
msgstr "Impostazioni personalizzate schermo POS"

#. module: pos_screen_element_custom_size
#: model:ir.model,name:pos_screen_element_custom_size.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configurazione punto vendita"

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__price_tag_font_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_price_tag_font_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Price Tag Font Size"
msgstr "Dimensione carattere etichetta prezzo"

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__product_text_font_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_product_text_font_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Product Text Font Size"
msgstr "Dimensione carattere testo prodotto"

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__product_title_min_width
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_product_title_min_width
msgid "Product Title Min Width"
msgstr "Larghezza minima titolo prodotto"

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Product Title Mini Width"
msgstr "Larghezza minima titolo prodotto"
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_screen_element_custom_size
#
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_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "<span>pixel</span>"
msgstr ""

#. module: pos_screen_element_custom_size
#: model:ir.model,name:pos_screen_element_custom_size.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Custom font size of the price label"
msgstr ""

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Custom font size of the product name label"
msgstr ""

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Minimum width of the product tile in pixels"
msgstr ""

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "POS Screen Custom Settings"
msgstr ""

#. module: pos_screen_element_custom_size
#: model:ir.model,name:pos_screen_element_custom_size.model_pos_config
msgid "Point of Sale Configuration"
msgstr ""

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__price_tag_font_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_price_tag_font_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Price Tag Font Size"
msgstr ""

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__product_text_font_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_product_text_font_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Product Text Font Size"
msgstr ""

#. module: pos_screen_element_custom_size
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_pos_config__product_title_min_width
#: model:ir.model.fields,field_description:pos_screen_element_custom_size.field_res_config_settings__pos_product_title_min_width
msgid "Product Title Min Width"
msgstr ""

#. module: pos_screen_element_custom_size
#: model_terms:ir.ui.view,arch_db:pos_screen_element_custom_size.res_config_settings_view_form
msgid "Product Title Mini Width"
msgstr ""
2 changes: 2 additions & 0 deletions pos_screen_element_custom_size/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_config
from . import res_config_settings
12 changes: 12 additions & 0 deletions pos_screen_element_custom_size/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2024 Cetmix OÜ
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class PosConfig(models.Model):
_inherit = "pos.config"

product_title_min_width = fields.Integer(default=122)
product_text_font_size = fields.Integer(default=12)
price_tag_font_size = fields.Integer(default=12)
18 changes: 18 additions & 0 deletions pos_screen_element_custom_size/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2024 Cetmix OÜ
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

pos_product_title_min_width = fields.Integer(
related="pos_config_id.product_title_min_width", readonly=False
)
pos_product_text_font_size = fields.Integer(
related="pos_config_id.product_text_font_size", readonly=False
)
pos_price_tag_font_size = fields.Integer(
related="pos_config_id.price_tag_font_size", readonly=False
)
3 changes: 3 additions & 0 deletions pos_screen_element_custom_size/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
7 changes: 7 additions & 0 deletions pos_screen_element_custom_size/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Go to **POS** -> **Configuration** -> **Settings** select a POS and scroll down to the **POS Screen Custom Settings** section.

Configure custom screen settings for selected POS. Leave fields blank to use the standard values:

* Product Tile Min Width: Minimum width of the product tile in pixels
* Product Text Font Size: Custom font size of the product name label
* Price Tag Font Size: Custom font size of the price label
3 changes: 3 additions & 0 deletions pos_screen_element_custom_size/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POS can be run on different devices with different screen size and resolution.
By default all elements will be automatically scaled to fit the device screen properly.
However sometimes there might be some issues like product captions do not fit into the tile or product picture looks too small.
2 changes: 2 additions & 0 deletions pos_screen_element_custom_size/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia
1 change: 1 addition & 0 deletions pos_screen_element_custom_size/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows to define custom size values for certain POS screen elements.
2 changes: 2 additions & 0 deletions pos_screen_element_custom_size/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TODO: add more settings by inheriting and extending this module.

1 change: 1 addition & 0 deletions pos_screen_element_custom_size/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Just load POS as usual. Custom interface settings will be applied based on configuration.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading