Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dd766a9
[ADD] pos_product_display_default_code
Jun 7, 2022
bcc224a
[MIG]pos_product_display_default_code: Migration to 15.0
manuelregidor Oct 27, 2022
2188d95
[MIG] pos_product_display_default_code: Migration to 16.0
suker Feb 14, 2023
ceb8e27
[ADD] adding a pos.config parameter 'display_default_code' to enable/…
suker Feb 14, 2023
677404a
[UPD] Update pos_product_display_default_code.pot
Feb 17, 2023
5823330
[UPD] README.rst
OCA-git-bot Feb 17, 2023
f618f5f
Added translation using Weblate (Italian)
mymage Mar 9, 2023
e7fa14a
Translated using Weblate (Italian)
mymage Mar 9, 2023
659e0ea
[UPD] README.rst
OCA-git-bot Sep 3, 2023
815695e
[REF] pos_*: Use setUpClass for test that inherit from TestPoSCommon
legalsylvain Feb 21, 2025
ee536df
[BOT] post-merge updates
OCA-git-bot Feb 21, 2025
51a6cbd
Added translation using Weblate (German)
baguenth Oct 22, 2025
914d149
Translated using Weblate (German)
baguenth Oct 22, 2025
85d08ac
[IMP] pos_product_display_default_code: pre-commit auto fixes
cvinh Dec 17, 2025
a358f93
[MIG] pos_product_display_default_code: Migration to 18.0
cvinh Dec 17, 2025
7764937
[UPD] Update pos_product_display_default_code.pot
Mar 19, 2026
52db361
[BOT] post-merge updates
OCA-git-bot Mar 19, 2026
30de976
[FIX] pos_product_display_default_code: skip opening control in test …
cristina-hidalgo-tecnativa Apr 18, 2026
ea318da
[BOT] post-merge updates
OCA-git-bot Apr 18, 2026
79c1915
Translated using Weblate (Spanish)
Ed-Spain May 10, 2026
e930f34
[MIG] pos_product_display_default_code: Migration to 19.0
prayagrk Aug 6, 2026
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
100 changes: 100 additions & 0 deletions pos_product_display_default_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================
PoS Product Display Default Code
================================

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

.. |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/license-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/19.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-19-0/pos-19-0-pos_product_display_default_code
: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=19.0
:alt: Try me on Runboat

|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 -> [FURN0001] Desk Organizer

**Table of contents**

.. contents::
:local:

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

- Go to Point Of Sale / Configuration / Settings
- Check the box 'Display Default Code' in Product & PoS categories

|image|

.. |image| image:: https://raw.githubusercontent.com/OCA/pos/19.0/pos_product_display_default_code/static/description/config.png

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_product_display_default_code%0Aversion:%2019.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
* FactorLibre

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

- Juan Carlos Bonilla <juancarlos.bonilla@factorlibre.com>
- CIT-Services <<cit-services.eu>>

- Prayag <prayag.k@cit-services.eu>

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/19.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.
2 changes: 2 additions & 0 deletions pos_product_display_default_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2023 FactorLibre - Juan Carlos Bonilla
from . import models
27 changes: 27 additions & 0 deletions pos_product_display_default_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "PoS Product Display Default Code",
"summary": "pos: display product default code before product name",
"version": "19.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",
],
"assets": {
"web.assets_tests": [
"pos_product_display_default_code/static/tests/pos/tours/**/*",
],
"point_of_sale._assets_pos": [
"pos_product_display_default_code/static/src/product_display.esm.js",
],
},
"demo": [],
"qweb": [],
}
46 changes: 46 additions & 0 deletions pos_product_display_default_code/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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"
"PO-Revision-Date: 2025-10-22 10:42+0000\n"
"Last-Translator: Bastian Günther <mail@bastian-guenther.de>\n"
"Language-Team: none\n"
"Language: de\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.10.4\n"

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

#. 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 "Standardcode anzeigen"

#. 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 ""
"Interne Referenz der Produkte in der PoS-Oberfläche und auf den Belegen "
"anzeigen."

#. module: pos_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Kassensystem-Konfiguration"

#. module: pos_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_pos_session
msgid "Point of Sale Session"
msgstr "Kassensitzung"
46 changes: 46 additions & 0 deletions pos_product_display_default_code/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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: 2026-05-10 17:55+0000\n"
"Last-Translator: Ed-Spain <eduamoros@gmail.com>\n"
"Language-Team: \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 5.15.2\n"

#. module: pos_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_res_config_settings
msgid "Config Settings"
msgstr "Configurar ajustes"

#. 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"
45 changes: 45 additions & 0 deletions pos_product_display_default_code/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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"
"PO-Revision-Date: 2023-03-09 13:22+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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.14.1\n"

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

#. 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 "Visualizza codice predefinito"

#. 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 ""
"Visualizza riferimento interno del prodotto nell'interfaccia e scontrini PoS."

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

#. module: pos_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_pos_session
msgid "Point of Sale Session"
msgstr "Sessione punto vendita"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 18.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_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_res_config_settings
msgid "Config Settings"
msgstr ""

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

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

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

#. module: pos_product_display_default_code
#: model:ir.model,name:pos_product_display_default_code.model_product_product
msgid "Product Variant"
msgstr ""
5 changes: 5 additions & 0 deletions pos_product_display_default_code/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2023 FactorLibre - Juan Carlos Bonilla
from . import product_product
from . import product_template
from . import pos_config
from . import res_config_settings
10 changes: 10 additions & 0 deletions pos_product_display_default_code/models/pos_config.py
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 PosConfig(models.Model):
_inherit = "pos.config"

display_default_code = fields.Boolean(
default=False, help="Display default code along with name inside PoS."
)
13 changes: 13 additions & 0 deletions pos_product_display_default_code/models/product_product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, models


class ProductProduct(models.Model):
_inherit = "product.product"

@api.model
def _load_pos_data_read(self, records, config):
if config.display_default_code:
records = records.with_context(display_default_code=True)
else:
records = records.with_context(display_default_code=False)
return super()._load_pos_data_read(records, config)
13 changes: 13 additions & 0 deletions pos_product_display_default_code/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from odoo import api, models


class ProductTemplate(models.Model):
_inherit = "product.template"

@api.model
def _load_pos_data_read(self, records, config):
if config.display_default_code:
records = records.with_context(display_default_code=True)
else:
records = records.with_context(display_default_code=False)
return super()._load_pos_data_read(records, config)
10 changes: 10 additions & 0 deletions pos_product_display_default_code/models/res_config_settings.py
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
)
3 changes: 3 additions & 0 deletions pos_product_display_default_code/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions pos_product_display_default_code/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Go to Point Of Sale / Configuration / Settings
- Check the box 'Display Default Code' in Product & PoS categories

![image](../static/description/config.png)
3 changes: 3 additions & 0 deletions pos_product_display_default_code/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Juan Carlos Bonilla \<<juancarlos.bonilla@factorlibre.com>\>
- CIT-Services \<<cit-services.eu>\>
- Prayag \<<prayag.k@cit-services.eu>\>
7 changes: 7 additions & 0 deletions pos_product_display_default_code/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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 -\> \[FURN0001\] 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.
Loading
Loading