UBL Integration
parent
656610cc6e
commit
c2b27b9fb7
|
|
@ -0,0 +1,58 @@
|
||||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||||
|
:target: https://www.gnu.org/licenses/agpl
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
=============================
|
||||||
|
Product Unit of Measure UNECE
|
||||||
|
=============================
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
This module automatically adds the UNECE Code on the existing units of measure.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/101/11.0
|
||||||
|
|
||||||
|
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 smash it by providing detailed and welcomed feedback.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from . import models
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# 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': '11.0.1.1.1',
|
||||||
|
'category': 'Sales',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'UNECE nomenclature for the units of measure',
|
||||||
|
'author': 'Akretion,Odoo Community Association (OCA)',
|
||||||
|
"website": "https://github.com/OCA/community-data-files",
|
||||||
|
'depends': ['product'],
|
||||||
|
'data': [
|
||||||
|
'data/unece.xml',
|
||||||
|
'views/product_uom.xml',
|
||||||
|
],
|
||||||
|
'installable': True,
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo noupdate="0">
|
||||||
|
|
||||||
|
|
||||||
|
<record id="product.product_uom_unit" model="product.uom">
|
||||||
|
<field name="unece_code">C62</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_dozen" model="product.uom">
|
||||||
|
<field name="unece_code">DPC</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_kgm" model="product.uom">
|
||||||
|
<field name="unece_code">KGM</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_gram" model="product.uom">
|
||||||
|
<field name="unece_code">GRM</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_hour" model="product.uom">
|
||||||
|
<field name="unece_code">HUR</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_day" model="product.uom">
|
||||||
|
<field name="unece_code">DAY</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_ton" model="product.uom">
|
||||||
|
<field name="unece_code">TNE</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_meter" model="product.uom">
|
||||||
|
<field name="unece_code">MTR</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_km" model="product.uom">
|
||||||
|
<field name="unece_code">KTM</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_cm" model="product.uom">
|
||||||
|
<field name="unece_code">CMT</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_litre" model="product.uom">
|
||||||
|
<field name="unece_code">LTR</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_lb" model="product.uom">
|
||||||
|
<field name="unece_code">LBR</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_oz" model="product.uom">
|
||||||
|
<field name="unece_code">ONZ</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_inch" model="product.uom">
|
||||||
|
<field name="unece_code">INH</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_foot" model="product.uom">
|
||||||
|
<field name="unece_code">FOT</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_mile" model="product.uom">
|
||||||
|
<field name="unece_code">SMI</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- given the 'factor' preconfigured in Odoo
|
||||||
|
in addons/product/data/product_data.xml
|
||||||
|
Odoo defines the AMERICAN volume unit of measures and not the imperial ones -->
|
||||||
|
<record id="product.product_uom_floz" model="product.uom">
|
||||||
|
<field name="unece_code">OZA</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_qt" model="product.uom">
|
||||||
|
<field name="unece_code">QT</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product.product_uom_gal" model="product.uom">
|
||||||
|
<field name="unece_code">GLL</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * product_uom_unece
|
||||||
|
#
|
||||||
|
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: product_uom_unece
|
||||||
|
#: model:ir.model,name:product_uom_unece.model_product_uom
|
||||||
|
msgid "Product Unit of Measure"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: product_uom_unece
|
||||||
|
#: model:ir.model.fields,help:product_uom_unece.field_product_uom_unece_code
|
||||||
|
msgid "Standard nomenclature of the United Nations Economic Commission for Europe (UNECE)."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: product_uom_unece
|
||||||
|
#: model:ir.model.fields,field_description:product_uom_unece.field_product_uom_unece_code
|
||||||
|
msgid "UNECE Code"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from . import product_uom
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
# 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 models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ProductUom(models.Model):
|
||||||
|
_inherit = 'product.uom'
|
||||||
|
|
||||||
|
unece_code = fields.Char(
|
||||||
|
string='UNECE Code',
|
||||||
|
help="Standard nomenclature of the United Nations Economic "
|
||||||
|
"Commission for Europe (UNECE).")
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
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).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="product_uom_form_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.uom</field>
|
||||||
|
<field name="inherit_id" ref="product.product_uom_form_view" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="rounding" position="after">
|
||||||
|
<field name="unece_code"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="product_uom_tree_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.uom</field>
|
||||||
|
<field name="inherit_id" ref="product.product_uom_tree_view" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="category_id" position="after">
|
||||||
|
<field name="unece_code"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Loading…
Reference in New Issue