From edf80bf78ed6fd45d4e55c768460c1785429591c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Dec 2008 17:43:21 +0100 Subject: [PATCH 1/2] Fix colspan for invisible fields --- purchase.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.xml b/purchase.xml index 504b2f5d85..aa6559f8cf 100644 --- a/purchase.xml +++ b/purchase.xml @@ -103,8 +103,8 @@ this repository contains the full copyright notices and license terms. --> - - + + ]]> From 2683634ea40b8450862646e1f6ee5c0e586f223e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Dec 2008 17:49:40 +0100 Subject: [PATCH 2/2] Add supplier_reference on purchase --- purchase.py | 4 ++++ purchase.xml | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 aa6559f8cf..ed53dd97a0 100644 --- a/purchase.xml +++ b/purchase.xml @@ -21,7 +21,8 @@ this repository contains the full copyright notices and license terms. -->