summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2019-10-09 19:07:31 +0000
committerfw-bot <otis@odoo.com>2019-10-11 03:12:05 +0000
commit9fe33e650e771a41bfb908ef991736e62036d8fb (patch)
tree5b4ea130ce6d19947cc8b6058ec3f63cb3864565 /addons
parentbf5744b5c3412baad9151d87c600936fff66a7a7 (diff)
[FIX] account: Use correct field in domain
Fixes https://github.com/odoo/odoo/issues/38308 payment_term_id has been replaced by invoice_payment_term_id closes odoo/odoo#38448 X-original-commit: f6a5510e677404d6f917049b732b8fe5ba98a78b Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_payment_term.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_payment_term.py b/addons/account/models/account_payment_term.py
index bd202de2d5f..bb918807168 100644
--- a/addons/account/models/account_payment_term.py
+++ b/addons/account/models/account_payment_term.py
@@ -69,7 +69,7 @@ class AccountPaymentTerm(models.Model):
def unlink(self):
for terms in self:
- if self.env['account.move'].search([('payment_term_id', 'in', terms.ids)]):
+ if self.env['account.move'].search([('invoice_payment_term_id', 'in', terms.ids)]):
raise UserError(_('You can not delete payment terms as other records still reference it. However, you can archive it.'))
property_recs = self.env['ir.property'].search([('value_reference', 'in', ['account.payment.term,%s'%payment_term.id for payment_term in terms])])
property_recs.unlink()