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

[16.0][MIG] pos_product_multi_barcode: Migration to 16.0 #1037

Merged
merged 13 commits into from
Nov 16, 2023
Merged
86 changes: 86 additions & 0 deletions pos_product_multi_barcode/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
=========================
PoS Product multi barcode
=========================

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

.. |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_multi_barcode
: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_multi_barcode
: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=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to use multiple barcode on a product from the PoS

See https://github.com/OCA/stock-logistics-barcode/tree/14.0/product_multi_barcode

**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_product_multi_barcode%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

Contributors
~~~~~~~~~~~~

* Ooops404 <https://ooops404.com>

* Ilyas <irazor147@gmail.com>
* Nguyen Minh Chien <chien@trobz.com>

Other credits
~~~~~~~~~~~~~

The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp

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_multi_barcode>`_ 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_product_multi_barcode/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions pos_product_multi_barcode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "PoS Product multi barcode",
"summary": "Make product multi barcodes usable in the point of sale",
"version": "16.0.1.0.0",
"category": "Point of Sale",
"website": "https://github.com/OCA/pos",
"author": "Akretion, Odoo Community Association (OCA)",
"maintainer": "PierrickBrun",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"point_of_sale",
"product_multi_barcode",
],
"assets": {
"point_of_sale.assets": [
"pos_product_multi_barcode/static/src/js/db.js",
]
},
"demo": [],
"qweb": [],
}
42 changes: 42 additions & 0 deletions pos_product_multi_barcode/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_product_multi_barcode
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-03-16 16:32+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_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__id
msgid "ID"
msgstr "ID"

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: pos_product_multi_barcode
#: model:ir.model,name:pos_product_multi_barcode.model_product_product
msgid "Product"
msgstr "Prodotto"

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__barcodes_json
msgid "barcode list"
msgstr "elenco codici a barre"
39 changes: 39 additions & 0 deletions pos_product_multi_barcode/i18n/pos_product_multi_barcode.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_product_multi_barcode
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__display_name
msgid "Display Name"
msgstr ""

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__id
msgid "ID"
msgstr ""

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product____last_update
msgid "Last Modified on"
msgstr ""

#. module: pos_product_multi_barcode
#: model:ir.model,name:pos_product_multi_barcode.model_product_product
msgid "Product"
msgstr ""

#. module: pos_product_multi_barcode
#: model:ir.model.fields,field_description:pos_product_multi_barcode.field_product_product__barcodes_json
msgid "barcode list"
msgstr ""
2 changes: 2 additions & 0 deletions pos_product_multi_barcode/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_session
from . import product
12 changes: 12 additions & 0 deletions pos_product_multi_barcode/models/pos_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import models


class PosSession(models.Model):
_inherit = "pos.session"

def _loader_params_product_product(self):
result = super()._loader_params_product_product()
result["search_params"]["fields"].append("barcodes_json")
return result
21 changes: 21 additions & 0 deletions pos_product_multi_barcode/models/product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 Akretion (https://www.akretion.com).
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

import json

from odoo import fields, models


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

# technical field used in POS frontend
barcodes_json = fields.Char(
"barcode list", readonly=True, compute="_compute_barcodes_json"
)

def _compute_barcodes_json(self):
for product in self:
barcodes = [barcode for barcode in product.mapped("barcode_ids.name")]
product.barcodes_json = json.dumps(barcodes)
3 changes: 3 additions & 0 deletions pos_product_multi_barcode/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Pierrick Brun <pierrick.brun@akretion.com>
* Ilyas <irazor147@gmail.com>
* Nguyen Minh Chien <chien@trobz.com>
1 change: 1 addition & 0 deletions pos_product_multi_barcode/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The migration of this module from 14.0 to 16.0 was financially supported by Camptocamp
3 changes: 3 additions & 0 deletions pos_product_multi_barcode/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module allows to use multiple barcode on a product from the PoS

See https://github.com/OCA/stock-logistics-barcode/tree/14.0/product_multi_barcode
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading