From 247c1972ab541850ec71187ca320e6ddaa2644de Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 23 Apr 2009 10:57:50 +0200 Subject: [PATCH 1/2] [FIX] allow to use the field 'id' in views (i.e., needed for domain) bzr revid: christophe@tinyerp.com-20090423085750-rwt7kxgz7hmmop3f --- bin/osv/orm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 21029248635..258047c906e 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -893,7 +893,10 @@ class orm_template(object): arch = node.toxml(encoding="utf-8").replace('\t', '') fields = self.fields_get(cr, user, fields_def.keys(), context) for field in fields_def: - if field in fields: + if field == 'id': + # sometime, the view may containt the (invisible) field 'id' needed for a domain (when 2 objects have cross references) + fields['id'] = {'readonly': True, 'type': 'integer', 'string': 'ID'} + elif field in fields: fields[field].update(fields_def[field]) else: cr.execute('select name, model from ir_ui_view where (id=%s or inherit_id=%s) and arch like %s', (view_id, view_id, '%%%s%%' % field)) From 6dcc5a4f9f93c294afd788837cd7408ad14113df Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 23 Apr 2009 11:40:34 +0200 Subject: [PATCH 2/2] [FIX] Remove the price_accuracy option from the SMTP section bzr revid: stephane@tinyerp.com-20090423094034-trkozl1mkz3sef0u --- bin/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tools/config.py b/bin/tools/config.py index 00ff93db82d..efd7aa7b7bf 100644 --- a/bin/tools/config.py +++ b/bin/tools/config.py @@ -113,6 +113,7 @@ class configmanager(object): parser.add_option('--debug', dest='debug_mode', action='store_true', default=False, help='enable debug mode') parser.add_option("--assert-exit-level", dest='assert_exit_level', type="choice", choices=self._LOGLEVELS.keys(), help="specify the level at which a failed assertion will stop the server. Accepted values: %s" % (self._LOGLEVELS.keys(),)) + parser.add_option('--price_accuracy', dest='price_accuracy', default='2', help='specify the price accuracy') if hasSSL: group = optparse.OptionGroup(parser, "SSL Configuration") group.add_option("-S", "--secure", dest="secure", @@ -143,7 +144,6 @@ class configmanager(object): group.add_option('--smtp-ssl', dest='smtp_ssl', default='', help='specify the SMTP server support SSL or not') group.add_option('--smtp-user', dest='smtp_user', default='', help='specify the SMTP username for sending email') group.add_option('--smtp-password', dest='smtp_password', default='', help='specify the SMTP password for sending email') - group.add_option('--price_accuracy', dest='price_accuracy', default='2', help='specify the price accuracy') parser.add_option_group(group) group = optparse.OptionGroup(parser, "Database related options")