Skip to content

Commit

Permalink
Merge e714bb8 into b0af705
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Oct 14, 2019
2 parents b0af705 + e714bb8 commit 2baf7c9
Show file tree
Hide file tree
Showing 13 changed files with 732 additions and 0 deletions.
94 changes: 94 additions & 0 deletions uom_unece/README.rst
@@ -0,0 +1,94 @@
=================
Product UoM UNECE
=================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fcommunity--data--files-lightgray.png?logo=github
:target: https://github.com/OCA/community-data-files/tree/13.0/uom_unece
:alt: OCA/community-data-files
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/community-data-files-13-0/community-data-files-13-0-uom_unece
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/101/13.0
:alt: Try me on Runbot

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

This module adds a field *UNECE Code* on units of measure to allow the use of
a standard written by the
`United Nations Economic Commission for Europe <http://www.unece.org>`_ (which
has 56 members states in Europe, America and Central Asia, cf
`Wikipedia <https://en.wikipedia.org/wiki/United_Nations_Economic_Commission_for_Europe>`_).
The codification of the units of measures are defined in
`UNECE/CEFACT Trade Facilitation Recommendation number 20 <http://www.unece.org/tradewelcome/un-centre-for-trade-facilitation-and-e-business-uncefact/outputs/cefactrecommendationsrec-index/list-of-trade-facilitation-recommendations-n-16-to-20.html>`_
(`direct link <http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_Rev12e_2016.xls>`_ to revision 12).

This codification is used for example in the two main international standards
for electronic invoicing:

* `Cross Industry Invoice <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`_ (CII),
* `Universal Business Language <http://ubl.xml.org/>`_ (UBL).

**Table of contents**

.. contents::
:local:

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

This module automatically adds the UNECE Code on the existing units of measure.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/community-data-files/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/community-data-files/issues/new?body=module:%20uom_unece%0Aversion:%2013.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
~~~~~~~~~~~~

* Alexis de Lattre <alexis.delattre@akretion.com>
* Andrea Stirpe
* Levent Karakaş <leventk@eskayazilim.com.tr>
* Pedro M. Baeza

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/community-data-files <https://github.com/OCA/community-data-files/tree/13.0/uom_unece>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions uom_unece/__init__.py
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions uom_unece/__manifest__.py
@@ -0,0 +1,18 @@
# Copyright 2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Product UoM UNECE",
"version": "13.0.1.0.0",
"category": "Sales",
"license": "AGPL-3",
"development_status": "Production/Stable",
"summary": "UNECE nomenclature for the units of measure",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["astirpe"],
"website": "https://github.com/OCA/community-data-files/",
"depends": ["uom"],
"data": ["data/unece.xml", "views/product_uom.xml"],
"installable": True,
}
80 changes: 80 additions & 0 deletions uom_unece/data/unece.xml
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="0">

<record id="uom.product_uom_unit" model="uom.uom">
<field name="unece_code">C62</field>
</record>

<record id="uom.product_uom_dozen" model="uom.uom">
<field name="unece_code">DPC</field>
</record>

<record id="uom.product_uom_kgm" model="uom.uom">
<field name="unece_code">KGM</field>
</record>

<record id="uom.product_uom_gram" model="uom.uom">
<field name="unece_code">GRM</field>
</record>

<record id="uom.product_uom_hour" model="uom.uom">
<field name="unece_code">HUR</field>
</record>

<record id="uom.product_uom_day" model="uom.uom">
<field name="unece_code">DAY</field>
</record>

<record id="uom.product_uom_ton" model="uom.uom">
<field name="unece_code">TNE</field>
</record>

<record id="uom.product_uom_meter" model="uom.uom">
<field name="unece_code">MTR</field>
</record>

<record id="uom.product_uom_km" model="uom.uom">
<field name="unece_code">KTM</field>
</record>

<record id="uom.product_uom_cm" model="uom.uom">
<field name="unece_code">CMT</field>
</record>

<record id="uom.product_uom_litre" model="uom.uom">
<field name="unece_code">LTR</field>
</record>

<record id="uom.product_uom_lb" model="uom.uom">
<field name="unece_code">LBR</field>
</record>

<record id="uom.product_uom_oz" model="uom.uom">
<field name="unece_code">ONZ</field>
</record>

<record id="uom.product_uom_inch" model="uom.uom">
<field name="unece_code">INH</field>
</record>

<record id="uom.product_uom_foot" model="uom.uom">
<field name="unece_code">FOT</field>
</record>

<record id="uom.product_uom_mile" model="uom.uom">
<field name="unece_code">SMI</field>
</record>

<record id="uom.product_uom_floz" model="uom.uom">
<field name="unece_code">OZA</field>
</record>

<record id="uom.product_uom_qt" model="uom.uom">
<field name="unece_code">QT</field>
</record>

<record id="uom.product_uom_gal" model="uom.uom">
<field name="unece_code">GLL</field>
</record>

</odoo>
30 changes: 30 additions & 0 deletions uom_unece/i18n/uom_unece.pot
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * uom_unece
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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: uom_unece
#: model:ir.model,name:uom_unece.model_uom_uom
msgid "Product Unit of Measure"
msgstr ""

#. module: uom_unece
#: model:ir.model.fields,help:uom_unece.field_uom_uom__unece_code
msgid "Standard nomenclature of the United Nations Economic Commission for Europe (UNECE)."
msgstr ""

#. module: uom_unece
#: model:ir.model.fields,field_description:uom_unece.field_uom_uom__unece_code
msgid "UNECE Code"
msgstr ""

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

from . import uom_uom
15 changes: 15 additions & 0 deletions uom_unece/models/uom_uom.py
@@ -0,0 +1,15 @@
# Copyright 2016 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class UomUom(models.Model):
_inherit = "uom.uom"

unece_code = fields.Char(
string="UNECE Code",
help="Standard nomenclature of the United Nations Economic "
"Commission for Europe (UNECE).",
)
1 change: 1 addition & 0 deletions uom_unece/readme/CONFIGURE.rst
@@ -0,0 +1 @@
This module automatically adds the UNECE Code on the existing units of measure.
4 changes: 4 additions & 0 deletions uom_unece/readme/CONTRIBUTORS.rst
@@ -0,0 +1,4 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Andrea Stirpe
* Levent Karakaş <leventk@eskayazilim.com.tr>
* Pedro M. Baeza
14 changes: 14 additions & 0 deletions uom_unece/readme/DESCRIPTION.rst
@@ -0,0 +1,14 @@
This module adds a field *UNECE Code* on units of measure to allow the use of
a standard written by the
`United Nations Economic Commission for Europe <http://www.unece.org>`_ (which
has 56 members states in Europe, America and Central Asia, cf
`Wikipedia <https://en.wikipedia.org/wiki/United_Nations_Economic_Commission_for_Europe>`_).
The codification of the units of measures are defined in
`UNECE/CEFACT Trade Facilitation Recommendation number 20 <http://www.unece.org/tradewelcome/un-centre-for-trade-facilitation-and-e-business-uncefact/outputs/cefactrecommendationsrec-index/list-of-trade-facilitation-recommendations-n-16-to-20.html>`_
(`direct link <http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_Rev12e_2016.xls>`_ to revision 12).

This codification is used for example in the two main international standards
for electronic invoicing:

* `Cross Industry Invoice <http://tfig.unece.org/contents/cross-industry-invoice-cii.htm>`_ (CII),
* `Universal Business Language <http://ubl.xml.org/>`_ (UBL).
Binary file added uom_unece/static/description/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2baf7c9

Please sign in to comment.