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

[15.0][MIG] stock_barcodes_gs1_secondary_unit: Migration to version 15.0 #496

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5cfd7ef
[ADD] stock_barcodes_gs1_secondary_unit: New module
sergio-teruel Feb 9, 2021
2280362
[FIX] stock_barcodes_gs1_secondary_unit: Use hook for extra filter sml
sergio-teruel Nov 2, 2021
7da41b6
[IMP] stock_barcodes_gs1_secondary_unit: Hide field secondary_uom
sergio-teruel Nov 9, 2021
c481a2f
[IMP] stock_barcodes_gs1_secondary_unit: View improvements
sergio-teruel Nov 10, 2021
426cdd5
[IMP] stock_barcodes_gs1_secondary_unit: comment tests
sergio-teruel Nov 10, 2021
3dacf51
[IMP] stock_barcodes_gs1_secondary_unit: Single qty and improve views
sergio-teruel Mar 15, 2022
6320dcf
[IMP] stock_barcodes_gs1_secondary_unit: Extend view from base instea…
sergio-teruel Mar 28, 2022
e3ab915
[IMP] stock_barcodes_gs1_secondary_unit: set secondary uom on product…
sergio-teruel Mar 30, 2022
8605112
[IMP] stock_barcodes_gs1_secondary_unit: Set focus on secondary_uom_q…
sergio-teruel Mar 30, 2022
a7baf3d
[IMP] stock_barcodes_gs1_secondary_unit: Clean values after confirmat…
sergio-teruel Mar 30, 2022
a1e725b
[IMP] stock_barcodes_gs1_secondary_unit: Make product uom not readonly
sergio-teruel Apr 6, 2022
30adf35
[FIX] stock_barcodes_gs1_secondary_unit: Error on pre-commit
CarlosRoca13 Jun 15, 2022
61b2b4c
[IMP] stock_barcodes_gs1_secondary_unit: black, isort
sergio-teruel Feb 16, 2023
4cf4a5e
[MIG] stock_barcodes_gs1_secondary_unit: Migration to v15.0
sergio-teruel Feb 16, 2023
34dfc96
[IMP] stock_barcodes_gs1_secondary_unit: Clean views
sergio-teruel Mar 27, 2023
cb0aeb7
[IMP] stock_barcodes_gs1_secondary_unit: more secondary uom info in b…
sergio-teruel Apr 27, 2023
b25e0a6
[IMP] stock_barcodes_gs1_secondary_unit: Display secondary unit info …
sergio-teruel May 9, 2023
a1a0442
[IMP] stock_barcodes_gs1_secondary_unit: Do not reset de secondary un…
sergio-teruel May 11, 2023
99a755c
[IMP] stock_barcodes_gs1_secondary_unit: Add optional="show" in pendi…
carlosdauden May 30, 2023
a8b6617
[FIX] stock_barcodes_gs1_secondary_unit: compute secondary qty
sergio-teruel Jun 12, 2023
aafd4ad
[FIX] stock_barcodes_gs1_secondary_unit: fill secondary uom qty in de…
sergio-teruel Jun 13, 2023
7754cbb
[IMP] stock_barcodes_gs1_secondary_unit: Better inheritance of qty focus
sergio-teruel Sep 4, 2023
29510bf
[IMP] stock_barcodes_gs1_secondary_unit: Inherit group key for read t…
sergio-teruel Oct 23, 2023
127855a
[IMP] stock_barcodes_gs1_secondary_unit: Adapt to refactored stock_ba…
sergio-teruel Oct 26, 2023
c13f6f0
[IMP] stock_barcodes_gs1_secondary_unit: Adapt to refactored stock_ba…
sergio-teruel Oct 26, 2023
44bc64e
[IMP] stock_barcodes_gs1_secondary_unit: removed filled fields method…
sergio-teruel Oct 31, 2023
18d9be1
[FIX] stock_barcodes_gs1_secondary_unit: remove state from domain
sergio-teruel Nov 16, 2023
f588091
[IMP] stock_barcodes_gs1_secondary_unit: Use product secondary mixin
sergio-teruel Nov 23, 2023
3911bcf
[IMP] stock_barcodes_gs1_secondary_unit: Hide secondary qty if not se…
sergio-teruel Dec 15, 2023
2b77c1e
[IMP] stock_barcodes_gs1_secondary_unit: Require secondary_uom_id whe…
carlosdauden Jan 6, 2024
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
6 changes: 6 additions & 0 deletions setup/stock_barcodes_gs1_secondary_unit/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
85 changes: 85 additions & 0 deletions stock_barcodes_gs1_secondary_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
=================================
Stock Barcodes GS1 Secondary Unit
=================================

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

.. |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%2Fstock--logistics--barcode-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_gs1_secondary_unit
:alt: OCA/stock-logistics-barcode
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-barcode-15-0/stock-logistics-barcode-15-0-stock_barcodes_gs1_secondary_unit
: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/stock-logistics-barcode&target_branch=15.0
:alt: Try me on Runboat

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

This module extends barcode reader GS1 interface module to allow to read
package barcodes from secondary units model.

**Table of contents**

.. contents::
:local:

Usage
=====

Read usage section from stock_barcodes module.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-barcode/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/stock-logistics-barcode/issues/new?body=module:%20stock_barcodes_gs1_secondary_unit%0Aversion:%2015.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
~~~~~~~

* Tecnativa

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


* `Tecnativa <https://www.tecnativa.com>`_:

* Sergio Teruel

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/stock-logistics-barcode <https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_gs1_secondary_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions stock_barcodes_gs1_secondary_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2019 Sergio Teruel <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
from . import wizard
20 changes: 20 additions & 0 deletions stock_barcodes_gs1_secondary_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2019 Sergio Teruel <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Barcodes GS1 Secondary Unit",
"summary": "It provides read package from GS1 barcode stored "
"into secondary unit data.",
"version": "15.0.1.0.0",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-barcode",
"license": "AGPL-3",
"category": "Extra Tools",
"depends": ["stock_barcodes_gs1", "stock_secondary_unit"],
"data": [
"views/product_views.xml",
"wizard/stock_barcodes_read_picking_views.xml",
"wizard/stock_barcodes_read_todo_view.xml",
],
"installable": True,
"auto_install": True,
}
102 changes: 102 additions & 0 deletions stock_barcodes_gs1_secondary_unit/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_barcodes_gs1_secondary_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-27 17:43+0000\n"
"PO-Revision-Date: 2023-04-27 19:44+0200\n"
"Last-Translator: Sergio Teruel <[email protected]>\n"
"Language-Team: \n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_product_secondary_unit__barcode
msgid "Barcode"
msgstr "Código de barras"

#. module: stock_barcodes_gs1_secondary_unit
#: code:addons/stock_barcodes_gs1_secondary_unit/wizard/stock_barcodes_read.py:0
#, python-format
msgid "Barcode for product secondary uom not found"
msgstr "No se han encontrado unidades secundarias para este código de barras"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,help:stock_barcodes_gs1_secondary_unit.field_product_secondary_unit__barcode
msgid "International Article Number used for product identification."
msgstr "Número de artículo internacional usado para la identificación de producto."

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_stock_barcodes_read_log
msgid "Log barcode scanner"
msgstr "Registro de lecturas"

#. module: stock_barcodes_gs1_secondary_unit
#: code:addons/stock_barcodes_gs1_secondary_unit/wizard/stock_barcodes_read.py:0
#, python-format
msgid "More than one secondary uom found"
msgstr "Se ha encontrado más de una unidad secundaria para este código de barras"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_product_secondary_unit
msgid "Product Secondary Unit"
msgstr "Unidad Secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__product_tmpl_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__product_tmpl_id
msgid "Product Template"
msgstr "Plantilla de producto"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_todo__secondary_uom_id
msgid "Second unit"
msgstr "Unidad secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_todo__secondary_uom_qty
msgid "Secondary Qty"
msgstr "Cdad. secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_stock_barcodes_read_log__secondary_uom_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_uom_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_uom_qty
msgid "Secondary UOM Qty"
msgstr "Cta. Ud. secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_single_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_single_qty
msgid "Secondary single Qty"
msgstr "Cta. Ud. secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_stock_barcodes_read_log__secondary_uom_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_uom_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_uom_id
#: model_terms:ir.ui.view,arch_db:stock_barcodes_gs1_secondary_unit.view_stock_barcodes_read_form
msgid "Secondary uom"
msgstr "Unidad Secundaria"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read
msgid "Wizard to read barcode"
msgstr "Asistente para leer códigos de barras"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read_picking
msgid "Wizard to read barcode on picking"
msgstr "Asistente para leer códigos de barras desde los albaranes"

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read_todo
msgid "Wizard to read barcode todo"
msgstr "Asistente para leer códigos de barras"
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_barcodes_gs1_secondary_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-27 17:43+0000\n"
"PO-Revision-Date: 2023-04-27 17:43+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: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_product_secondary_unit__barcode
msgid "Barcode"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: code:addons/stock_barcodes_gs1_secondary_unit/wizard/stock_barcodes_read.py:0
#, python-format
msgid "Barcode for product secondary uom not found"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,help:stock_barcodes_gs1_secondary_unit.field_product_secondary_unit__barcode
msgid "International Article Number used for product identification."
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_stock_barcodes_read_log
msgid "Log barcode scanner"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: code:addons/stock_barcodes_gs1_secondary_unit/wizard/stock_barcodes_read.py:0
#, python-format
msgid "More than one secondary uom found"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_product_secondary_unit
msgid "Product Secondary Unit"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__product_tmpl_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__product_tmpl_id
msgid "Product Template"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_todo__secondary_uom_id
msgid "Second unit"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_todo__secondary_uom_qty
msgid "Secondary Qty"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_stock_barcodes_read_log__secondary_uom_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_uom_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_uom_qty
msgid "Secondary UOM Qty"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_single_qty
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_single_qty
msgid "Secondary single Qty"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_stock_barcodes_read_log__secondary_uom_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read__secondary_uom_id
#: model:ir.model.fields,field_description:stock_barcodes_gs1_secondary_unit.field_wiz_stock_barcodes_read_picking__secondary_uom_id
#: model_terms:ir.ui.view,arch_db:stock_barcodes_gs1_secondary_unit.view_stock_barcodes_read_form
msgid "Secondary uom"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read
msgid "Wizard to read barcode"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read_picking
msgid "Wizard to read barcode on picking"
msgstr ""

#. module: stock_barcodes_gs1_secondary_unit
#: model:ir.model,name:stock_barcodes_gs1_secondary_unit.model_wiz_stock_barcodes_read_todo
msgid "Wizard to read barcode todo"
msgstr ""
5 changes: 5 additions & 0 deletions stock_barcodes_gs1_secondary_unit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2019 Sergio Teruel <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import product_second_unit
from . import stock_barcodes_read_log
from . import stock_move_line
13 changes: 13 additions & 0 deletions stock_barcodes_gs1_secondary_unit/models/product_second_unit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class ProductSecondaryUnit(models.Model):
_inherit = "product.secondary.unit"

barcode = fields.Char(
copy=False,
index=True,
help="International Article Number used for product identification.",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2019 Sergio Teruel <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models


class StockBarcodesReadLog(models.Model):
_inherit = "stock.barcodes.read.log"

secondary_uom_id = fields.Many2one(
comodel_name="product.secondary.unit",
string="Secondary uom",
)
secondary_uom_qty = fields.Float(
string="Secondary UOM Qty", digits="Product Unit of Measure"
)
12 changes: 12 additions & 0 deletions stock_barcodes_gs1_secondary_unit/models/stock_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2019 Sergio Teruel <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models


class StockMoveLine(models.Model):
_inherit = "stock.move.line"

def _barcodes_process_line_to_unlink(self):
res = super()._barcodes_process_line_to_unlink()
self.secondary_uom_qty = 0.0
return res

Check warning on line 12 in stock_barcodes_gs1_secondary_unit/models/stock_move_line.py

View check run for this annotation

Codecov / codecov/patch

stock_barcodes_gs1_secondary_unit/models/stock_move_line.py#L10-L12

Added lines #L10 - L12 were not covered by tests
4 changes: 4 additions & 0 deletions stock_barcodes_gs1_secondary_unit/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

* `Tecnativa <https://www.tecnativa.com>`_:

* Sergio Teruel
2 changes: 2 additions & 0 deletions stock_barcodes_gs1_secondary_unit/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends barcode reader GS1 interface module to allow to read
package barcodes from secondary units model.
1 change: 1 addition & 0 deletions stock_barcodes_gs1_secondary_unit/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Read usage section from stock_barcodes module.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading