mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
@@ -53,6 +53,12 @@ Installation
|
|||||||
This module is NOT compatible with the *account_intrastat* module from
|
This module is NOT compatible with the *account_intrastat* module from
|
||||||
Odoo Enterprise.
|
Odoo Enterprise.
|
||||||
|
|
||||||
|
We recommended to install the module **product_net_weight** from
|
||||||
|
``OCA/product-attribute <https://github.com/OCA/product-attribute>``\ \_.
|
||||||
|
If this module is installed, Odoo will use the *Net Weight* field of the
|
||||||
|
product to compute the intrastat declaration instead of the native
|
||||||
|
*Weight* field.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|||||||
@@ -363,7 +363,12 @@ class IntrastatProductDeclaration(models.Model):
|
|||||||
elif source_uom.category_id == product.uom_id.category_id:
|
elif source_uom.category_id == product.uom_id.category_id:
|
||||||
# We suppose that, on product.template,
|
# We suppose that, on product.template,
|
||||||
# the 'weight' field is per uom_id
|
# the 'weight' field is per uom_id
|
||||||
weight = product.weight * source_uom._compute_quantity(
|
# Test if module product_net_weight from OCA/product-attribute is installed
|
||||||
|
if hasattr(product, "net_weight"):
|
||||||
|
product_weight = product.net_weight
|
||||||
|
else:
|
||||||
|
product_weight = product.weight
|
||||||
|
weight = product_weight * source_uom._compute_quantity(
|
||||||
line_qty, product.uom_id
|
line_qty, product.uom_id
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
This module is NOT compatible with the *account_intrastat* module from
|
This module is NOT compatible with the *account_intrastat* module from
|
||||||
Odoo Enterprise.
|
Odoo Enterprise.
|
||||||
|
|
||||||
|
We recommended to install the module **product_net_weight** from `OCA/product-attribute <https://github.com/OCA/product-attribute>`_. If this module is installed, Odoo will use the *Net Weight* field of the product to compute the intrastat declaration instead of the native *Weight* field.
|
||||||
|
|||||||
@@ -402,6 +402,11 @@ those countries.</p>
|
|||||||
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
|
||||||
<p>This module is NOT compatible with the <em>account_intrastat</em> module from
|
<p>This module is NOT compatible with the <em>account_intrastat</em> module from
|
||||||
Odoo Enterprise.</p>
|
Odoo Enterprise.</p>
|
||||||
|
<p>We recommended to install the module <strong>product_net_weight</strong> from
|
||||||
|
<tt class="docutils literal"><span class="pre">OCA/product-attribute</span> <span class="pre"><https://github.com/OCA/product-attribute></span></tt>_.
|
||||||
|
If this module is installed, Odoo will use the <em>Net Weight</em> field of the
|
||||||
|
product to compute the intrastat declaration instead of the native
|
||||||
|
<em>Weight</em> field.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="configuration">
|
<div class="section" id="configuration">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
|
||||||
|
|||||||
Reference in New Issue
Block a user