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

[17.0][MIG] barcodes generator package: Migration to 17.0 #643

Open
wants to merge 10 commits into
base: 17.0
Choose a base branch
from
147 changes: 147 additions & 0 deletions barcodes_generator_package/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
===============================
Generate Barcodes for Packaging
===============================

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

.. |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/17.0/barcodes_generator_package
: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-17-0/stock-logistics-barcode-17-0-barcodes_generator_package
: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=17.0
:alt: Try me on Runboat

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

This module expands Odoo functionality, allowing user to generate
barcode depending on a given barcode rule for Product Packaging.

For example, a typical pattern for partners is "042........." that means
that: \* the EAN13 code will begin by '042' \* followed by 0 digits
(named Barcode Base in this module) \* a 13 digit control

With this module, it is possible to:

- Affect a pattern (barcode.rule) to a product.packaging

- Define a Barcode base:

- manually, if the base of the barcode must be set by a user.
(typically an internal code defined in your company)
- automatically by a sequence, if you want to let Odoo to increment
a sequence. (typical case of a customer number incrementation)

- Generate a barcode, based on the defined pattern and the barcode base

**Table of contents**

.. contents::
:local:

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

To configure this module, see the 'Configuration' Section of the
description of the module 'barcodes_generator_abstract'

Usage
=====

To use this module, you need to:

- Go to a Packaging form:

1 for manual generation

- Set a Barcode Rule
- Set a Barcode Base
- click on the button 'Generate Barcode'

2 for automatic generation

- Set a Barcode Rule
- click on the button 'Generate Base'
- click on the button 'Generate Barcode'

|image|

.. |image| image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/17.0/barcodes_generator_package/static/description/product_packaging_sequence_generation.png

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:%20barcodes_generator_package%0Aversion:%2017.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
-------

* LasLabs
* GRAP

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

- Dave Lasley <dave@laslabs.com>

- `Studio73 <https://www.studio73.es>`__:

- Raúl Menéndez <raul@studio73.es>

- Sylvain LE GAL (https://twitter.com/legalsylvain)

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

- Icon of the module is based on the Oxygen Team work and is under LGPL
licence:
http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html
- Package image in icon is licensed under GPL & provided by Gnome Web
Icons.

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.

.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-legalsylvain|

This module is part of the `OCA/stock-logistics-barcode <https://github.com/OCA/stock-logistics-barcode/tree/17.0/barcodes_generator_package>`_ 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 barcodes_generator_package/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
25 changes: 25 additions & 0 deletions barcodes_generator_package/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2016-2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Generate Barcodes for Packaging",
"summary": "Generate Barcodes for Product Packaging",
"version": "17.0.1.0.0",
"category": "Tools",
"author": "LasLabs, GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/stock-logistics-barcode",
"license": "AGPL-3",
"depends": [
"barcodes_generator_abstract",
"stock",
],
"data": [
"views/product_packaging.xml",
],
"demo": [
"demo/ir_sequence.xml",
"demo/barcode_rule.xml",
"demo/product_packaging.xml",
],
}
23 changes: 23 additions & 0 deletions barcodes_generator_package/demo/barcode_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2016-2017 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="rule_package" model="barcode.rule">
<field name="name">Packaging Rule (Generated Barcode)</field>
<field
name="barcode_nomenclature_id"
ref="barcodes.default_barcode_nomenclature"
/>
<field name="type">package</field>
<field name="sequence">998</field>
<field name="encoding">ean13</field>
<field name="pattern">123.........</field>
<field name="generate_type" eval="'sequence'" />
<field name="generate_model" eval="'product.packaging'" />
<field name="sequence_id" ref="product_packaging_ir_sequence" />
</record>

</odoo>
14 changes: 14 additions & 0 deletions barcodes_generator_package/demo/ir_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2016 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="product_packaging_ir_sequence" model="ir.sequence">
<field name="name">Packaging Sequence (Generated Barcode)</field>
<field name="padding">10</field>
<field name="number_next">1</field>
</record>

</odoo>
13 changes: 13 additions & 0 deletions barcodes_generator_package/demo/product_packaging.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2016 LasLabs Inc.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="demo_package" model="product.packaging">
<field name="name">Packaging with Generated Barcode</field>
<field name="product_id" ref="product.product_product_5" />
</record>

</odoo>
87 changes: 87 additions & 0 deletions barcodes_generator_package/i18n/barcodes_generator_package.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * barcodes_generator_package
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: barcodes_generator_package
#: model:ir.model.fields,help:barcodes_generator_package.field_product_packaging__generate_type
msgid ""
"Allow to generate barcode, including a number (a base) in the final barcode.\n"
"\n"
" - 'Base Set Manually' : User should set manually the value of the barcode base\n"
" - 'Base managed by Sequence': System will generate the base via a sequence"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,field_description:barcodes_generator_package.field_product_packaging__barcode_base
msgid "Barcode Base"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model,name:barcodes_generator_package.model_barcode_rule
#: model:ir.model.fields,field_description:barcodes_generator_package.field_product_packaging__barcode_rule_id
msgid "Barcode Rule"
msgstr ""

#. module: barcodes_generator_package
#: model_terms:ir.ui.view,arch_db:barcodes_generator_package.product_packaging_form_view
msgid "Generate Barcode"
msgstr ""

#. module: barcodes_generator_package
#: model_terms:ir.ui.view,arch_db:barcodes_generator_package.product_packaging_form_view
msgid "Generate Barcode (Using Barcode Rule)"
msgstr ""

#. module: barcodes_generator_package
#: model_terms:ir.ui.view,arch_db:barcodes_generator_package.product_packaging_form_view
msgid "Generate Base"
msgstr ""

#. module: barcodes_generator_package
#: model_terms:ir.ui.view,arch_db:barcodes_generator_package.product_packaging_form_view
msgid "Generate Base (Using Sequence)"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,field_description:barcodes_generator_package.field_barcode_rule__generate_model
msgid "Generate Model"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,field_description:barcodes_generator_package.field_product_packaging__generate_type
msgid "Generate Type"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,help:barcodes_generator_package.field_barcode_rule__generate_model
msgid "If 'Generate Type' is set, mention the model related to this rule."
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model,name:barcodes_generator_package.model_product_packaging
#: model:ir.model.fields.selection,name:barcodes_generator_package.selection__barcode_rule__generate_model__product_packaging
msgid "Product Packaging"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,help:barcodes_generator_package.field_product_packaging__barcode_rule_id
msgid "Select a rule to generate a barcode"
msgstr ""

#. module: barcodes_generator_package
#: model:ir.model.fields,help:barcodes_generator_package.field_product_packaging__barcode_base
msgid ""
"This value is used to generate barcode according to the setting of the "
"barcode rule."
msgstr ""
Loading
Loading