[ADD] support for primary mode in <template>

should probably validate that there's an inherit_id (?)
This commit is contained in:
Xavier Morel 2014-05-27 11:47:44 +02:00
parent da345aaa2d
commit 8b9f774a22
1 changed files with 2 additions and 0 deletions

View File

@ -898,6 +898,8 @@ form: module.record_id""" % (xml_id,)
record.append(Field(name="groups_id", eval="[(6, 0, ["+', '.join(grp_lst)+"])]"))
if el.attrib.pop('page', None) == 'True':
record.append(Field(name="page", eval="True"))
if el.get('primary') == 'True':
record.append(Field('primary', name='mode'))
return self._tag_record(cr, record, data_node)