diff --git a/trytond/init.sql b/trytond/init.sql index 9ee59d054f..41d942b071 100644 --- a/trytond/init.sql +++ b/trytond/init.sql @@ -18,8 +18,6 @@ CREATE TABLE ir_model_field ( relation varchar, field_description varchar, ttype varchar, - group_name varchar, - view_load boolean, help text, module varchar, primary key(id) diff --git a/trytond/ir/model.py b/trytond/ir/model.py index ebe543a56b..e189881674 100644 --- a/trytond/ir/model.py +++ b/trytond/ir/model.py @@ -39,8 +39,6 @@ class ModelField(OSV): ttype = fields.Char('Field Type') groups = fields.Many2Many('res.group', 'ir_model_field_group_rel', 'field_id', 'group_id', 'Groups') - group_name = fields.Char('Group Name') - view_load = fields.Boolean('View Auto-Load') help = fields.Text('Help', translate=True) module = fields.Char('Module', help="Module in which this field is defined") @@ -52,9 +50,6 @@ class ModelField(OSV): 'The field name in model must be unique!'), ] - def default_view_load(self, cursor, user, context=None): - return False - def default_name(self, cursor, user, context=None): return 'No Name' diff --git a/trytond/ir/ui/form.rnc b/trytond/ir/ui/form.rnc index ccdda4fae0..860cb575f6 100644 --- a/trytond/ir/ui/form.rnc +++ b/trytond/ir/ui/form.rnc @@ -12,8 +12,7 @@ form = | notebook | group | hpaned - | vpaned - | properties)* + | vpaned)* } attlist.form &= [ a:defaultValue = "Unknown" ] attribute string { text }? @@ -176,8 +175,7 @@ page = | notebook | group | hpaned - | vpaned - | properties)* + | vpaned)* } attlist.page &= attribute angle { text }? attlist.page &= @@ -197,8 +195,7 @@ group = | notebook | group | hpaned - | vpaned - | properties)* + | vpaned)* } attlist.group &= attribute string { text }? attlist.group &= [ a:defaultValue = "1" ] attribute colspan { text }? @@ -228,8 +225,7 @@ child1 = | notebook | group | hpaned - | vpaned - | properties)* + | vpaned)* } attlist.child1 &= empty @@ -245,14 +241,10 @@ child2 = | notebook | group | hpaned - | vpaned - | properties)* + | vpaned)* } attlist.child2 &= empty -properties = element properties { attlist.properties, empty } -attlist.properties &= empty - data = element data { attlist.data, xpath+ } attlist.data &= empty diff --git a/trytond/ir/ui/form.rng b/trytond/ir/ui/form.rng index 666f820178..d85f277dd2 100644 --- a/trytond/ir/ui/form.rng +++ b/trytond/ir/ui/form.rng @@ -15,7 +15,6 @@ - @@ -646,7 +645,6 @@ - @@ -691,7 +689,6 @@ - @@ -793,7 +790,6 @@ - @@ -816,7 +812,6 @@ - @@ -824,15 +819,6 @@ - - - - - - - - - diff --git a/trytond/osv/fields.py b/trytond/osv/fields.py index 7631ddac20..69e9ce0ba5 100644 --- a/trytond/osv/fields.py +++ b/trytond/osv/fields.py @@ -67,8 +67,6 @@ class Column(object): self.translate = translate self._domain = domain or [] self._context = context - self.group_name = False - self.view_load = 0 if select not in (0, 1, 2): raise Exception('Error', 'Select must be one of 0, 1, 2') self.select = select diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index fc9da50402..7beffd3690 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -349,8 +349,7 @@ class ORM(object): cursor.execute('SELECT f.id AS id, f.name AS name, ' \ 'f.field_description AS field_description, ' \ 'f.ttype AS ttype, f.relation AS relation, ' \ - 'f.group_name AS group_name, f.view_load AS view_load, ' \ - 'f.module as module '\ + 'f.module as module, f.help AS help '\ 'FROM ir_model_field AS f, ir_model AS m ' \ 'WHERE f.model = m.id ' \ 'AND m.model = %s ', @@ -382,30 +381,21 @@ class ORM(object): if k not in columns: cursor.execute("INSERT INTO ir_model_field " \ "(model, name, field_description, ttype, " \ - "relation, group_name, view_load, help, module) " \ - "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)", + "relation, help, module) " \ + "VALUES (%s, %s, %s, %s, %s, %s, %s)", (model_id, k, field.string, field._type, - field._obj or '', field.group_name or '', - (field.view_load and 'True') or 'False', - field.help, module_name)) + field._obj or '', field.help, module_name)) elif columns[k]['field_description'] != field.string \ or columns[k]['ttype'] != field._type \ or columns[k]['relation'] != (field._obj or '') \ - or columns[k]['group_name'] != (field.group_name or '') \ - or columns[k]['view_load'] != \ - ((field.view_load and 'True') or 'False') \ or columns[k]['help'] != field.help: cursor.execute('UPDATE ir_model_field ' \ 'SET field_description = %s, ' \ 'ttype = %s, ' \ 'relation = %s, ' \ - 'group_name = %s, ' \ - 'view_load = %s, ' \ 'help = %s ' \ 'WHERE id = %s ', (field.string, field._type, field._obj or '', - field.group_name or '', - (field.view_load and 'True') or 'False', field.help, columns[k]['id'])) trans_name = self._name + ',' + k if trans_name not in trans_columns: @@ -2061,35 +2051,6 @@ class ORM(object): if result: element.set('string', result) - # Add view for properties ! - if element.tag == 'properties': - parent = element.getparent() - models = ["'" + x + "'" for x in [self._name] + \ - self._inherits.keys()] - cursor.execute('SELECT f.name AS name, ' \ - 'f.group_name AS group_name ' \ - 'FROM ir_model_field AS f, ir_model AS m ' \ - 'WHERE f.model = m.id ' \ - 'AND m.model in (' + ','.join(models) + ') ' \ - 'AND f.view_load ORDER BY f.group_name, f.id') - oldgroup = None - for fname, gname in cursor.fetchall(): - if oldgroup != gname: - child = etree.Element('separator') - child.set('string', gname) - child.set('colspan', '4') - oldgroup = gname - parent.insert(parent.index(element), child) - - child = etree.Element('label') - child.set('name', fname) - parent.insert(parent.index(element), child) - child = etree.Element('field') - child.set('name', fname) - parent.insert(parent.index(element), child) - parent.remove(element) - element = parent - if childs: for field in element: fields_attrs.update(self.__view_look_dom(cursor, user, field,