diff --git a/mass_editing/mass_editing_view.xml b/mass_editing/mass_editing_view.xml index f0b3e7124..10ea6b6e8 100644 --- a/mass_editing/mass_editing_view.xml +++ b/mass_editing/mass_editing_view.xml @@ -14,7 +14,7 @@ + domain="[('ttype', 'not in', ['reference', 'function']), ('model_id', 'in', model_ids[0][2])]"/> diff --git a/mass_editing/wizard/mass_editing_wizard.py b/mass_editing/wizard/mass_editing_wizard.py index a773cf346..8bf88cf8f 100644 --- a/mass_editing/wizard/mass_editing_wizard.py +++ b/mass_editing/wizard/mass_editing_wizard.py @@ -49,6 +49,19 @@ class mass_editing_wizard(orm.TransientModel): etree.SubElement(xml_group, 'separator', {'string': field_info[field.name]['string'], 'colspan': '2'}) etree.SubElement(xml_group, 'field', {'name': "selection__" + field.name, 'colspan': '2', 'nolabel':'1'}) etree.SubElement(xml_group, 'field', {'name': field.name, 'colspan':'4', 'nolabel':'1', 'attrs':"{'invisible':[('selection__" + field.name + "','=','remove_m2m')]}"}) + elif field.ttype == "one2many": + all_fields["selection__" + field.name] = {'type':'selection', + 'string': field_info[field.name]['string'], + 'selection':[('set', 'Set'), + ('remove', 'Remove')]} + all_fields[field.name] = {'type':field.ttype, + 'string': field.field_description, + 'relation': field.relation} + etree.SubElement(xml_group, 'field', + {'name': "selection__" + field.name, 'colspan':'2'}) + etree.SubElement(xml_group, 'field', + {'name': field.name, 'colspan':'4', 'nolabel':'1', + 'attrs':"{'invisible':[('selection__" + field.name + "','=','remove_o2m')]}"}) elif field.ttype == "many2one": all_fields["selection__" + field.name] = {'type':'selection', 'string': field_info[field.name]['string'], 'selection':[('set', 'Set'), ('remove', 'Remove')]} all_fields[field.name] = {'type':field.ttype, 'string': field.field_description, 'relation': field.relation}