Skip to content

Commit

Permalink
Merge b2e25f8 into 3227c5a
Browse files Browse the repository at this point in the history
  • Loading branch information
krunal267 committed Jan 30, 2020
2 parents 3227c5a + b2e25f8 commit 86f46eb
Show file tree
Hide file tree
Showing 25 changed files with 771 additions and 0 deletions.
104 changes: 104 additions & 0 deletions barcodes_generator_partner/README.rst
@@ -0,0 +1,104 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==============================
Generate Barcodes for Partners
==============================

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

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:

* Assign a pattern (barcode.rule) to a res.partner

* 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)
* automaticaly 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

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 Customer/Contact form, Sales & Purchases Tab:

1 for manual generation
* Set a Barcode Rule
* Set a Barcode Base
* click on the button 'Generate Barcode (Using Barcode Rule)'

2 for automatic generation
* Set a Barcode Rule
* click on the button 'Generate Base (Using Sequence)'
* click on the button 'Generate Barcode (Using Barcode Rule)'

.. image:: /barcodes_generator_partner/static/description/res_partner_sequence_generation.png
:width: 1100px

|
|
Try this module on Runbot

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/150/10.0

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 smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* 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
* Partner avatar in icon is licensed under GPL & provided by Gnome Web Icons.

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

* Sylvain LE GAL (https://twitter.com/legalsylvain)
* Dave Lasley <dave@laslabs.com>
* Druidoo <http://druidoo.io>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.

3 changes: 3 additions & 0 deletions barcodes_generator_partner/__init__.py
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
29 changes: 29 additions & 0 deletions barcodes_generator_partner/__manifest__.py
@@ -0,0 +1,29 @@
# Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
'name': 'Generate Barcodes for Partners',
'summary': 'Generate Barcodes for Partners',
'version': '12.0.1.0.0',
'category': 'Tools',
'author':
'GRAP,'
'La Louve,'
'Odoo Community Association (OCA)',
'website': 'https://www.odoo-community.org',
'license': 'AGPL-3',
'depends': [
'barcodes_generator_abstract',
],
'data': [
'views/view_res_partner.xml',
],
'demo': [
'demo/ir_sequence.xml',
'demo/barcode_rule.xml',
'demo/res_partner.xml',
'demo/function.xml',
],
}
23 changes: 23 additions & 0 deletions barcodes_generator_partner/demo/barcode_rule.xml
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo>

<record id="partner_generated_barcode" model="barcode.rule">
<field name="name">Partner Rule (Generated Barcode)</field>
<field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/>
<field name="type">client</field>
<field name="sequence">998</field>
<field name="encoding">ean13</field>
<field name="pattern">042.........</field>
<field name="generate_type" eval="'sequence'" />
<field name="generate_model" eval="'res.partner'" />
<field name="sequence_id" ref="partner_ir_sequence" />
</record>

</odoo>
14 changes: 14 additions & 0 deletions barcodes_generator_partner/demo/function.xml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<function model="res.partner" name="generate_base" eval="[ref('res_partner_barcode')]"/>

<function model="res.partner" name="generate_barcode" eval="[ref('res_partner_barcode')]"/>

</odoo>
17 changes: 17 additions & 0 deletions barcodes_generator_partner/demo/ir_sequence.xml
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo>

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

</odoo>
16 changes: 16 additions & 0 deletions barcodes_generator_partner/demo/res_partner.xml
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo>

<record id="res_partner_barcode" model="res.partner">
<field name="name">Partner with Generated Barcode</field>
<field name="barcode_rule_id" ref="partner_generated_barcode" />
</record>

</odoo>
57 changes: 57 additions & 0 deletions barcodes_generator_partner/i18n/barcodes_generator_partner.pot
@@ -0,0 +1,57 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * barcodes_generator_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.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_partner
#: model:ir.model.fields,help:barcodes_generator_partner.field_res_users_generate_type
msgid "Allow to generate barcode, including a number (a base) in the final barcode.\n"
" 'Base Set Manually' : User should set manually the value of the barcode base\n"
" 'Base managed by Sequence': User will use a button to generate a new base. This base will be generated by a sequence"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_barcode_base
msgid "Barcode Base"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_barcode_rule_id
msgid "Barcode Rule"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model,name:barcodes_generator_partner.model_res_partner
msgid "Contact"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.ui.view,arch_db:barcodes_generator_partner.view_res_partner_form
msgid "Generate Barcode (Using Barcode Rule)"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.ui.view,arch_db:barcodes_generator_partner.view_res_partner_form
msgid "Generate Base (Using Sequence)"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_generate_type
msgid "Generate Type"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model,name:barcodes_generator_partner.model_barcode_rule
msgid "barcode.rule"
msgstr ""

65 changes: 65 additions & 0 deletions barcodes_generator_partner/i18n/es.po
@@ -0,0 +1,65 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * barcodes_generator_partner
#
# Translators:
# enjolras <yo@miguelrevilla.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-15 02:01+0000\n"
"PO-Revision-Date: 2018-02-15 02:01+0000\n"
"Last-Translator: enjolras <yo@miguelrevilla.com>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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"

#. module: barcodes_generator_partner
#: model:ir.model.fields,help:barcodes_generator_partner.field_res_users_generate_type
msgid ""
"Allow to generate barcode, including a number (a base) in the final "
"barcode.\n"
" 'Base Set Manually' : User should set manually the value of the barcode "
"base\n"
" 'Base managed by Sequence': User will use a button to generate a new base. "
"This base will be generated by a sequence"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_barcode_base
msgid "Barcode Base"
msgstr "Base de código de barras"

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_barcode_rule_id
msgid "Barcode Rule"
msgstr "Regla de código de barras"

#. module: barcodes_generator_partner
#: model:ir.model,name:barcodes_generator_partner.model_res_partner
msgid "Contact"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.ui.view,arch_db:barcodes_generator_partner.view_res_partner_form
msgid "Generate Barcode (Using Barcode Rule)"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.ui.view,arch_db:barcodes_generator_partner.view_res_partner_form
msgid "Generate Base (Using Sequence)"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model.fields,field_description:barcodes_generator_partner.field_res_users_generate_type
msgid "Generate Type"
msgstr ""

#. module: barcodes_generator_partner
#: model:ir.model,name:barcodes_generator_partner.model_barcode_rule
msgid "barcode.rule"
msgstr "barcode.rule"

0 comments on commit 86f46eb

Please sign in to comment.