From a230dfb364a5586ae582f6ae99d35a124c64e563 Mon Sep 17 00:00:00 2001 From: pinky <> Date: Wed, 27 Dec 2006 11:56:48 +0000 Subject: [PATCH] Pricelist: relate button to version OSV/Fields: bugfix bzr revid: pinky-7209b697a70dcf42750e812a6d7f43030a6b53ae --- bin/osv/fields.py | 8 ++++---- doc/INSTALL | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index dbcc30822b7..4ae70fd33e7 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -525,14 +525,14 @@ class property(function): return res def _field_get(self, self2, cr, uid, prop): - if not self.field_id: + if not self.field_id.get(cr.dbname): cr.execute('select id from ir_model_fields where name=%s and model=%s', (prop, self2._name)) res = cr.fetchone() - self.field_id = res and res[0] - return self.field_id + self.field_id[cr.dbname] = res and res[0] + return self.field_id[cr.dbname] def __init__(self, obj_prop, **args): - self.field_id = False + self.field_id = {} function.__init__(self, self._fnct_read, False, self._fnct_write, (obj_prop, ), diff --git a/doc/INSTALL b/doc/INSTALL index eea1f651435..a1814d26203 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -33,6 +33,14 @@ following commands: apt-get install libxslt1-python2.3 python2.3-psycopg python2.3-reportlab apt-get install python2.3-imaging python2.3-pyparsing graphviz +For newer Debian-based distributions such as Etch, the required packages can be +installed with the following commands: + + apt-get install python2.4 python-xml postgresql postgresql-client python-libxml2 + apt-get install python-libxslt1 python-psycopg python-reportlab + apt-get install python-imaging python-pyparsing graphviz + + For Fedora if they are not installed, install: python and postgresql