mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
@@ -9,4 +9,4 @@ line_length=88
|
||||
known_odoo=odoo
|
||||
known_odoo_addons=odoo.addons
|
||||
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
|
||||
known_third_party=lxml,setuptools
|
||||
known_third_party=dateutil,lxml,setuptools
|
||||
|
||||
@@ -39,7 +39,6 @@ enable=anomalous-backslash-in-string,
|
||||
method-required-super,
|
||||
method-search,
|
||||
missing-import-error,
|
||||
missing-manifest-dependency,
|
||||
openerp-exception-warning,
|
||||
pointless-statement,
|
||||
pointless-string-statement,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<record id="shipping_costs_exclude" model="product.product">
|
||||
<field name="name">Shipping costs</field>
|
||||
<field name="default_code">SHIP</field>
|
||||
<field name="default_code">SHIP_S</field>
|
||||
<field name="type">service</field>
|
||||
<field name="categ_id" ref="product.product_category_all"/>
|
||||
<field name="list_price">30</field>
|
||||
|
||||
128
intrastat_product/README.rst
Normal file
128
intrastat_product/README.rst
Normal file
@@ -0,0 +1,128 @@
|
||||
=================
|
||||
Intrastat Product
|
||||
=================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fintrastat--extrastat-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product
|
||||
:alt: OCA/intrastat-extrastat
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-intrastat_product
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/227/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module contains common objects and fields for the Intrastat Product reporting.
|
||||
|
||||
It should be used in combination with country-specific Intrastat Product reporting modules
|
||||
such as:
|
||||
|
||||
- *l10n_fr_intrastat_product*:
|
||||
the module for the *Déclaration d'Echange de Biens* (DEB) for France
|
||||
- *l10n_be_intrastat_product*:
|
||||
the module for the Intrastat Product Declaration for Belgium
|
||||
|
||||
These country-specific modules can be found in the OCA localization for those countries.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
This module is NOT compatible with the *account_intrastat* module from Odoo Enterprise.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
This module is used in combination with the country-specific
|
||||
localization module(s).
|
||||
|
||||
**Coding guidelines for localization module:**
|
||||
|
||||
We recommend to start by copying an existing module, e.g. l10n_be_intrastat_product
|
||||
and adapt the code for the specific needs of your country.
|
||||
|
||||
* Declaration Object
|
||||
|
||||
Create a new class as follows:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class L10nCcIntrastatProductDeclaration(models.Model):
|
||||
_name = 'l10n.cc.intrastat.product.declaration'
|
||||
_description = "Intrastat Product Declaration for YourCountry"
|
||||
_inherit = ['intrastat.product.declaration', 'mail.thread']
|
||||
|
||||
whereby cc = your country code
|
||||
|
||||
* Computation & Declaration Lines
|
||||
|
||||
Create also new objects inheriting from the Computation and Declaration Line Objects
|
||||
so that you can add methods or customise the methods from the base modules (make a PR when
|
||||
the customization or new method is required for multiple countries).
|
||||
|
||||
Adapt also the parent_id fields of the newly created objects
|
||||
(cf. l10n_be_intrastat_product as example).
|
||||
|
||||
* XML Files: Menu, Action, Views
|
||||
|
||||
Cf. l10n_be_istrastat_product as example, replace "be" by your Country Code.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/intrastat-extrastat/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/intrastat-extrastat/issues/new?body=module:%20intrastat_product%0Aversion:%2012.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
|
||||
~~~~~~~
|
||||
|
||||
* brain-tec AG
|
||||
* Akretion
|
||||
* Noviat
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
|
||||
* Luc De Meyer, Noviat <info@noviat.com>
|
||||
|
||||
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/intrastat-extrastat <https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
2
intrastat_product/__init__.py
Normal file
2
intrastat_product/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import models
|
||||
from . import report
|
||||
41
intrastat_product/__manifest__.py
Normal file
41
intrastat_product/__manifest__.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2020 Noviat (http://www.noviat.com)
|
||||
# Copyright 2018 brain-tec AG (http://www.braintec-group.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
# @author Kumar Aberer <kumar.aberer@braintec-group.com>
|
||||
|
||||
{
|
||||
"name": "Intrastat Product",
|
||||
"version": "13.0.1.0.0",
|
||||
"category": "Intrastat",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Base module for Intrastat Product",
|
||||
"author": "brain-tec AG, Akretion, Noviat, " "Odoo Community Association (OCA)",
|
||||
"depends": [
|
||||
"intrastat_base",
|
||||
"product_harmonized_system",
|
||||
"sale_stock",
|
||||
"purchase_stock",
|
||||
"report_xlsx_helper",
|
||||
],
|
||||
"excludes": ["account_intrastat"],
|
||||
"data": [
|
||||
"views/hs_code.xml",
|
||||
"views/intrastat_region.xml",
|
||||
"views/intrastat_unit.xml",
|
||||
"views/intrastat_transaction.xml",
|
||||
"views/intrastat_transport_mode.xml",
|
||||
"views/intrastat_product_declaration.xml",
|
||||
"views/res_config_settings.xml",
|
||||
"views/account_move.xml",
|
||||
"views/sale_order.xml",
|
||||
"views/stock_warehouse.xml",
|
||||
"security/intrastat_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
"data/intrastat_transport_mode.xml",
|
||||
"data/intrastat_unit.xml",
|
||||
],
|
||||
"demo": ["demo/intrastat_demo.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
50
intrastat_product/data/intrastat_transport_mode.xml
Normal file
50
intrastat_product/data/intrastat_transport_mode.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="intrastat_transport_1" model="intrastat.transport_mode">
|
||||
<field name="code">1</field>
|
||||
<field name="name">Sea</field>
|
||||
<field name="description">Sea Transport (including wagons, motor vehicles, trailers, semi-trailers and lighters on board of a ship)</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_2" model="intrastat.transport_mode">
|
||||
<field name="code">2</field>
|
||||
<field name="name">Rail</field>
|
||||
<field name="description">Railway transport (including lorries on railway wagons)</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_3" model="intrastat.transport_mode">
|
||||
<field name="code">3</field>
|
||||
<field name="name">Road</field>
|
||||
<field name="description">Road Transport</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_4" model="intrastat.transport_mode">
|
||||
<field name="code">4</field>
|
||||
<field name="name">Air</field>
|
||||
<field name="description">Air Transport</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_5" model="intrastat.transport_mode">
|
||||
<field name="code">5</field>
|
||||
<field name="name">Post</field>
|
||||
<field name="description">Postal consignments</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_7" model="intrastat.transport_mode">
|
||||
<field name="code">7</field>
|
||||
<field name="name">Fixed installations</field>
|
||||
<field name="description">Fixed transport installations (e.g. pipelines, high-tension cables)</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_8" model="intrastat.transport_mode">
|
||||
<field name="code">8</field>
|
||||
<field name="name">Inland waterway</field>
|
||||
<field name="description">Inland waterway transport</field>
|
||||
</record>
|
||||
<record id="intrastat_transport_9" model="intrastat.transport_mode">
|
||||
<field name="code">9</field>
|
||||
<field name="name">Own propulsion</field>
|
||||
<field name="description">Own propulsion (imported or exported means of transport crossing the border under their own power, e.g. aircraft, lorries, boats, etc.)</field>
|
||||
</record>
|
||||
|
||||
<!-- Set default value to Road trp on main company -->
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="intrastat_transport_id" ref="intrastat_transport_3"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
123
intrastat_product/data/intrastat_unit.xml
Normal file
123
intrastat_product/data/intrastat_unit.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<!-- Extracted from the Official Journal of the European Union -->
|
||||
|
||||
<record id="intrastat_unit_c_k" model="intrastat.unit">
|
||||
<field name="name">c/k</field>
|
||||
<field name="description">Carats - 1 metric carat = 2 × 10exp(–4) kg</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_ce_el" model="intrastat.unit">
|
||||
<field name="name">ce/el</field>
|
||||
<field name="description">Number of cells</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_ct_l" model="intrastat.unit">
|
||||
<field name="name">ct/l</field>
|
||||
<field name="description">Carrying capacity in tonnes</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_g" model="intrastat.unit">
|
||||
<field name="name">g</field>
|
||||
<field name="description">Gram</field>
|
||||
<field name="uom_id" ref="uom.product_uom_gram"/>
|
||||
</record>
|
||||
<record id="intrastat_unit_gi_FS" model="intrastat.unit">
|
||||
<field name="name">gi F/S</field>
|
||||
<field name="description">Gram of fissile isotopes</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_H2O2" model="intrastat.unit">
|
||||
<field name="name">kg H2O2</field>
|
||||
<field name="description">Kilogram of hydrogen peroxide</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_K2O" model="intrastat.unit">
|
||||
<field name="name">kg K2O</field>
|
||||
<field name="description">Kilogram of potassium oxide</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_KOH" model="intrastat.unit">
|
||||
<field name="name">kg KOH</field>
|
||||
<field name="description">Kilogram of potassium hydroxide (caustic potash)</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_ma" model="intrastat.unit">
|
||||
<field name="name">kg met.am.</field>
|
||||
<field name="description">Kilogram of methylamines</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_N" model="intrastat.unit">
|
||||
<field name="name">kg N</field>
|
||||
<field name="description">Kilogram of nitrogen</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_NaOH" model="intrastat.unit">
|
||||
<field name="name">kg NaOH</field>
|
||||
<field name="description">Kilogram of sodium hydroxide (caustic soda)</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_net_eda" model="intrastat.unit">
|
||||
<field name="name">kg/net eda</field>
|
||||
<field name="description">Kilogram drained net weight</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_P2O5" model="intrastat.unit">
|
||||
<field name="name">kg P2O5</field>
|
||||
<field name="description">Kilogram of diphosphorus pentaoxide</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_90_pct_sdt" model="intrastat.unit">
|
||||
<field name="name">kg 90 pct sdt</field>
|
||||
<field name="description">Kilogram of substance 90 % dry</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_kg_U" model="intrastat.unit">
|
||||
<field name="name">kg U</field>
|
||||
<field name="description">Kilogram of uranium</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_1000_kWh" model="intrastat.unit">
|
||||
<field name="name">1000 kWh</field>
|
||||
<field name="description">Thousand kilowatt hours</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_l" model="intrastat.unit">
|
||||
<field name="name">l</field>
|
||||
<field name="description">Litre</field>
|
||||
<field name="uom_id" ref="uom.product_uom_litre"/>
|
||||
</record>
|
||||
<record id="intrastat_unit_1000l" model="intrastat.unit">
|
||||
<field name="name">1000 l</field>
|
||||
<field name="description">Thousand litres</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_l_alc_100_pct" model="intrastat.unit">
|
||||
<field name="name">l alc. 100 pct</field>
|
||||
<field name="description">Litre pure (100 %) alcohol</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_m" model="intrastat.unit">
|
||||
<field name="name">m</field>
|
||||
<field name="description">Metre</field>
|
||||
<field name="uom_id" ref="uom.product_uom_meter"/>
|
||||
</record>
|
||||
<record id="intrastat_unit_m2" model="intrastat.unit">
|
||||
<field name="name">m2</field>
|
||||
<field name="description">Square metre</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_m3" model="intrastat.unit">
|
||||
<field name="name">m3</field>
|
||||
<field name="description">Cubic metre</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_1000m3" model="intrastat.unit">
|
||||
<field name="name">1000 m3</field>
|
||||
<field name="description">Thousand cubic metres</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_pa" model="intrastat.unit">
|
||||
<field name="name">pa</field>
|
||||
<field name="description">Number of pairs</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_pce" model="intrastat.unit">
|
||||
<field name="name">items</field>
|
||||
<field name="description">Number of items</field>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
</record>
|
||||
<record id="intrastat_unit_100pce" model="intrastat.unit">
|
||||
<field name="name">100 items</field>
|
||||
<field name="description">Hundred items</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_1000pce" model="intrastat.unit">
|
||||
<field name="name">1000 items</field>
|
||||
<field name="description">Thousand items</field>
|
||||
</record>
|
||||
<record id="intrastat_unit_TJ" model="intrastat.unit">
|
||||
<field name="name">TJ</field>
|
||||
<field name="description">Terajoule (gross calorific value)</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
25
intrastat_product/demo/intrastat_demo.xml
Normal file
25
intrastat_product/demo/intrastat_demo.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2011-2017 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="product_harmonized_system.84715000" model="hs.code">
|
||||
<field name="intrastat_unit_id" ref="intrastat_unit_pce"/>
|
||||
</record>
|
||||
|
||||
<record id="product_harmonized_system.84717050" model="hs.code">
|
||||
<field name="intrastat_unit_id" ref="intrastat_unit_pce"/>
|
||||
</record>
|
||||
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="intrastat_arrivals">extended</field>
|
||||
<field name="intrastat_dispatches">extended</field>
|
||||
<field name="incoterm_id" ref="account.incoterm_DDU"/>
|
||||
<field name="intrastat_transport_id" ref="intrastat_transport_3"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
1177
intrastat_product/i18n/fr.po
Normal file
1177
intrastat_product/i18n/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
1310
intrastat_product/i18n/intrastat_product.pot
Normal file
1310
intrastat_product/i18n/intrastat_product.pot
Normal file
File diff suppressed because it is too large
Load Diff
11
intrastat_product/models/__init__.py
Normal file
11
intrastat_product/models/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from . import res_company
|
||||
from . import res_config_settings
|
||||
from . import account_move
|
||||
from . import hs_code
|
||||
from . import intrastat_product_declaration
|
||||
from . import intrastat_region
|
||||
from . import intrastat_transaction
|
||||
from . import intrastat_transport_mode
|
||||
from . import intrastat_unit
|
||||
from . import sale_order
|
||||
from . import stock_warehouse
|
||||
75
intrastat_product/models/account_move.py
Normal file
75
intrastat_product/models/account_move.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# Copyright 2011-2017 Akretion France (http://www.akretion.com)
|
||||
# Copyright 2009-2020 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = "account.move"
|
||||
|
||||
intrastat_transaction_id = fields.Many2one(
|
||||
comodel_name="intrastat.transaction",
|
||||
string="Intrastat Transaction Type",
|
||||
ondelete="restrict",
|
||||
track_visibility="onchange",
|
||||
help="Intrastat nature of transaction",
|
||||
)
|
||||
intrastat_transport_id = fields.Many2one(
|
||||
comodel_name="intrastat.transport_mode",
|
||||
string="Intrastat Transport Mode",
|
||||
ondelete="restrict",
|
||||
)
|
||||
src_dest_country_id = fields.Many2one(
|
||||
comodel_name="res.country",
|
||||
string="Origin/Destination Country",
|
||||
compute="_compute_intrastat_country",
|
||||
store=True,
|
||||
compute_sudo=True,
|
||||
help="Destination country for dispatches. Origin country for " "arrivals.",
|
||||
)
|
||||
intrastat_country = fields.Boolean(
|
||||
compute="_compute_intrastat_country",
|
||||
string="Intrastat Country",
|
||||
store=True,
|
||||
compute_sudo=True,
|
||||
)
|
||||
src_dest_region_id = fields.Many2one(
|
||||
comodel_name="intrastat.region",
|
||||
string="Origin/Destination Region",
|
||||
default=lambda self: self._default_src_dest_region_id(),
|
||||
help="Origin region for dispatches, destination region for "
|
||||
"arrivals. This field is used for the Intrastat Declaration.",
|
||||
ondelete="restrict",
|
||||
)
|
||||
intrastat = fields.Char(
|
||||
string="Intrastat Declaration", related="company_id.intrastat"
|
||||
)
|
||||
|
||||
@api.depends("partner_shipping_id.country_id", "partner_id.country_id")
|
||||
def _compute_intrastat_country(self):
|
||||
for inv in self:
|
||||
country = inv.partner_shipping_id.country_id or inv.partner_id.country_id
|
||||
if not country:
|
||||
country = inv.company_id.country_id
|
||||
inv.src_dest_country_id = country.id
|
||||
inv.intrastat_country = country.intrastat
|
||||
|
||||
@api.model
|
||||
def _default_src_dest_region_id(self):
|
||||
return self.env.company.intrastat_region_id
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
hs_code_id = fields.Many2one(
|
||||
comodel_name="hs.code", string="Intrastat Code", ondelete="restrict"
|
||||
)
|
||||
|
||||
@api.onchange("product_id")
|
||||
def intrastat_product_id_change(self):
|
||||
if self.product_id:
|
||||
hs_code = self.product_id.get_hs_code_recursively()
|
||||
self.hs_code_id = hs_code and hs_code.id or False
|
||||
36
intrastat_product/models/hs_code.py
Normal file
36
intrastat_product/models/hs_code.py
Normal file
@@ -0,0 +1,36 @@
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2018 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import ValidationError
|
||||
|
||||
|
||||
class HSCode(models.Model):
|
||||
_inherit = "hs.code"
|
||||
|
||||
intrastat_unit_id = fields.Many2one(
|
||||
comodel_name="intrastat.unit", string="Intrastat Supplementary Unit"
|
||||
)
|
||||
|
||||
@api.constrains("local_code")
|
||||
def _hs_code(self):
|
||||
if self.company_id.country_id.intrastat:
|
||||
if not self.local_code.isdigit():
|
||||
raise ValidationError(
|
||||
_(
|
||||
"Intrastat Codes should only contain digits. "
|
||||
"This is not the case for code '%s'."
|
||||
)
|
||||
% self.local_code
|
||||
)
|
||||
if len(self.local_code) != 8:
|
||||
raise ValidationError(
|
||||
_(
|
||||
"Intrastat Codes should "
|
||||
"contain 8 digits. This is not the case for "
|
||||
"Intrastat Code '%s' which has %d digits."
|
||||
)
|
||||
% (self.local_code, len(self.local_code))
|
||||
)
|
||||
1040
intrastat_product/models/intrastat_product_declaration.py
Normal file
1040
intrastat_product/models/intrastat_product_declaration.py
Normal file
File diff suppressed because it is too large
Load Diff
32
intrastat_product/models/intrastat_region.py
Normal file
32
intrastat_product/models/intrastat_region.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# Copyright 2009-2020 Noviat nv/sa (www.noviat.com).
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class IntrastatRegion(models.Model):
|
||||
_name = "intrastat.region"
|
||||
_description = "Intrastat Region"
|
||||
_sql_constraints = [
|
||||
(
|
||||
"intrastat_region_code_unique",
|
||||
"UNIQUE(code, country_id)", # TODO add company_id ?
|
||||
"Code must be unique.",
|
||||
)
|
||||
]
|
||||
|
||||
code = fields.Char(string="Code", required=True)
|
||||
country_id = fields.Many2one(
|
||||
comodel_name="res.country", string="Country", required=True
|
||||
)
|
||||
name = fields.Char(string="Name", translate=True)
|
||||
description = fields.Char(string="Description")
|
||||
company_id = fields.Many2one(
|
||||
comodel_name="res.company",
|
||||
string="Company",
|
||||
default=lambda self: self._default_company_id(),
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _default_company_id(self):
|
||||
return self.env.company
|
||||
42
intrastat_product/models/intrastat_transaction.py
Normal file
42
intrastat_product/models/intrastat_transaction.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# Copyright 2011-2017 Akretion France (http://www.akretion.com)
|
||||
# Copyright 2009-2020 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class IntrastatTransaction(models.Model):
|
||||
_name = "intrastat.transaction"
|
||||
_description = "Intrastat Transaction"
|
||||
_order = "code"
|
||||
_sql_constraints = [
|
||||
(
|
||||
"intrastat_transaction_code_unique",
|
||||
"UNIQUE(code, company_id)",
|
||||
"Code must be unique.",
|
||||
)
|
||||
]
|
||||
|
||||
code = fields.Char(string="Code", required=True)
|
||||
description = fields.Text(string="Description")
|
||||
company_id = fields.Many2one(
|
||||
comodel_name="res.company",
|
||||
string="Company",
|
||||
default=lambda self: self._default_company_id(),
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _default_company_id(self):
|
||||
return self.env.company
|
||||
|
||||
@api.depends("code", "description")
|
||||
def name_get(self):
|
||||
res = []
|
||||
for this in self:
|
||||
name = this.code
|
||||
if this.description:
|
||||
name += " " + this.description
|
||||
name = len(name) > 55 and name[:55] + "..." or name
|
||||
res.append((this.id, name))
|
||||
return res
|
||||
27
intrastat_product/models/intrastat_transport_mode.py
Normal file
27
intrastat_product/models/intrastat_transport_mode.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2019 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class IntrastatTransportMode(models.Model):
|
||||
_name = "intrastat.transport_mode"
|
||||
_description = "Intrastat Transport Mode"
|
||||
_order = "code"
|
||||
_sql_constraints = [
|
||||
("intrastat_transport_code_unique", "UNIQUE(code)", "Code must be unique.")
|
||||
]
|
||||
|
||||
code = fields.Char(string="Code", required=True)
|
||||
name = fields.Char(string="Name", required=True, translate=True)
|
||||
description = fields.Char(string="Description", translate=True)
|
||||
|
||||
@api.depends("name", "code")
|
||||
def name_get(self):
|
||||
res = []
|
||||
for mode in self:
|
||||
name = "{}. {}".format(mode.code, mode.name)
|
||||
res.append((mode.id, name))
|
||||
return res
|
||||
21
intrastat_product/models/intrastat_unit.py
Normal file
21
intrastat_product/models/intrastat_unit.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2018 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class IntrastatUnit(models.Model):
|
||||
_name = "intrastat.unit"
|
||||
_description = "Intrastat Supplementary Units"
|
||||
|
||||
name = fields.Char(string="Name", required=True)
|
||||
description = fields.Char(string="Description", required=True)
|
||||
uom_id = fields.Many2one(
|
||||
comodel_name="uom.uom",
|
||||
string="Regular UoM",
|
||||
help="Select the regular Unit of Measure of Odoo that corresponds "
|
||||
"to this Intrastat Supplementary Unit.",
|
||||
)
|
||||
active = fields.Boolean(default=True)
|
||||
88
intrastat_product/models/res_company.py
Normal file
88
intrastat_product/models/res_company.py
Normal file
@@ -0,0 +1,88 @@
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2020 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
intrastat_arrivals = fields.Selection(
|
||||
selection="_intrastat_arrivals",
|
||||
string="Arrivals",
|
||||
default="extended",
|
||||
required=True,
|
||||
)
|
||||
intrastat_dispatches = fields.Selection(
|
||||
selection="_intrastat_dispatches",
|
||||
string="Dispatches",
|
||||
default="extended",
|
||||
required=True,
|
||||
)
|
||||
intrastat_transport_id = fields.Many2one(
|
||||
comodel_name="intrastat.transport_mode",
|
||||
string="Default Transport Mode",
|
||||
ondelete="restrict",
|
||||
)
|
||||
intrastat = fields.Char(
|
||||
string="Intrastat Declaration",
|
||||
store=True,
|
||||
readonly=True,
|
||||
compute="_compute_intrastat",
|
||||
)
|
||||
intrastat_region_id = fields.Many2one(
|
||||
comodel_name="intrastat.region", string="Default Intrastat Region"
|
||||
)
|
||||
intrastat_transaction_out_invoice = fields.Many2one(
|
||||
comodel_name="intrastat.transaction",
|
||||
string="Default Intrastat Transaction For Customer Invoice",
|
||||
)
|
||||
intrastat_transaction_out_refund = fields.Many2one(
|
||||
comodel_name="intrastat.transaction",
|
||||
string="Default Intrastat Transaction for Customer Refunds",
|
||||
)
|
||||
intrastat_transaction_in_invoice = fields.Many2one(
|
||||
comodel_name="intrastat.transaction",
|
||||
string="Default Intrastat Transaction For Supplier Invoices",
|
||||
)
|
||||
intrastat_transaction_in_refund = fields.Many2one(
|
||||
comodel_name="intrastat.transaction",
|
||||
string="Default Intrastat Transaction For Supplier Refunds",
|
||||
)
|
||||
intrastat_accessory_costs = fields.Boolean(
|
||||
string="Include Accessory Costs in Fiscal Value of Product"
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _intrastat_arrivals(self):
|
||||
return [
|
||||
("exempt", "Exempt"),
|
||||
("standard", "Standard"),
|
||||
("extended", "Extended"),
|
||||
]
|
||||
|
||||
@api.model
|
||||
def _intrastat_dispatches(self):
|
||||
return [
|
||||
("exempt", "Exempt"),
|
||||
("standard", "Standard"),
|
||||
("extended", "Extended"),
|
||||
]
|
||||
|
||||
@api.depends("intrastat_arrivals", "intrastat_dispatches")
|
||||
def _compute_intrastat(self):
|
||||
for this in self:
|
||||
if (
|
||||
this.intrastat_arrivals == "exempt"
|
||||
and this.intrastat_dispatches == "exempt"
|
||||
):
|
||||
this.intrastat = "exempt"
|
||||
elif (
|
||||
this.intrastat_arrivals == "extended"
|
||||
or this.intrastat_dispatches == "extended"
|
||||
):
|
||||
this.intrastat = "extended"
|
||||
else:
|
||||
this.intrastat = "standard"
|
||||
40
intrastat_product/models/res_config_settings.py
Normal file
40
intrastat_product/models/res_config_settings.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2009-2020 Noviat (http://www.noviat.com)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = "res.config.settings"
|
||||
|
||||
intrastat_arrivals = fields.Selection(
|
||||
related="company_id.intrastat_arrivals", readonly=False
|
||||
)
|
||||
intrastat_dispatches = fields.Selection(
|
||||
related="company_id.intrastat_dispatches", readonly=False
|
||||
)
|
||||
intrastat = fields.Char(related="company_id.intrastat")
|
||||
intrastat_transport_id = fields.Many2one(
|
||||
related="company_id.intrastat_transport_id", readonly=False
|
||||
)
|
||||
intrastat_region_id = fields.Many2one(
|
||||
related="company_id.intrastat_region_id", readonly=False
|
||||
)
|
||||
intrastat_transaction_out_invoice = fields.Many2one(
|
||||
related="company_id.intrastat_transaction_out_invoice", readonly=False
|
||||
)
|
||||
intrastat_transaction_out_refund = fields.Many2one(
|
||||
related="company_id.intrastat_transaction_out_refund", readonly=False
|
||||
)
|
||||
intrastat_transaction_in_invoice = fields.Many2one(
|
||||
related="company_id.intrastat_transaction_in_invoice", readonly=False
|
||||
)
|
||||
intrastat_transaction_in_refund = fields.Many2one(
|
||||
related="company_id.intrastat_transaction_in_refund", readonly=False
|
||||
)
|
||||
intrastat_accessory_costs = fields.Boolean(
|
||||
related="company_id.intrastat_accessory_costs", readonly=False
|
||||
)
|
||||
country_id = fields.Many2one(related="company_id.country_id")
|
||||
country_code = fields.Char(related="company_id.country_id.code")
|
||||
27
intrastat_product/models/sale_order.py
Normal file
27
intrastat_product/models/sale_order.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2010-2019 Akretion France (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = "sale.order"
|
||||
|
||||
intrastat_transport_id = fields.Many2one(
|
||||
comodel_name="intrastat.transport_mode",
|
||||
string="Transport Mode",
|
||||
help="This information is used in Intrastat reports",
|
||||
)
|
||||
intrastat = fields.Selection(
|
||||
string="Intrastat Declaration", related="company_id.intrastat_dispatches"
|
||||
)
|
||||
|
||||
def _prepare_invoice(self):
|
||||
"""Copy destination country to invoice"""
|
||||
vals = super(SaleOrder, self)._prepare_invoice()
|
||||
if self.intrastat_transport_id:
|
||||
vals["intrastat_transport_id"] = self.intrastat_transport_id.id
|
||||
if self.warehouse_id.region_id:
|
||||
vals["src_dest_region_id"] = self.warehouse_id.region_id.id
|
||||
return vals
|
||||
27
intrastat_product/models/stock_warehouse.py
Normal file
27
intrastat_product/models/stock_warehouse.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright 2009-2018 Noviat nv/sa (www.noviat.com).
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class StockWarehouse(models.Model):
|
||||
_inherit = "stock.warehouse"
|
||||
|
||||
region_id = fields.Many2one(
|
||||
comodel_name="intrastat.region", string="Intrastat Region"
|
||||
)
|
||||
|
||||
|
||||
class StockLocation(models.Model):
|
||||
_inherit = "stock.location"
|
||||
|
||||
def get_intrastat_region(self):
|
||||
self.ensure_one()
|
||||
locations = self.search([("id", "parent_of", self.id)])
|
||||
warehouses = self.env["stock.warehouse"].search(
|
||||
[("lot_stock_id", "in", locations.ids), ("region_id", "!=", False)]
|
||||
)
|
||||
if warehouses:
|
||||
return warehouses[0].region_id
|
||||
return None
|
||||
2
intrastat_product/readme/CONTRIBUTORS.rst
Normal file
2
intrastat_product/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
* Alexis de Lattre, Akretion <alexis.delattre@akretion.com>
|
||||
* Luc De Meyer, Noviat <info@noviat.com>
|
||||
11
intrastat_product/readme/DESCRIPTION.rst
Normal file
11
intrastat_product/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
This module contains common objects and fields for the Intrastat Product reporting.
|
||||
|
||||
It should be used in combination with country-specific Intrastat Product reporting modules
|
||||
such as:
|
||||
|
||||
- *l10n_fr_intrastat_product*:
|
||||
the module for the *Déclaration d'Echange de Biens* (DEB) for France
|
||||
- *l10n_be_intrastat_product*:
|
||||
the module for the Intrastat Product Declaration for Belgium
|
||||
|
||||
These country-specific modules can be found in the OCA localization for those countries.
|
||||
1
intrastat_product/readme/INSTALL.rst
Normal file
1
intrastat_product/readme/INSTALL.rst
Normal file
@@ -0,0 +1 @@
|
||||
This module is NOT compatible with the *account_intrastat* module from Odoo Enterprise.
|
||||
33
intrastat_product/readme/USAGE.rst
Normal file
33
intrastat_product/readme/USAGE.rst
Normal file
@@ -0,0 +1,33 @@
|
||||
This module is used in combination with the country-specific
|
||||
localization module(s).
|
||||
|
||||
**Coding guidelines for localization module:**
|
||||
|
||||
We recommend to start by copying an existing module, e.g. l10n_be_intrastat_product
|
||||
and adapt the code for the specific needs of your country.
|
||||
|
||||
* Declaration Object
|
||||
|
||||
Create a new class as follows:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class L10nCcIntrastatProductDeclaration(models.Model):
|
||||
_name = 'l10n.cc.intrastat.product.declaration'
|
||||
_description = "Intrastat Product Declaration for YourCountry"
|
||||
_inherit = ['intrastat.product.declaration', 'mail.thread']
|
||||
|
||||
whereby cc = your country code
|
||||
|
||||
* Computation & Declaration Lines
|
||||
|
||||
Create also new objects inheriting from the Computation and Declaration Line Objects
|
||||
so that you can add methods or customise the methods from the base modules (make a PR when
|
||||
the customization or new method is required for multiple countries).
|
||||
|
||||
Adapt also the parent_id fields of the newly created objects
|
||||
(cf. l10n_be_intrastat_product as example).
|
||||
|
||||
* XML Files: Menu, Action, Views
|
||||
|
||||
Cf. l10n_be_istrastat_product as example, replace "be" by your Country Code.
|
||||
1
intrastat_product/report/__init__.py
Normal file
1
intrastat_product/report/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import intrastat_product_report_xls
|
||||
237
intrastat_product/report/intrastat_product_report_xls.py
Normal file
237
intrastat_product/report/intrastat_product_report_xls.py
Normal file
@@ -0,0 +1,237 @@
|
||||
# Copyright 2009-2020 Noviat
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
|
||||
from odoo import models
|
||||
from odoo.tools.translate import _, translate
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
IR_TRANSLATION_NAME = "intrastat.product.report"
|
||||
|
||||
|
||||
class IntrastatProductDeclarationXlsx(models.AbstractModel):
|
||||
_name = "report.intrastat_product.product_declaration_xls"
|
||||
_inherit = "report.report_xlsx.abstract"
|
||||
_description = "Intrastat declaration"
|
||||
|
||||
def _(self, src):
|
||||
lang = self.env.context.get("lang", "en_US")
|
||||
val = translate(self.env.cr, IR_TRANSLATION_NAME, "report", lang, src) or src
|
||||
return val
|
||||
|
||||
def _get_template(self, declaration):
|
||||
|
||||
template = {
|
||||
"product": {
|
||||
"header": {"type": "string", "value": self._("Product")},
|
||||
"line": {
|
||||
"value": self._render("line.product_id and line.product_id.name")
|
||||
},
|
||||
"width": 36,
|
||||
},
|
||||
"product_origin_country": {
|
||||
"header": {"type": "string", "value": self._("Product C/O")},
|
||||
"line": {
|
||||
"type": "string",
|
||||
"value": self._render("line.product_origin_country_id.name or ''"),
|
||||
},
|
||||
"width": 28,
|
||||
},
|
||||
"hs_code": {
|
||||
"header": {"type": "string", "value": self._("Intrastat Code")},
|
||||
"line": {
|
||||
"type": "string",
|
||||
"value": self._render("line.hs_code_id.local_code"),
|
||||
},
|
||||
"width": 14,
|
||||
},
|
||||
"src_dest_country": {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"value": self._("Country of Origin/Destination"),
|
||||
},
|
||||
"line": {
|
||||
"type": "string",
|
||||
"value": self._render("line.src_dest_country_id.name"),
|
||||
},
|
||||
"width": 28,
|
||||
},
|
||||
"amount_company_currency": {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"value": self._("Fiscal Value"),
|
||||
"format": self.format_theader_yellow_right,
|
||||
},
|
||||
"line": {
|
||||
"type": "number",
|
||||
"value": self._render("line.amount_company_currency"),
|
||||
"format": self.format_tcell_amount_right,
|
||||
},
|
||||
"width": 18,
|
||||
},
|
||||
"accessory_cost": {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"value": self._("Accessory Costs"),
|
||||
"format": self.format_theader_yellow_right,
|
||||
},
|
||||
"line": {
|
||||
"type": "number",
|
||||
"value": self._render(
|
||||
"line.amount_accessory_cost_company_currency"
|
||||
),
|
||||
"format": self.format_tcell_amount_right,
|
||||
},
|
||||
"width": 18,
|
||||
},
|
||||
"transaction": {
|
||||
"header": {"type": "string", "value": self._("Intrastat Transaction")},
|
||||
"line": {"value": self._render("line.transaction_id.display_name")},
|
||||
"width": 36,
|
||||
},
|
||||
"weight": {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"value": self._("Weight"),
|
||||
"format": self.format_theader_yellow_right,
|
||||
},
|
||||
"line": {
|
||||
"type": "number",
|
||||
"value": self._render("line.weight"),
|
||||
"format": self.format_tcell_amount_right,
|
||||
},
|
||||
"width": 18,
|
||||
},
|
||||
"suppl_unit_qty": {
|
||||
"header": {
|
||||
"type": "string",
|
||||
"value": self._("Suppl. Unit Qty"),
|
||||
"format": self.format_theader_yellow_right,
|
||||
},
|
||||
"line": {
|
||||
# we don't specify a type here and rely on the
|
||||
# report_xlsx_helper type detection to use
|
||||
# write_string when suppl_unit_qty is zero
|
||||
"value": self._render("line.suppl_unit_qty or ''"),
|
||||
"format": self.format_tcell_amount_right,
|
||||
},
|
||||
"width": 18,
|
||||
},
|
||||
"suppl_unit": {
|
||||
"header": {"type": "string", "value": self._("Suppl. Unit")},
|
||||
"line": {"value": self._render("line.intrastat_unit_id.name or ''")},
|
||||
"width": 14,
|
||||
},
|
||||
"incoterm": {
|
||||
"header": {"type": "string", "value": self._("Incoterm")},
|
||||
"line": {"value": self._render("line.incoterm_id.name or ''")},
|
||||
"width": 14,
|
||||
},
|
||||
"transport": {
|
||||
"header": {"type": "string", "value": self._("Transport Mode")},
|
||||
"line": {"value": self._render("line.transport_id.name or ''")},
|
||||
"width": 14,
|
||||
},
|
||||
"region": {
|
||||
"header": {"type": "string", "value": self._("Intrastat Region")},
|
||||
"line": {"value": self._render("line.region_id.name or ''")},
|
||||
"width": 28,
|
||||
},
|
||||
"invoice": {
|
||||
"header": {"type": "string", "value": self._("Invoice")},
|
||||
"line": {"value": self._render("line.invoice_id.name")},
|
||||
"width": 18,
|
||||
},
|
||||
}
|
||||
template.update(declaration._xls_template())
|
||||
|
||||
return template
|
||||
|
||||
def _get_ws_params(self, wb, data, declaration):
|
||||
template = self._get_template(declaration)
|
||||
if self.env.context.get("computation_lines"):
|
||||
wl = declaration._xls_computation_line_fields()
|
||||
report = "computation"
|
||||
else:
|
||||
wl = declaration._xls_declaration_line_fields()
|
||||
report = "declaration"
|
||||
|
||||
title = self._get_title(declaration, report, title_format="normal")
|
||||
title_short = self._get_title(declaration, report, title_format="short")
|
||||
sheet_name = title_short[:31].replace("/", "-")
|
||||
|
||||
params = {
|
||||
"ws_name": sheet_name,
|
||||
"generate_ws_method": "_intrastat_report",
|
||||
"title": title,
|
||||
"wanted_list": wl,
|
||||
"col_specs": template,
|
||||
}
|
||||
return [params]
|
||||
|
||||
def _get_title(self, declaration, report, title_format="normal"):
|
||||
title = declaration.year_month
|
||||
if title_format == "normal":
|
||||
if report == "computation":
|
||||
title += " : " + _("Computation Lines")
|
||||
else:
|
||||
title += " : " + _("Declaration Lines")
|
||||
return title
|
||||
|
||||
def _report_title(self, ws, row_pos, ws_params, data, declaration):
|
||||
return self._write_ws_title(ws, row_pos, ws_params)
|
||||
|
||||
def _empty_report(self, ws, row_pos, ws_params, data, declaration, report):
|
||||
if report == "computation":
|
||||
lines = _("Computation Lines")
|
||||
else:
|
||||
lines = _("Declaration Lines")
|
||||
no_entries = (
|
||||
_("No") + " " + lines + " " + _("for period %s") % declaration.year_month
|
||||
)
|
||||
ws.write_string(row_pos, 0, no_entries, self.format_left_bold)
|
||||
|
||||
def _intrastat_report(self, workbook, ws, ws_params, data, declaration):
|
||||
|
||||
ws.set_landscape()
|
||||
ws.fit_to_pages(1, 0)
|
||||
ws.set_header(self.xls_headers["standard"])
|
||||
ws.set_footer(self.xls_footers["standard"])
|
||||
|
||||
self._set_column_width(ws, ws_params)
|
||||
|
||||
row_pos = 0
|
||||
row_pos = self._report_title(ws, row_pos, ws_params, data, declaration)
|
||||
|
||||
if self.env.context.get("computation_lines"):
|
||||
report = "computation"
|
||||
lines = declaration.computation_line_ids
|
||||
else:
|
||||
report = "declaration"
|
||||
lines = declaration.declaration_line_ids
|
||||
|
||||
if not lines:
|
||||
return self._empty_report(ws, row_pos, ws_params, data, declaration, report)
|
||||
|
||||
row_pos = self._write_line(
|
||||
ws,
|
||||
row_pos,
|
||||
ws_params,
|
||||
col_specs_section="header",
|
||||
default_format=self.format_theader_yellow_left,
|
||||
)
|
||||
|
||||
ws.freeze_panes(row_pos, 0)
|
||||
|
||||
for line in lines:
|
||||
row_pos = self._write_line(
|
||||
ws,
|
||||
row_pos,
|
||||
ws_params,
|
||||
col_specs_section="line",
|
||||
render_space={"line": line},
|
||||
default_format=self.format_tcell_left,
|
||||
)
|
||||
22
intrastat_product/security/intrastat_security.xml
Normal file
22
intrastat_product/security/intrastat_security.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="intrastat_transaction_company_rule" model="ir.rule">
|
||||
<field name="name">Intrastat Transaction Company rule</field>
|
||||
<field name="model_id" ref="model_intrastat_transaction"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_region_company_rule" model="ir.rule">
|
||||
<field name="name">Intrastat Region Company rule</field>
|
||||
<field name="model_id" ref="model_intrastat_region"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_company_rule" model="ir.rule">
|
||||
<field name="name">Intrastat Product Declaration Company rule</field>
|
||||
<field name="model_id" ref="model_intrastat_product_declaration"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
13
intrastat_product/security/ir.model.access.csv
Normal file
13
intrastat_product/security/ir.model.access.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_intrastat_unit_read,Read access on Intrastat Supplementary Units to everybody,model_intrastat_unit,,1,0,0,0
|
||||
access_intrastat_unit_full,Full access on Intrastat Supplementary Units to Finance manager,model_intrastat_unit,account.group_account_manager,1,1,1,1
|
||||
access_intrastat_transaction_read,Read access on Intrastat Transaction Types to everybody,model_intrastat_transaction,,1,0,0,0
|
||||
access_intrastat_transaction_full,Full access on Intrastat Transaction Types to Finance manager,model_intrastat_transaction,account.group_account_manager,1,1,1,1
|
||||
access_intrastat_transport_mode_read,Read access on Intrastat Transport Modes to everybody,model_intrastat_transport_mode,,1,0,0,0
|
||||
access_intrastat_transport_mode_full,Full access on Intrastat Transport Modes to Finance manager,model_intrastat_transport_mode,account.group_account_manager,1,1,1,1
|
||||
access_intrastat_region_read,Read access on Intrastat Regions,model_intrastat_region,,1,0,0,0
|
||||
access_intrastat_region_full,Full access on Intrastat Regions,model_intrastat_region,account.group_account_manager,1,1,1,1
|
||||
access_hs_code_financial_mgr_full,Full access on H.S. Code to financial mgr,product_harmonized_system.model_hs_code,account.group_account_manager,1,1,1,1
|
||||
access_intrastat_product_declaration,Full access on Intrastat Product Declarations to Accountant,model_intrastat_product_declaration,account.group_account_user,1,1,1,1
|
||||
access_intrastat_product_computation_line,Full access on Intrastat Product Computation Lines to Accountant,model_intrastat_product_computation_line,account.group_account_user,1,1,1,1
|
||||
access_intrastat_product_declaration_line,Full access on Intrastat Product Declaration Lines to Accountant,model_intrastat_product_declaration_line,account.group_account_user,1,1,1,1
|
||||
|
BIN
intrastat_product/static/description/icon.png
Normal file
BIN
intrastat_product/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
467
intrastat_product/static/description/index.html
Normal file
467
intrastat_product/static/description/index.html
Normal file
@@ -0,0 +1,467 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Intrastat Product</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="intrastat-product">
|
||||
<h1 class="title">Intrastat Product</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-intrastat_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/227/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module contains common objects and fields for the Intrastat Product reporting.</p>
|
||||
<p>It should be used in combination with country-specific Intrastat Product reporting modules
|
||||
such as:</p>
|
||||
<ul class="simple">
|
||||
<li><em>l10n_fr_intrastat_product</em>:
|
||||
the module for the <em>Déclaration d’Echange de Biens</em> (DEB) for France</li>
|
||||
<li><em>l10n_be_intrastat_product</em>:
|
||||
the module for the Intrastat Product Declaration for Belgium</li>
|
||||
</ul>
|
||||
<p>These country-specific modules can be found in the OCA localization for those countries.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="installation">
|
||||
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
|
||||
<p>This module is NOT compatible with the <em>account_intrastat</em> module from Odoo Enterprise.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||
<p>This module is used in combination with the country-specific
|
||||
localization module(s).</p>
|
||||
<p><strong>Coding guidelines for localization module:</strong></p>
|
||||
<p>We recommend to start by copying an existing module, e.g. l10n_be_intrastat_product
|
||||
and adapt the code for the specific needs of your country.</p>
|
||||
<ul>
|
||||
<li><p class="first">Declaration Object</p>
|
||||
<p>Create a new class as follows:</p>
|
||||
<pre class="code python literal-block">
|
||||
<span class="k">class</span> <span class="nc">L10nCcIntrastatProductDeclaration</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
|
||||
<span class="n">_name</span> <span class="o">=</span> <span class="s1">'l10n.cc.intrastat.product.declaration'</span>
|
||||
<span class="n">_description</span> <span class="o">=</span> <span class="s2">"Intrastat Product Declaration for YourCountry"</span>
|
||||
<span class="n">_inherit</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'intrastat.product.declaration'</span><span class="p">,</span> <span class="s1">'mail.thread'</span><span class="p">]</span>
|
||||
</pre>
|
||||
<p>whereby cc = your country code</p>
|
||||
</li>
|
||||
<li><p class="first">Computation & Declaration Lines</p>
|
||||
<p>Create also new objects inheriting from the Computation and Declaration Line Objects
|
||||
so that you can add methods or customise the methods from the base modules (make a PR when
|
||||
the customization or new method is required for multiple countries).</p>
|
||||
<p>Adapt also the parent_id fields of the newly created objects
|
||||
(cf. l10n_be_intrastat_product as example).</p>
|
||||
</li>
|
||||
<li><p class="first">XML Files: Menu, Action, Views</p>
|
||||
<p>Cf. l10n_be_istrastat_product as example, replace “be” by your Country Code.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues/new?body=module:%20intrastat_product%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>brain-tec AG</li>
|
||||
<li>Akretion</li>
|
||||
<li>Noviat</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Alexis de Lattre, Akretion <<a class="reference external" href="mailto:alexis.delattre@akretion.com">alexis.delattre@akretion.com</a>></li>
|
||||
<li>Luc De Meyer, Noviat <<a class="reference external" href="mailto:info@noviat.com">info@noviat.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product">OCA/intrastat-extrastat</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
24
intrastat_product/views/account_move.xml
Normal file
24
intrastat_product/views/account_move.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.invoice.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='other_info']//field[@name='invoice_incoterm_id']" position="after">
|
||||
<field name="intrastat_transaction_id"/>
|
||||
<field name="intrastat" invisible="1"/>
|
||||
<field name="intrastat_transport_id"
|
||||
attrs="{'invisible': [('intrastat', '!=', 'extended')]}"
|
||||
widget="selection"/>
|
||||
<field name="src_dest_country_id" string="Destination Country"/>
|
||||
<field name="src_dest_region_id" string="Origin Region" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='invoice_line_ids']//field[@name='account_id']" position="after">
|
||||
<field name="hs_code_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
42
intrastat_product/views/hs_code.xml
Normal file
42
intrastat_product/views/hs_code.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2010-2017 Akretion (http://www.akretion.com/)
|
||||
© 2015-2017 Noviat (http://www.noviat.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
@author Luc De Meyer <luc.demeyer@noviat.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- Add the H.S. code menu under the Intrastat Config menu -->
|
||||
<menuitem id="intrastat_code_menu"
|
||||
action="product_harmonized_system.hs_code_action"
|
||||
parent="intrastat_base.menu_intrastat_config_root"
|
||||
sequence="10"/>
|
||||
|
||||
<!-- Inherit tree view of H.S. code -->
|
||||
<record id="hs_code_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.hs.code.tree</field>
|
||||
<field name="model">hs.code</field>
|
||||
<field name="inherit_id" ref="product_harmonized_system.hs_code_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="local_code" position="after">
|
||||
<field name="intrastat_unit_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Inherit form view for H.S. code -->
|
||||
<record id="hs_code_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.hs.code.form</field>
|
||||
<field name="model">hs.code</field>
|
||||
<field name="inherit_id" ref="product_harmonized_system.hs_code_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="local_code" position="after">
|
||||
<field name="intrastat_unit_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
277
intrastat_product/views/intrastat_product_declaration.xml
Normal file
277
intrastat_product/views/intrastat_product_declaration.xml
Normal file
@@ -0,0 +1,277 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="intrastat_product_declaration_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.form</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Product Declaration">
|
||||
<header>
|
||||
<button name="action_gather" type="object"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('action', '=', 'nihil')]}"
|
||||
string="Generate Lines from Invoices"
|
||||
class="oe_highlight"/>
|
||||
<button name="generate_declaration" type="object"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('action', '=', 'nihil')]}"
|
||||
string="Generate Declaration Lines"/>
|
||||
<button name="generate_xml"
|
||||
string="Generate XML Declaration File"
|
||||
type="object"
|
||||
attrs="{'invisible': [('state', '!=', 'draft')]}"
|
||||
invisible="context.get('generic_intrastat_product_declaration')"/>
|
||||
<button name="done" string="Done" type="object" class="oe_highlight" states="draft"/>
|
||||
<button name="back2draft" string="Back to Draft" type="object" states="done"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet string="Intrastat Product Declaration">
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<span>Intrastat Product Declaration </span>
|
||||
<field name="year_month" class="oe_inline"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="top-block">
|
||||
<group name="properties-1">
|
||||
<field name="year"/>
|
||||
<field name="month"/>
|
||||
<field name="type"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
</group>
|
||||
<group name="properties-2">
|
||||
<field name="action"/>
|
||||
<field name="revision"/>
|
||||
<field name="total_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="num_decl_lines"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="company_country_code" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Transactions">
|
||||
<header>
|
||||
<button name="create_xls" type="object" string="Excel Export"
|
||||
context="{'computation_lines': 1}"/>
|
||||
</header>
|
||||
<group name="computation_lines">
|
||||
<field name="computation_line_ids"
|
||||
context="{'type': type, 'reporting_level': reporting_level}"
|
||||
nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Declaration Lines">
|
||||
<header>
|
||||
<button name="create_xls" type="object" string="Excel Export"
|
||||
context="{'declaration_lines': 1}"/>
|
||||
</header>
|
||||
<group name="declaration_lines">
|
||||
<field name="declaration_line_ids"
|
||||
context="{'type': type, 'reporting_level': reporting_level}"
|
||||
nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="note"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.tree</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Product Declarations" decoration-info="state=='draft'">
|
||||
<field name="year_month"/>
|
||||
<field name="revision"/>
|
||||
<field name="type"/>
|
||||
<field name="num_decl_lines"/>
|
||||
<field name="total_amount" sum="Total amount"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_view_search" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.search</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Intrastat Product Declarations">
|
||||
<filter name="arrivals" string="Arrivals" domain="[('type', '=', 'arrivals')]"/>
|
||||
<filter name="dispatches" string="Dispatches" domain="[('type', '=', 'dispatches')]"/>
|
||||
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]" />
|
||||
<filter name="done" string="Done" domain="[('state', '=', 'done')]" />
|
||||
<group string="Group By" name="group_by">
|
||||
<filter name="date_group_by" string="Date" context="{'group_by': 'year_month'}" />
|
||||
<filter name="type_group_by" string="Type" context="{'group_by': 'type'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_view_graph" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.graph</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Intrastat Product" type="bar" stacked="False">
|
||||
<field name="year_month" type="row"/>
|
||||
<field name="type" type="row"/>
|
||||
<field name="total_amount" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_view_pivot" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.pivot</field>
|
||||
<field name="model">intrastat.product.declaration</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Intrastat Product">
|
||||
<field name="year_month" type="row"/>
|
||||
<field name="type" type="col"/>
|
||||
<field name="total_amount" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- No menuitem nor action since these are provided by the localization modules -->
|
||||
|
||||
<record id="intrastat_product_computation_line_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.computation.line.form</field>
|
||||
<field name="model">intrastat.product.computation.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Transaction">
|
||||
<group string="Transaction" name="transaction">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_computation_line_main_view')"/>
|
||||
<field name="product_id"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="amount_accessory_cost_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="transaction_id"/>
|
||||
<label for="weight"/>
|
||||
<div name="weight">
|
||||
<field name="weight" class="oe_inline"/> Kg
|
||||
</div>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</group>
|
||||
<group string="Declaration" name="declaration">
|
||||
<field name="declaration_line_id"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_computation_line_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.computation.line.tree</field>
|
||||
<field name="model">intrastat.product.computation.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Transactions">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_computation_line_main_view')"/>
|
||||
<field name="product_id"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="amount_accessory_cost_company_currency"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"
|
||||
attrs="{'invisible': [('intrastat_unit_id', '=', False)], 'required': [('intrastat_unit_id', '!=', False)]}"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1" string="Product C/O"/>
|
||||
<field name="invoice_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_line_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.line.form</field>
|
||||
<field name="model">intrastat.product.declaration.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Declaration Line">
|
||||
<group name="declaration">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_declaration_line_main_view')"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
<field name="transaction_id"/>
|
||||
<label for="weight"/>
|
||||
<div name="weight">
|
||||
<field name="weight" class="oe_inline"/> Kg
|
||||
</div>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1"/>
|
||||
</group>
|
||||
<group name="computation" string="Related Transactions">
|
||||
<field name="computation_line_ids" nolabel="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_product_declaration_line_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.product.declaration.line.tree</field>
|
||||
<field name="model">intrastat.product.declaration.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Declaration Lines">
|
||||
<field name="parent_id"
|
||||
invisible="not context.get('intrastat_product_declaration_line_main_view')"/>
|
||||
<field name="hs_code_id"/>
|
||||
<field name="src_dest_country_id" domain="[('intrastat', '=', True)]"/>
|
||||
<field name="amount_company_currency"/>
|
||||
<field name="transaction_id"/>
|
||||
<field name="weight"/>
|
||||
<field name="suppl_unit_qty"/>
|
||||
<field name="intrastat_unit_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="reporting_level" invisible="1"/>
|
||||
<field name="transport_id"
|
||||
attrs="{'required': [('reporting_level', '=', 'extended')], 'invisible': [('reporting_level', '!=', 'extended')]}"/>
|
||||
<field name="region_id" invisible="1"/>
|
||||
<field name="incoterm_id" invisible="1"/>
|
||||
<field name="product_origin_country_id" invisible="1" string="Product C/O"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
44
intrastat_product/views/intrastat_region.xml
Normal file
44
intrastat_product/views/intrastat_region.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="intrastat_region_view_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.region.form</field>
|
||||
<field name="model">intrastat.region</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Region">
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
<field name="country_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_region_view_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.region.tree</field>
|
||||
<field name="model">intrastat.region</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Region">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
<field name="country_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_region_action" model="ir.actions.act_window">
|
||||
<field name="name">Intrastat Regions</field>
|
||||
<field name="res_model">intrastat.region</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="intrastat_region_menu"
|
||||
action="intrastat_region_action"
|
||||
parent="intrastat_base.menu_intrastat_config_root"/>
|
||||
|
||||
</odoo>
|
||||
65
intrastat_product/views/intrastat_transaction.xml
Normal file
65
intrastat_product/views/intrastat_transaction.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2010-2017 Akretion (http://www.akretion.com/)
|
||||
© 2015-2017 Noviat (http://www.noviat.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
@author Luc De Meyer <luc.demeyer@noviat.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- Intrastat Transaction Type -->
|
||||
<record id="intrastat_transaction_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.transaction_form</field>
|
||||
<field name="model">intrastat.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Transaction Type">
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="description"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transaction_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.transaction_tree</field>
|
||||
<field name="model">intrastat.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Transaction Types">
|
||||
<field name="code"/>
|
||||
<field name="description"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transaction_mode_search" model="ir.ui.view">
|
||||
<field name="name">intrastat.transaction.mode.search</field>
|
||||
<field name="model">intrastat.transaction</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Intrastat Transaction Types">
|
||||
<field name="description" string="Code or Description"
|
||||
filter_domain="['|', ('code', 'ilike', self), ('description', 'ilike', self)]"/>
|
||||
<group string="Group By" name="groupby">
|
||||
<filter name="company_groupby" string="Company"
|
||||
context="{'group_by': 'company_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transaction_action" model="ir.actions.act_window">
|
||||
<field name="name">Transaction Types</field>
|
||||
<field name="res_model">intrastat.transaction</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="intrastat_transaction_menu"
|
||||
action="intrastat_transaction_action"
|
||||
parent="intrastat_base.menu_intrastat_config_root"
|
||||
sequence="20"/>
|
||||
|
||||
</odoo>
|
||||
61
intrastat_product/views/intrastat_transport_mode.xml
Normal file
61
intrastat_product/views/intrastat_transport_mode.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2010-2017 Akretion (http://www.akretion.com/)
|
||||
© 2015-2017 Noviat (http://www.noviat.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
@author Luc De Meyer <luc.demeyer@noviat.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- Intrastat Transport Mode -->
|
||||
<record id="intrastat_transport_mode_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.transport.mode.form</field>
|
||||
<field name="model">intrastat.transport_mode</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Transport Mode">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="description"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transport_mode_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.transport.mode.tree</field>
|
||||
<field name="model">intrastat.transport_mode</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Transportat Modes">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transport_mode_search" model="ir.ui.view">
|
||||
<field name="name">intrastat.transport.mode.search</field>
|
||||
<field name="model">intrastat.transport_mode</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Intrastat Transport Modes">
|
||||
<field name="name" string="Name, Code or Description"
|
||||
filter_domain="['|', '|', ('name', 'ilike', self), ('description', 'ilike', self), ('code', 'ilike', self)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_transport_action" model="ir.actions.act_window">
|
||||
<field name="name">Transport Modes</field>
|
||||
<field name="res_model">intrastat.transport_mode</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="intrastat_transport_menu"
|
||||
action="intrastat_transport_action"
|
||||
parent="intrastat_base.menu_intrastat_config_root"
|
||||
sequence="30"/>
|
||||
|
||||
</odoo>
|
||||
71
intrastat_product/views/intrastat_unit.xml
Normal file
71
intrastat_product/views/intrastat_unit.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2010-2017 Akretion (http://www.akretion.com/)
|
||||
© 2015-2017 Noviat (http://www.noviat.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
@author Luc De Meyer <luc.demeyer@noviat.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- Intrastat Supplementary Unit -->
|
||||
<record id="intrastat_unit_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.unit.form</field>
|
||||
<field name="model">intrastat.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Intrastat Supplementary Unit">
|
||||
<field name="active" invisible="1"/>
|
||||
<widget name="web_ribbon" text="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group name="main">
|
||||
<field name="name"/>
|
||||
<field name="uom_id" required="1"/>
|
||||
<field name="description"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_unit_tree" model="ir.ui.view">
|
||||
<field name="name">intrastat.unit.tree</field>
|
||||
<field name="model">intrastat.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Intrastat Supplementary Units">
|
||||
<field name="name"/>
|
||||
<field name="uom_id"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="intrastat_unit_search" model="ir.ui.view">
|
||||
<field name="name">intrastat.unit.search</field>
|
||||
<field name="model">intrastat.unit</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Intrastat Supplementary Units">
|
||||
<field name="name"
|
||||
filter_domain="['|', ('name', 'ilike', self), ('description', 'ilike', self)]"/>
|
||||
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
||||
<group string="Group By" name="groupby">
|
||||
<filter name="uom_groupby" string="Regular UoM"
|
||||
context="{'group_by': 'uom_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="intrastat_unit_action" model="ir.actions.act_window">
|
||||
<field name="name">Supplementary Units</field>
|
||||
<field name="res_model">intrastat.unit</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="intrastat_unit_menu"
|
||||
action="intrastat_unit_action"
|
||||
parent="intrastat_base.menu_intrastat_config_root"
|
||||
sequence="40"/>
|
||||
|
||||
</odoo>
|
||||
78
intrastat_product/views/res_config_settings.xml
Normal file
78
intrastat_product/views/res_config_settings.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
© 2018 brain-tec AG (Kumar Aberer <kumar.aberer@braintec-group.com>)
|
||||
© 2019 Noviat (www.noviat.com)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_res_config_settings" model="ir.ui.view">
|
||||
<field name="name">intrastat.account.config.settings.form</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="intrastat_base.view_intrastat_res_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//div[@id='intrastat']" position="after">
|
||||
|
||||
<field name="country_id" invisible="1"/>
|
||||
<field name="country_code" invisible="1"/>
|
||||
|
||||
<div class="row mt16 o_settings_container" id="intrastat-product">
|
||||
|
||||
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane" id="intrastat-product-main-params">
|
||||
<div class="row">
|
||||
<label for="intrastat_arrivals" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_arrivals"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="intrastat_dispatches" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_dispatches"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="intrastat_transport_id" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_transport_id"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="intrastat_transaction_out_invoice" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_transaction_out_invoice"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="intrastat_transaction_out_refund" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_transaction_out_refund"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="intrastat_transaction_in_invoice" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_transaction_in_invoice"/>
|
||||
</div>
|
||||
<div class="row" attrs="{'invisible': [('country_code', 'in', ['FR'])]}">
|
||||
<label for="intrastat_transaction_in_refund" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_transaction_in_refund"/>
|
||||
</div>
|
||||
<div class="row" attrs="{'invisible': [('country_code', 'not in', ['BE'])]}">
|
||||
<label for="intrastat_region_id" class="col-md-5 o_light_label"/>
|
||||
<field name="intrastat_region_id" domain="[('country_id','=', country_id)]"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="intrastat_accessory_costs"
|
||||
attrs="{'invisible': [('country_code', 'in', ['BE'])]}"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="row">
|
||||
<label for="intrastat_accessory_costs" class="col-md-12 o_light_label"
|
||||
attrs="{'invisible': [('country_code', 'in', ['BE'])]}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
20
intrastat_product/views/sale_order.xml
Normal file
20
intrastat_product/views/sale_order.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="sale_order_form" model="ir.ui.view">
|
||||
<field name="name">intrastat.sale.order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="incoterm" position="after">
|
||||
<field name="intrastat_transport_id"
|
||||
attrs="{'invisible': [('intrastat', '!=', 'extended')]}"
|
||||
widget="selection"/>
|
||||
<field name="intrastat" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
15
intrastat_product/views/stock_warehouse.xml
Normal file
15
intrastat_product/views/stock_warehouse.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_warehouse" model="ir.ui.view">
|
||||
<field name="name">intrastat.stock.warehouse.form</field>
|
||||
<field name="model">stock.warehouse</field>
|
||||
<field name="inherit_id" ref="stock.view_warehouse"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="region_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
74
intrastat_product_generic/README.rst
Normal file
74
intrastat_product_generic/README.rst
Normal file
@@ -0,0 +1,74 @@
|
||||
=====================================
|
||||
Generic Intrastat Product Declaration
|
||||
=====================================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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%2Fintrastat--extrastat-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product_generic
|
||||
:alt: OCA/intrastat-extrastat
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-intrastat_product_generic
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/227/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module adds a menu entry for a Generic Intrastat Product Declaration.
|
||||
This is useful to cover countries for which there is no localization module.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/intrastat-extrastat/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/intrastat-extrastat/issues/new?body=module:%20intrastat_product_generic%0Aversion:%2012.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
|
||||
~~~~~~~
|
||||
|
||||
* Noviat
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Luc De Meyer <luc.demeyer@noviat.com>
|
||||
|
||||
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/intrastat-extrastat <https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product_generic>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
0
intrastat_product_generic/__init__.py
Normal file
0
intrastat_product_generic/__init__.py
Normal file
14
intrastat_product_generic/__manifest__.py
Normal file
14
intrastat_product_generic/__manifest__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright 2009-2020 Noviat.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Generic Intrastat Product Declaration",
|
||||
"version": "13.0.1.0.0",
|
||||
"category": "Accounting & Finance",
|
||||
"website": "https://github.com/OCA/intrastat",
|
||||
"author": "Noviat," "Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"installable": True,
|
||||
"depends": ["intrastat_product"],
|
||||
"data": ["security/intrastat_security.xml", "views/intrastat_product.xml"],
|
||||
}
|
||||
22
intrastat_product_generic/i18n/intrastat_product_generic.pot
Normal file
22
intrastat_product_generic/i18n/intrastat_product_generic.pot
Normal file
@@ -0,0 +1,22 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * intrastat_product_generic
|
||||
#
|
||||
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: intrastat_product_generic
|
||||
#: model:ir.actions.act_window,name:intrastat_product_generic.intrastat_product_declaration_action_generic
|
||||
#: model:ir.ui.menu,name:intrastat_product_generic.intrastat_product_declaration_menu_generic
|
||||
#: model:res.groups,name:intrastat_product_generic.group_intrastat_product_generic
|
||||
msgid "Generic Intrastat Product Declaration"
|
||||
msgstr ""
|
||||
|
||||
1
intrastat_product_generic/readme/CONTRIBUTORS.rst
Normal file
1
intrastat_product_generic/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1 @@
|
||||
* Luc De Meyer <luc.demeyer@noviat.com>
|
||||
2
intrastat_product_generic/readme/DESCRIPTION.rst
Normal file
2
intrastat_product_generic/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
This module adds a menu entry for a Generic Intrastat Product Declaration.
|
||||
This is useful to cover countries for which there is no localization module.
|
||||
12
intrastat_product_generic/security/intrastat_security.xml
Normal file
12
intrastat_product_generic/security/intrastat_security.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="group_intrastat_product_generic" model="res.groups">
|
||||
<field name="name">Generic Intrastat Product Declaration</field>
|
||||
</record>
|
||||
|
||||
<record id="base.user_admin" model="res.users">
|
||||
<field eval="[(4, ref('group_intrastat_product_generic'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
BIN
intrastat_product_generic/static/description/icon.png
Normal file
BIN
intrastat_product_generic/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
420
intrastat_product_generic/static/description/index.html
Normal file
420
intrastat_product_generic/static/description/index.html
Normal file
@@ -0,0 +1,420 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Generic Intrastat Product Declaration</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="generic-intrastat-product-declaration">
|
||||
<h1 class="title">Generic Intrastat Product Declaration</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product_generic"><img alt="OCA/intrastat-extrastat" src="https://img.shields.io/badge/github-OCA%2Fintrastat--extrastat-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/intrastat-extrastat-12-0/intrastat-extrastat-12-0-intrastat_product_generic"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/227/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds a menu entry for a Generic Intrastat Product Declaration.
|
||||
This is useful to cover countries for which there is no localization module.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/intrastat-extrastat/issues/new?body=module:%20intrastat_product_generic%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Noviat</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Luc De Meyer <<a class="reference external" href="mailto:luc.demeyer@noviat.com">luc.demeyer@noviat.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/intrastat-extrastat/tree/12.0/intrastat_product_generic">OCA/intrastat-extrastat</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
intrastat_product_generic/views/intrastat_product.xml
Normal file
16
intrastat_product_generic/views/intrastat_product.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="intrastat_product_declaration_action_generic" model="ir.actions.act_window">
|
||||
<field name="name">Generic Intrastat Product Declaration</field>
|
||||
<field name="res_model">intrastat.product.declaration</field>
|
||||
<field name="view_mode">tree,form,graph,pivot</field>
|
||||
<field name="context">{'generic_intrastat_product_declaration': 1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="intrastat_product_declaration_menu_generic"
|
||||
parent="intrastat_base.menu_intrastat_base_root"
|
||||
action="intrastat_product_declaration_action_generic"
|
||||
groups="group_intrastat_product_generic"/>
|
||||
|
||||
</odoo>
|
||||
1
oca_dependencies.txt
Normal file
1
oca_dependencies.txt
Normal file
@@ -0,0 +1 @@
|
||||
reporting-engine
|
||||
Reference in New Issue
Block a user