diff --git a/hotel/models/inherited_account_invoice.py b/hotel/models/inherited_account_invoice.py
index 97c3da25c..31537804a 100644
--- a/hotel/models/inherited_account_invoice.py
+++ b/hotel/models/inherited_account_invoice.py
@@ -44,10 +44,13 @@ class AccountInvoice(models.Model):
@api.multi
def action_invoice_open(self):
to_open_invoices_without_vat = self.filtered(lambda inv: inv.state != 'open' and inv.partner_id.vat == False)
- if to_open_invoices_without_vat:
- vat_error = _("We need the VAT of the following companies")
+ to_open_invoices_without_country = self.filtered(lambda inv: inv.state != 'open' and not inv.partner_id.country_id)
+ if to_open_invoices_without_vat or to_open_invoices_without_country:
+ vat_error = _("We need the VAT and Country of the following companies")
for invoice in to_open_invoices_without_vat:
vat_error += ", " + invoice.partner_id.name
+ for invoice in to_open_invoices_without_country:
+ vat_error += ", " + invoice.partner_id.name
raise ValidationError(vat_error)
return super(AccountInvoice, self).action_invoice_open()
diff --git a/hotel/views/hotel_reservation_views.xml b/hotel/views/hotel_reservation_views.xml
index 25fbfbf69..74a9ef4ec 100644
--- a/hotel/views/hotel_reservation_views.xml
+++ b/hotel/views/hotel_reservation_views.xml
@@ -190,7 +190,6 @@
/>
-