-
-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by ivantodorovich
- Loading branch information
Showing
19 changed files
with
661 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
================================ | ||
PoS Product Display Default Code | ||
================================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/16.0/pos_product_display_default_code | ||
:alt: OCA/pos | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/pos-16-0/pos-16-0-pos_product_display_default_code | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/184/16.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module makes Odoo show the internal reference of the product in the Point of Sale. | ||
|
||
The reference will appear in the products list, in the orderlines and in the receipt. | ||
|
||
example: Desk Organizer -> [FURN_0001] Desk Organizer | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
add an option in pos.config to activate/deactivate | ||
|
||
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 smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_product_display_default_code%0Aversion:%2016.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 | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
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/16.0/pos_product_display_default_code>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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,2 @@ | ||
# Copyright 2023 FactorLibre - Juan Carlos Bonilla | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "PoS Product Display Default Code", | ||
"summary": "pos: display product default code before product name", | ||
"version": "16.0.1.0.0", | ||
"category": "Point of Sale", | ||
"website": "https://github.com/OCA/pos", | ||
"author": "Odoo Community Association (OCA), Akretion, FactorLibre", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": [ | ||
"point_of_sale", | ||
], | ||
"data": [ | ||
"views/res_config_settings_views.xml", | ||
], | ||
"demo": [], | ||
"qweb": [], | ||
} |
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,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * pos_product_display_default_code | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-02-14 15:18+0000\n" | ||
"PO-Revision-Date: 2023-02-14 15:18+0000\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_product_display_default_code | ||
#: model:ir.model,name:pos_product_display_default_code.model_res_config_settings | ||
msgid "Config Settings" | ||
msgstr "Opciones de configuración" | ||
|
||
#. module: pos_product_display_default_code | ||
#: model:ir.model.fields,field_description:pos_product_display_default_code.field_pos_config__display_default_code | ||
#: model:ir.model.fields,field_description:pos_product_display_default_code.field_res_config_settings__pos_display_default_code | ||
#: model_terms:ir.ui.view,arch_db:pos_product_display_default_code.res_config_settings_default_code_view_form | ||
msgid "Display Default Code" | ||
msgstr "Mostrar referencia interna" | ||
|
||
#. module: pos_product_display_default_code | ||
#: model_terms:ir.ui.view,arch_db:pos_product_display_default_code.res_config_settings_default_code_view_form | ||
msgid "Display products' internal reference in the PoS interface and tickets." | ||
msgstr "Mostrar referencia interna del producto en la interfaz del TPV y tickets." | ||
|
||
#. module: pos_product_display_default_code | ||
#: model:ir.model,name:pos_product_display_default_code.model_pos_config | ||
msgid "Point of Sale Configuration" | ||
msgstr "Configuración del TPV" | ||
|
||
#. module: pos_product_display_default_code | ||
#: model:ir.model,name:pos_product_display_default_code.model_pos_session | ||
msgid "Point of Sale Session" | ||
msgstr "Sesión TPV" |
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,4 @@ | ||
# Copyright 2023 FactorLibre - Juan Carlos Bonilla | ||
from . import pos_session | ||
from . import pos_config | ||
from . import res_config_settings |
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,8 @@ | ||
# Copyright 2023 FactorLibre - Juan Carlos Bonilla | ||
from odoo import fields, models | ||
|
||
|
||
class PosConfig(models.Model): | ||
_inherit = "pos.config" | ||
|
||
display_default_code = fields.Boolean(default=False) |
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,12 @@ | ||
# Copyright 2023 FactorLibre - Juan Carlos Bonilla | ||
from odoo import models | ||
|
||
|
||
class PosSession(models.Model): | ||
_inherit = "pos.session" | ||
|
||
def _loader_params_product_product(self): | ||
result = super()._loader_params_product_product() | ||
if self.config_id and self.config_id.display_default_code: | ||
result["context"]["display_default_code"] = True | ||
return result |
10 changes: 10 additions & 0 deletions
10
pos_product_display_default_code/models/res_config_settings.py
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,10 @@ | ||
# Copyright 2023 FactorLibre - Juan Carlos Bonilla | ||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
pos_display_default_code = fields.Boolean( | ||
related="pos_config_id.display_default_code", readonly=False | ||
) |
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,5 @@ | ||
* Go to Point Of Sale / Configuration / Settings | ||
* Check the box 'Display Default Code' in PoS Interface section | ||
|
||
.. image:: ../static/description/config.png | ||
:width: 800 px |
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 @@ | ||
* Juan Carlos Bonilla <[email protected]> |
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,5 @@ | ||
This module makes Odoo show the internal reference of the product in the Point of Sale. | ||
|
||
The reference will appear in the products list, in the orderlines and in the receipt. | ||
|
||
example: Desk Organizer -> [FURN_0001] Desk Organizer |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.