From 4584b6dde2e987522a9f4bd59156afbdc7eb7af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 1 Aug 2008 16:36:20 +0200 Subject: [PATCH] Use domain of payment_term field for the search of default in prevention of futur inherit that will add domain --- purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index cfa50dedc7..8b6b579207 100644 --- a/purchase.py +++ b/purchase.py @@ -98,8 +98,8 @@ class Purchase(OSV): def default_payment_term(self, cursor, user, context=None): payment_term_obj = self.pool.get('account.invoice.payment_term') - payment_term_ids = payment_term_obj.search(cursor, user, [], - context=context) + payment_term_ids = payment_term_obj.search(cursor, user, + self.payment_term._domain, context=context) if len(payment_term_ids) == 1: return payment_term_obj.name_get(cursor, user, payment_term_ids, context=context)[0]