mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
46
hs_code_link/README.rst
Normal file
46
hs_code_link/README.rst
Normal file
@@ -0,0 +1,46 @@
|
||||
============
|
||||
HS Code Link
|
||||
============
|
||||
|
||||
Odoo added a field char field `hs_code` in the delivery module.
|
||||
It results in a duplicate field from `product_harmonized_system` and it can be
|
||||
seen twice in the `product.template` form view.
|
||||
|
||||
The goal of this module is to hide Odoo's field in the form and make it related
|
||||
to the OCA's one if it is used elsewhere.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
This module is set as auto_install if the following modules are installed:
|
||||
|
||||
* product_harmonized_system
|
||||
* delivery
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Denis Leemann <denis.leemann@camptocamp.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.
|
||||
1
hs_code_link/__init__.py
Normal file
1
hs_code_link/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
14
hs_code_link/__manifest__.py
Normal file
14
hs_code_link/__manifest__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2017 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "HS Code Link",
|
||||
"version": "13.0.1.0.0",
|
||||
"depends": ["product_harmonized_system", "delivery"],
|
||||
"author": "Camptocamp SA, Odoo Community Association (OCA)",
|
||||
"website": "http://www.camptocamp.com",
|
||||
"license": "AGPL-3",
|
||||
"category": "Reporting",
|
||||
"data": ["views/product_views.xml"],
|
||||
"installable": True,
|
||||
"auto_install": True,
|
||||
}
|
||||
20
hs_code_link/i18n/hs_code_link.pot
Normal file
20
hs_code_link/i18n/hs_code_link.pot
Normal file
@@ -0,0 +1,20 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * hs_code_link
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.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: hs_code_link
|
||||
#: model:ir.model,name:hs_code_link.model_product_template
|
||||
msgid "Product Template"
|
||||
msgstr ""
|
||||
|
||||
1
hs_code_link/models/__init__.py
Normal file
1
hs_code_link/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import product
|
||||
10
hs_code_link/models/product.py
Normal file
10
hs_code_link/models/product.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright 2017 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = "product.template"
|
||||
|
||||
hs_code = fields.Char(related="hs_code_id.hs_code", readonly=True, store=True)
|
||||
1
hs_code_link/readme/CONTRIBUTORS.rst
Normal file
1
hs_code_link/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Denis Leemann <denis.leemann@camptocamp.com>
|
||||
6
hs_code_link/readme/DESCRIPTION.rst
Normal file
6
hs_code_link/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
Odoo added a field char field `hs_code` in the delivery module.
|
||||
It results in a duplicate field from `product_harmonized_system` and it can be
|
||||
seen twice in the `product.template` form view.
|
||||
|
||||
The goal of this module is to hide Odoo's field in the form and make it related
|
||||
to the OCA's one if it is used elsewhere.
|
||||
4
hs_code_link/readme/INSTALL.rst
Normal file
4
hs_code_link/readme/INSTALL.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
This module is set as auto_install if the following modules are installed:
|
||||
|
||||
* product_harmonized_system
|
||||
* delivery
|
||||
BIN
hs_code_link/static/description/icon.png
Normal file
BIN
hs_code_link/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
13
hs_code_link/views/product_views.xml
Normal file
13
hs_code_link/views/product_views.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_template_hide_hs" model="ir.ui.view">
|
||||
<field name="name">product.template.hs.hidden</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="delivery.product_template_hs_code" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="hs_code" position="attributes">
|
||||
<attribute name="invisible">True</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user