Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
97 changes: 97 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================================================================
Point of Sale - New barcode rule for priced product with change rate
====================================================================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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_barcode_rule_priced_with_change_rate
: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_barcode_rule_priced_with_change_rate
: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 adds a barcode rule to allow scanning barcodes with encoded
prices, similar to the standard "Priced Product" rule, while converting
the price according to a configured exchange rate.

**Table of contents**

.. contents::
:local:

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_barcode_rule_priced_with_change_rate%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
-------

* Camptocamp

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

- Camptocamp

- Camille Morand camille.morand@camptocamp.com

- Trobz

- Tris Doan tridm@trobz.com

- Niravrathod

- Nirav Rathod niravrathod473@gmail.com

Other credits
-------------



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_barcode_rule_priced_with_change_rate>`_ 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_barcode_rule_priced_with_change_rate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Point of Sale - New barcode rule for priced product with change rate",
"version": "19.0.1.0.0",
"category": "Sales/Point of Sale",
"summary": """
Add a barcode rule to be able to scan a barcode with price encoded (as the
standard "Priced Product" rule), and convert the price according to a given
change rate.
""",
"author": "Odoo Community Association (OCA), Camptocamp",
"website": "https://github.com/OCA/pos",
"depends": ["point_of_sale"],
"data": ["views/res_config_settings_views.xml"],
"assets": {
"point_of_sale._assets_pos": [
"pos_barcode_rule_priced_with_change_rate/static/src/**/*",
],
},
"installable": True,
"license": "AGPL-3",
"development_status": "Production/Stable",
}
47 changes: 47 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_barcode_rule_priced_with_change_rate
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-25 11:10+0000\n"
"PO-Revision-Date: 2025-03-25 11:10+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_barcode_rule_priced_with_change_rate
#: model:ir.model,name:pos_barcode_rule_priced_with_change_rate.model_barcode_rule
msgid "Barcode Rule"
msgstr "Règle de code-barres"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_pos_config__change_rate_barcode
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_res_config_settings__change_rate_barcode
msgid "Change rate for barcode nomenclature"
msgstr "Taux de change pour Nomenclature codes-barres"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model,name:pos_barcode_rule_priced_with_change_rate.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model,name:pos_barcode_rule_priced_with_change_rate.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Configuration du point de vente"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields.selection,name:pos_barcode_rule_priced_with_change_rate.selection__barcode_rule__type__price_change_rate
msgid "Priced Product with Change Rate"
msgstr "Produit à prix fixe avec taux de change"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_barcode_rule__type
msgid "Type"
msgstr ""
48 changes: 48 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_barcode_rule_priced_with_change_rate
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-04-11 14:54+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 5.10.4\n"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model,name:pos_barcode_rule_priced_with_change_rate.model_barcode_rule
msgid "Barcode Rule"
msgstr "Regola codice a barre"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_pos_config__change_rate_barcode
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_res_config_settings__change_rate_barcode
msgid "Change rate for barcode nomenclature"
msgstr "Tasso di cambio per la nomenclatura codice a barre"

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

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

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields.selection,name:pos_barcode_rule_priced_with_change_rate.selection__barcode_rule__type__price_change_rate
msgid "Priced Product with Change Rate"
msgstr "Prodotto prezzato con tasso di cambio"

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_barcode_rule__type
msgid "Type"
msgstr "Tipo"
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_barcode_rule_priced_with_change_rate
#
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_barcode_rule_priced_with_change_rate
#: model:ir.model,name:pos_barcode_rule_priced_with_change_rate.model_barcode_rule
msgid "Barcode Rule"
msgstr ""

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_pos_config__change_rate_barcode
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_res_config_settings__change_rate_barcode
msgid "Change rate for barcode nomenclature"
msgstr ""

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

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

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields.selection,name:pos_barcode_rule_priced_with_change_rate.selection__barcode_rule__type__price_change_rate
msgid "Priced Product with Change Rate"
msgstr ""

#. module: pos_barcode_rule_priced_with_change_rate
#: model:ir.model.fields,field_description:pos_barcode_rule_priced_with_change_rate.field_barcode_rule__type
msgid "Type"
msgstr ""
3 changes: 3 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import barcode_rule
from . import pos_config
from . import res_config_settings
13 changes: 13 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/models/barcode_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2024 Camptocamp SA (https://www.camptocamp.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class BarcodeRule(models.Model):
_inherit = "barcode.rule"

type = fields.Selection(
selection_add=[("price_change_rate", "Priced Product with Change Rate")],
ondelete={"price_change_rate": "set default"},
)
15 changes: 15 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2024 Camptocamp SA (https://www.camptocamp.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


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

change_rate_barcode = fields.Float(
string="Change rate for barcode nomenclature",
help="Conversion rate applied to the price encoded in a barcode "
"when using the 'Priced Product with Change Rate' rule. "
"The scanned price is divided by this rate.",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Camptocamp SA (https://www.camptocamp.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


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

change_rate_barcode = fields.Float(
related="pos_config_id.change_rate_barcode", readonly=False
)
3 changes: 3 additions & 0 deletions pos_barcode_rule_priced_with_change_rate/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Camptocamp
- Camille Morand <camille.morand@camptocamp.com>

- Trobz
- Tris Doan <tridm@trobz.com>

- Niravrathod
- Nirav Rathod <niravrathod473@gmail.com>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module adds a barcode rule to allow scanning barcodes with encoded prices,
similar to the standard "Priced Product" rule, while converting the price
according to a configured exchange rate.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading