diff --git a/account_product_fiscal_classification/models/account_product_fiscal_classification.py b/account_product_fiscal_classification/models/account_product_fiscal_classification.py
index cc68164e4..42b9fc65b 100644
--- a/account_product_fiscal_classification/models/account_product_fiscal_classification.py
+++ b/account_product_fiscal_classification/models/account_product_fiscal_classification.py
@@ -9,6 +9,7 @@
class AccountProductFiscalClassification(models.Model):
_name = "account.product.fiscal.classification"
_description = "Fiscal Classification"
+ _order = "sequence, id"
name = fields.Char(required=True)
@@ -20,6 +21,8 @@ class AccountProductFiscalClassification(models.Model):
" Classification without removing it.",
)
+ sequence = fields.Integer(default=10)
+
company_id = fields.Many2one(
comodel_name="res.company",
string="Company",
diff --git a/account_product_fiscal_classification/models/account_product_fiscal_classification_template.py b/account_product_fiscal_classification/models/account_product_fiscal_classification_template.py
index 8846b053f..7568e6829 100644
--- a/account_product_fiscal_classification/models/account_product_fiscal_classification_template.py
+++ b/account_product_fiscal_classification/models/account_product_fiscal_classification_template.py
@@ -8,6 +8,7 @@
class AccountProductFiscalClassificationTemplate(models.Model):
_name = "account.product.fiscal.classification.template"
_description = "Fiscal Classification Template"
+ _order = "sequence, id"
name = fields.Char(required=True, translate=True)
@@ -25,6 +26,8 @@ class AccountProductFiscalClassificationTemplate(models.Model):
" Classification Template without removing it.",
)
+ sequence = fields.Integer(default=10)
+
purchase_tax_ids = fields.Many2many(
comodel_name="account.tax.template",
relation="fiscal_classification_template_purchase_tax_rel",
@@ -69,4 +72,5 @@ def _prepare_fiscal_classification(self, company, taxes_ref):
"description": self.description,
"purchase_tax_ids": [(6, 0, purchase_tax_ids)],
"sale_tax_ids": [(6, 0, sale_tax_ids)],
+ "sequence": self.sequence,
}
diff --git a/account_product_fiscal_classification/views/view_account_product_fiscal_classification.xml b/account_product_fiscal_classification/views/view_account_product_fiscal_classification.xml
index 406e2df5c..5ade8e12b 100644
--- a/account_product_fiscal_classification/views/view_account_product_fiscal_classification.xml
+++ b/account_product_fiscal_classification/views/view_account_product_fiscal_classification.xml
@@ -10,6 +10,7 @@
account.product.fiscal.classification
+
diff --git a/account_product_fiscal_classification/views/view_account_product_fiscal_classification_template.xml b/account_product_fiscal_classification/views/view_account_product_fiscal_classification_template.xml
index 324f684ab..f5b0c0684 100644
--- a/account_product_fiscal_classification/views/view_account_product_fiscal_classification_template.xml
+++ b/account_product_fiscal_classification/views/view_account_product_fiscal_classification_template.xml
@@ -13,6 +13,7 @@
account.product.fiscal.classification.template
+