diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 719b4cdf857..3a159b073cc 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -891,7 +891,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)) 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")