diff --git a/l10n_fr_intrastat_product/__manifest__.py b/l10n_fr_intrastat_product/__manifest__.py
index dd5bf0acc..1dd1d095b 100644
--- a/l10n_fr_intrastat_product/__manifest__.py
+++ b/l10n_fr_intrastat_product/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "EMEBI",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"category": "Localisation/Report Intrastat",
"license": "AGPL-3",
"summary": "EMEBI (ex-DEB) for France",
diff --git a/l10n_fr_intrastat_product/data/intrastat_product_reminder.xml b/l10n_fr_intrastat_product/data/intrastat_product_reminder.xml
index 8603ed14a..d0059e71f 100644
--- a/l10n_fr_intrastat_product/data/intrastat_product_reminder.xml
+++ b/l10n_fr_intrastat_product/data/intrastat_product_reminder.xml
@@ -12,7 +12,6 @@
1
months
- -1
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import models
+
+
+class StockLocation(models.Model):
+ _inherit = "stock.location"
+
+ def _get_fr_department(self):
+ self.ensure_one()
+ warehouse = self.env["stock.warehouse"].search(
+ [("lot_stock_id", "parent_of", self.id)], limit=1
+ )
+ if warehouse:
+ return warehouse._get_fr_department()
+ return None
diff --git a/l10n_fr_intrastat_product/models/stock.py b/l10n_fr_intrastat_product/models/stock_warehouse.py
similarity index 61%
rename from l10n_fr_intrastat_product/models/stock.py
rename to l10n_fr_intrastat_product/models/stock_warehouse.py
index 5502b0f8c..d26dcdb76 100644
--- a/l10n_fr_intrastat_product/models/stock.py
+++ b/l10n_fr_intrastat_product/models/stock_warehouse.py
@@ -14,16 +14,3 @@ def _get_fr_department(self):
if not self.partner_id:
raise UserError(_("Missing partner on warehouse '%s'.") % self.display_name)
return self.partner_id.country_department_id
-
-
-class StockLocation(models.Model):
- _inherit = "stock.location"
-
- def _get_fr_department(self):
- self.ensure_one()
- warehouse = self.env["stock.warehouse"].search(
- [("lot_stock_id", "parent_of", self.ids)], limit=1
- )
- if warehouse:
- return warehouse._get_fr_department()
- return None
diff --git a/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml b/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml
index ab0638ba2..171a9bec6 100644
--- a/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml
+++ b/l10n_fr_intrastat_product/views/intrastat_fr_regime.xml
@@ -40,8 +40,8 @@
intrastat.fr.regime
-
-
+
+
@@ -52,7 +52,7 @@
decoration-warning="declaration_type == 'dispatches'"
widget="badge"
/>
-
+
@@ -96,7 +96,7 @@
Regime Codes
intrastat.fr.regime
- tree,form
+ list,form