diff --git a/purchase.py b/purchase.py index 932ef5f2d4..fe9cc18369 100644 --- a/purchase.py +++ b/purchase.py @@ -24,6 +24,7 @@ class Purchase(OSV): 'readonly': "state != 'draft' or bool(lines)", }) reference = fields.Char('Reference', size=None, readonly=True, select=1) + supplier_reference = fields.Char('Supplier Reference', select=1) description = fields.Char('Description', size=None, states=_STATES) state = fields.Selection([ ('draft', 'Draft'), @@ -577,6 +578,9 @@ class Purchase(OSV): ids = self.search(cursor, user, [('reference', operator, name)] + args, limit=limit, context=context) + ids += self.search(cursor, user, + [('supplier_reference', operator, name)] + args, limit=limit, + context=context) if not ids: ids = self.search(cursor, user, [('party', operator, name)] + args, limit=limit, context=context) diff --git a/purchase.xml b/purchase.xml index 504b2f5d85..ed53dd97a0 100644 --- a/purchase.xml +++ b/purchase.xml @@ -21,7 +21,8 @@ this repository contains the full copyright notices and license terms. -->