[IMP] Added one2many handling
parent
ce948cb18c
commit
f94b4ddfd3
|
@ -14,7 +14,7 @@
|
|||
<notebook colspan="4">
|
||||
<page string="Fields">
|
||||
<field name="field_ids" colspan="4" nolabel="1"
|
||||
domain="[('ttype', 'not in', ['one2many', 'reference', 'function']), ('model_id', 'in', model_ids[0][2])]"/>
|
||||
domain="[('ttype', 'not in', ['reference', 'function']), ('model_id', 'in', model_ids[0][2])]"/>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<group colspan="2" col="2">
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue