Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] l10n_be_intrastat_product: Migration to 17.0 #225

Open
wants to merge 21 commits into
base: 17.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
db8cf27
[14.0]add l10n_be_intrastat_product
luc-demeyer Oct 14, 2022
b553703
l10n_be_intrastat_product - add maintainer
luc-demeyer Oct 15, 2022
a785349
l10n_be_intrastat_product - add unit test for refunds
luc-demeyer Oct 15, 2022
3adac76
l10n_be_intrastat_product - refund handling
luc-demeyer Oct 31, 2022
f11e713
[UPD] Update l10n_be_intrastat_product.pot
Nov 3, 2022
02e6f43
use README.rst from maintainer tools templates
luc-demeyer Nov 11, 2022
083f85e
intrastat readme
luc-demeyer Nov 11, 2022
92b177f
[UPD] README.rst
OCA-git-bot Nov 12, 2022
498e08d
[IMP] l10n_be_intrastat_product: pre-commit execution
jdidderen Nov 11, 2023
a81b2de
[MIG] l10n_be_intrastat_product: Migration to 15.0
jdidderen Nov 13, 2023
63a5ab6
[UPD] Update l10n_be_intrastat_product.pot
Nov 13, 2023
a756f24
[BOT] post-merge updates
OCA-git-bot Nov 13, 2023
fafa6b2
[MIG] l10n_be_intrastat_product: Migration to 16.0
jdidderen Nov 12, 2023
cba171e
[FIX]l10n_be_intrastat_product_declaration - remove obsolete code
luc-demeyer Apr 29, 2024
18743de
[IMP]l10n_be_intrastat_product - update readme
luc-demeyer Apr 29, 2024
ca909af
[FIX]l10n_be_intrastat_product fix unit tests
luc-demeyer Apr 29, 2024
76b65ff
[UPD] Update l10n_be_intrastat_product.pot
May 2, 2024
7224a12
[IMP] l10n_be_intrastat_product: pre-commit auto fixes
luc-demeyer Sep 30, 2024
0ffca14
[MIG] l10n_be_intrastat_product: Migration to 17.0
luc-demeyer Sep 30, 2024
8197a86
[MIG] l10n_be_intrastat_product: Migration to 17.0 - fix unit tests
luc-demeyer Sep 30, 2024
3ef773a
[IMP] l10n_be_intrastat_product - remove no longer used code
luc-demeyer Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[IMP] l10n_be_intrastat_product: pre-commit auto fixes
  • Loading branch information
luc-demeyer committed Sep 30, 2024
commit 7224a12f10026cdab20f5f3fad3df61e98193bc2
161 changes: 78 additions & 83 deletions l10n_be_intrastat_product/README.rst
Original file line number Diff line number Diff line change
@@ -17,21 +17,21 @@ Intrastat Product Declaration for Belgium
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--belgium-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-belgium/tree/16.0/l10n_be_intrastat_product
:target: https://github.com/OCA/l10n-belgium/tree/17.0/l10n_be_intrastat_product
:alt: OCA/l10n-belgium
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-belgium-16-0/l10n-belgium-16-0-l10n_be_intrastat_product
:target: https://translation.odoo-community.org/projects/l10n-belgium-17-0/l10n-belgium-17-0-l10n_be_intrastat_product
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-belgium&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-belgium&target_branch=17.0
:alt: Try me on Runboat

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

This module implements the Belgian Intrastat reporting.

The report can be reviewed and corrected where needed before
the creation of the XML file for the online declaration (ONEGATE).
The report can be reviewed and corrected where needed before the
creation of the XML file for the online declaration (ONEGATE).

More information can be found on the National Bank website:
https://www.nbb.be/en/statistics/foreign-trade
@@ -45,141 +45,136 @@ Installation
============

Conflicting modules
~~~~~~~~~~~~~~~~~~~
-------------------

This module conflicts with the *account_intrastat* and *l10n_be_intrastat*
modules from the Odoo Enterprise addons.
If you have already installed these modules,
you should uninstall them before installing this module.
This module conflicts with the *account_intrastat* and
*l10n_be_intrastat* modules from the Odoo Enterprise addons. If you have
already installed these modules, you should uninstall them before
installing this module.

Refund handling
~~~~~~~~~~~~~~~
---------------

We recommend to also install the OCA stock_picking_invoice_link module,
cf. https://github.com/OCA/stock-logistics-workflow.
This modules establishes a link between invoice lines and stock pickings.
When this module is installed the declaration will take into account refunds created via return pickings.
cf. https://github.com/OCA/stock-logistics-workflow. This modules
establishes a link between invoice lines and stock pickings. When this
module is installed the declaration will take into account refunds
created via return pickings.

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

* Accounting -> Configuration -> Settings
- Accounting -> Configuration -> Settings

Section Intrastat:
Section Intrastat:

- Arrivals : Exempt, Standard or Extended
- Dispatches : Exempt, Standard or Extended
- Default Intrastat Transport Mode (Required for Extended Declaration)
- Default Intrastat Region
- Arrivals : Exempt, Standard or Extended
- Dispatches : Exempt, Standard or Extended
- Default Intrastat Transport Mode (Required for Extended
Declaration)
- Default Intrastat Region

Section Customer Invoices:
Section Customer Invoices:

- Default Incoterm
- Default Incoterm

|
- Warehouse

* Warehouse
Intrastat Region to cope with warehouses in different regions

Intrastat Region to cope with warehouses in different regions
- Inrastat Codes, Supplementary Units, Transaction Tyoes, Transport
Modes, Regions

|
Cf. menu Accounting / Configuration / Intrastat

* Inrastat Codes, Supplementary Units, Transaction Tyoes, Transport Modes, Regions
The configuration data is loaded when installing the module. We do
not recommend to change these settings.

Cf. menu Accounting / Configuration / Intrastat
A configuration wizard (part of the **intrastat_product** module)
also allows to update the Intrastat Codes so that you can easily
synchronise your Odoo instance with the latest list of codes supplied
by the configuration wizard. (an update is published on an annual
basis by the Belgian National Bank).

The configuration data is loaded when installing the module.
We do not recommend to change these settings.
- Product

A configuration wizard (part of the **intrastat_product** module) also allows to update the
Intrastat Codes so that you can easily synchronise your Odoo instance with the latest list
of codes supplied by the configuration wizard.
(an update is published on an annual basis by the Belgian National Bank).
You can define a default Intrastat Code on the Product or the Product
Category.

|
- Fiscal Positions

* Product
Check your Fiscal Positions and set the 'Intrastat' field for
transactions that must be included in the intrastat declaration. We
recommend to set the 'VAT required' flag on the 'Intra Community
Regime' Fiscal Position for B2B customers.

You can define a default Intrastat Code on the Product or the Product Category.
If you have B2C customers or B2B customers which are not subject to
VAT you can create a 'Intra Community Regime NA' Fiscal Position on
which the 'Intrastat' field is set to B2C while the 'VAT required'
flag has been turned off.

|
- Partner

* Fiscal Positions
Ensure that your B2B Customer records have a valid VAT Number.

Check your Fiscal Positions and set the 'Intrastat' field for transactions that must be included
in the intrastat declaration.
We recommend to set the 'VAT required' flag on the 'Intra Community Regime' Fiscal Position
for B2B customers.

If you have B2C customers or B2B customers which are not subject to VAT you can create a
'Intra Community Regime NA' Fiscal Position on which the 'Intrastat' field is set to B2C
while the 'VAT required' flag has been turned off.

|

* Partner

Ensure that your B2B Customer records have a valid VAT Number.

Consider the use of the OCA **account_fiscal_position_vat_check module** to enforce the correct setting.
Cf. https://github.com/OCA/account-financial-tools.
Consider the use of the OCA **account_fiscal_position_vat_check
module** to enforce the correct setting. Cf.
https://github.com/OCA/account-financial-tools.

Known issues / Roadmap
======================

* The current version of the Belgian Intrastat reporting module is only based on invoices.
Since associated stock moves are not taken into consideration, it is possible that manual
corrections are required, e.g.
Product movements without invoices are not included in the current version
of this module and must be added manually to the report lines
before generating the ONEGATE XML declaration.

* Refunds on invoices within the same reporting period are deducted from the declaration lines.
No controls are executed on Refunds that are not linked to an invoice
in the same reporting period.
Such Refunds are reported under the default transaction code for refunds.
It is recommend to manually set the correct transaction code while Credit Notes
are created.

* The current version of the Belgian Intrastat reporting module does not perform a
cross-check with the VAT declaration.
- The current version of the Belgian Intrastat reporting module is only
based on invoices. Since associated stock moves are not taken into
consideration, it is possible that manual corrections are required,
e.g. Product movements without invoices are not included in the
current version of this module and must be added manually to the
report lines before generating the ONEGATE XML declaration.
- Refunds on invoices within the same reporting period are deducted
from the declaration lines. No controls are executed on Refunds that
are not linked to an invoice in the same reporting period. Such
Refunds are reported under the default transaction code for refunds.
It is recommend to manually set the correct transaction code while
Credit Notes are created.
- The current version of the Belgian Intrastat reporting module does
not perform a cross-check with the VAT declaration.

Changelog
=========

This module is also available for olders Odoo versions:

- Odoo 12.0 - 13.0: cf. https://github.com/Noviat/noviat-apps

- Odoo 7.0 - 11.0: cf. https://github.com/luc-demeyer/noviat-apps
- Odoo 12.0 - 13.0: cf. https://github.com/Noviat/noviat-apps
- Odoo 7.0 - 11.0: cf. https://github.com/luc-demeyer/noviat-apps

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-belgium/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-belgium/issues/new?body=module:%20l10n_be_intrastat_product%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-belgium/issues/new?body=module:%20l10n_be_intrastat_product%0Aversion:%2017.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
~~~~~~~~~~~~
------------

- Noviat <https://noviat.com>

* Noviat <https://noviat.com>
* Luc De Meyer <luc.demeyer@noviat.com>
* Jérémy Didderen <jeremy.didderen@noviat.com>
- Luc De Meyer <luc.demeyer@noviat.com>
- Jérémy Didderen <jeremy.didderen@noviat.com>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

@@ -202,6 +197,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-luc-demeyer| |maintainer-jdidderen-noviat|

This module is part of the `OCA/l10n-belgium <https://github.com/OCA/l10n-belgium/tree/16.0/l10n_be_intrastat_product>`_ project on GitHub.
This module is part of the `OCA/l10n-belgium <https://github.com/OCA/l10n-belgium/tree/17.0/l10n_be_intrastat_product>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line number Diff line number Diff line change
@@ -64,7 +64,6 @@ def _handle_refund(self, inv_line, line_vals, notedict):
return_picking = False

if return_picking:

if refund.move_type == "in_refund":
if self.declaration_type == "arrivals":
if self.company_id.intrastat_dispatches == "exempt":
@@ -342,7 +341,7 @@ def _generate_xml(self):
)
module = __name__.split("addons.")[1].split(".")[0]
self.company_id._intrastat_check_xml_schema(
xml_string, "{}/static/data/{}.xsd".format(module, xsd)
xml_string, f"{module}/static/data/{xsd}.xsd"
)
return xml_string
else:
3 changes: 3 additions & 0 deletions l10n_be_intrastat_product/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
55 changes: 55 additions & 0 deletions l10n_be_intrastat_product/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
- Accounting -\> Configuration -\> Settings

Section Intrastat:

- Arrivals : Exempt, Standard or Extended
- Dispatches : Exempt, Standard or Extended
- Default Intrastat Transport Mode (Required for Extended Declaration)
- Default Intrastat Region

Section Customer Invoices:

- Default Incoterm

- Warehouse

Intrastat Region to cope with warehouses in different regions

- Inrastat Codes, Supplementary Units, Transaction Tyoes, Transport
Modes, Regions

Cf. menu Accounting / Configuration / Intrastat

The configuration data is loaded when installing the module. We do not
recommend to change these settings.

A configuration wizard (part of the **intrastat_product** module) also
allows to update the Intrastat Codes so that you can easily
synchronise your Odoo instance with the latest list of codes supplied
by the configuration wizard. (an update is published on an annual
basis by the Belgian National Bank).

- Product

You can define a default Intrastat Code on the Product or the Product
Category.

- Fiscal Positions

Check your Fiscal Positions and set the 'Intrastat' field for
transactions that must be included in the intrastat declaration. We
recommend to set the 'VAT required' flag on the 'Intra Community
Regime' Fiscal Position for B2B customers.

If you have B2C customers or B2B customers which are not subject to
VAT you can create a 'Intra Community Regime NA' Fiscal Position on
which the 'Intrastat' field is set to B2C while the 'VAT required'
flag has been turned off.

- Partner

Ensure that your B2B Customer records have a valid VAT Number.

Consider the use of the OCA **account_fiscal_position_vat_check
module** to enforce the correct setting. Cf.
<https://github.com/OCA/account-financial-tools>.
60 changes: 0 additions & 60 deletions l10n_be_intrastat_product/readme/CONFIGURE.rst

This file was deleted.

3 changes: 3 additions & 0 deletions l10n_be_intrastat_product/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Noviat \<<https://noviat.com>\>
- Luc De Meyer \<<luc.demeyer@noviat.com>\>
- Jérémy Didderen \<<jeremy.didderen@noviat.com>\>
3 changes: 0 additions & 3 deletions l10n_be_intrastat_product/readme/CONTRIBUTORS.rst

This file was deleted.

Loading
Loading