diff --git a/locale/ca.po b/locale/ca.po
index db029b7..c5b9468 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -2,11 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "field:product.template,purchase_homologation_required:"
+msgctxt "field:product.product,purchase_homologation_required:"
msgid "Purchase Homologation Required"
msgstr "Requereix homologació"
-msgctxt "field:product.product,purchase_homologation_required:"
+msgctxt "field:product.template,purchase_homologation_required:"
msgid "Purchase Homologation Required"
msgstr "Requereix homologació"
@@ -17,3 +17,10 @@ msgid ""
msgstr ""
"No es pot finalitzar la compra \"%(purchase)s\" perquè la línia \"%(line)s\""
" necessita un proveïdor."
+
+msgctxt "model:ir.message,text:product_purchase_deactivate"
+msgid ""
+"Cannot end the purchase \"%(purchase)s\" because have a deactivate supplier."
+msgstr ""
+"No es pot finalitzar la compra \"%(purchase)s\" perquè un proveïdor "
+"desactivat."
diff --git a/locale/es.po b/locale/es.po
index 3b10fd2..722e948 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -2,11 +2,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "field:product.template,purchase_homologation_required:"
+msgctxt "field:product.product,purchase_homologation_required:"
msgid "Purchase Homologation Required"
msgstr "Requiere homologación"
-msgctxt "field:product.product,purchase_homologation_required:"
+msgctxt "field:product.template,purchase_homologation_required:"
msgid "Purchase Homologation Required"
msgstr "Requiere homologación"
@@ -17,3 +17,10 @@ msgid ""
msgstr ""
"No se puede finalizar la compra \"%(purchase)s\" porque la línia "
"\"%(line)s\" necessita un proveedor."
+
+msgctxt "model:ir.message,text:product_purchase_deactivate"
+msgid ""
+"Cannot end the purchase \"%(purchase)s\" because have a deactivate supplier."
+msgstr ""
+"No se puede finalizar la compra \"%(purchase)s\" porque tiene un proveedor "
+"desactivado."
diff --git a/message.xml b/message.xml
index 822940e..0b2f3e9 100644
--- a/message.xml
+++ b/message.xml
@@ -6,5 +6,8 @@ this repository contains the full copyright notices and license terms. -->
Cannot end the purchase "%(purchase)s" because the line "%(line)s" needs a supplier.
+
+ Cannot end the purchase "%(purchase)s" because have a deactivate supplier.
+
\ No newline at end of file
diff --git a/purchase.py b/purchase.py
index 98fe66c..20d691b 100644
--- a/purchase.py
+++ b/purchase.py
@@ -20,3 +20,12 @@ class Purchase(metaclass=PoolMeta):
'product_purchase_homologation.cannot_end_purchase',
purchase=purchase.id,
line=line.rec_name))
+ if (line.product and
+ line.product.purchase_homologation_required and
+ line.product_supplier and
+ line.product_supplier.active == False and
+ line.type == 'line'):
+ raise UserError(gettext(
+ 'product_purchase_homologation.product_purchase_deactivate',
+ purchase=purchase.id,
+ ))