[MIG] account_payment_partner: Migration to 13.0

This commit is contained in:
Raf Ven
2019-12-19 11:28:06 +01:00
committed by Marçal Isern
parent 615dc1bdf0
commit 832bdb54fe
14 changed files with 345 additions and 341 deletions

View File

@@ -29,7 +29,7 @@ class AccountPaymentMode(models.Model):
def account_invoice_company_constrains(self):
for mode in self:
if (
self.env["account.invoice"]
self.env["account.move"]
.sudo()
.search(
[
@@ -42,7 +42,7 @@ class AccountPaymentMode(models.Model):
raise ValidationError(
_(
"You cannot change the Company. There exists "
"at least one Invoice with this Payment Mode, "
"at least one Journal Entry with this Payment Mode, "
"already assigned to another Company."
)
)