[IMP] removing select=? and adding version=7

bzr revid: fp@tinyerp.com-20120609124045-sbopsbiiffcnjzfv
This commit is contained in:
Fabien Pinckaers 2012-06-09 14:40:45 +02:00
parent 31f5c72b71
commit 56288e88dc
25 changed files with 157 additions and 223 deletions

View File

@ -8,7 +8,7 @@
<field name="model">ir.values</field> <field name="model">ir.values</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Action Bindings"> <form string="Action Bindings" version="7.0">
<group> <group>
<group string="Action Binding"> <group string="Action Binding">
<field name="name"/> <field name="name"/>
@ -31,7 +31,7 @@
<field name="model">ir.values</field> <field name="model">ir.values</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="User-defined Defaults"> <form string="User-defined Defaults" version="7.0">
<label for="name" class="oe_form_readonly_hidden"/> <label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1> <h1><field name="name"/></h1>
<group> <group>
@ -136,10 +136,10 @@
<field name="model">ir.sequence</field> <field name="model">ir.sequence</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Sequences"> <form string="Sequences" version="7.0">
<group col="4"> <group col="4">
<field name="name" select="1"/> <field name="name"/>
<field name="code" select="1"/> <field name="code"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
<field name="active" groups="base.group_no_one"/> <field name="active" groups="base.group_no_one"/>
</group> </group>
@ -205,7 +205,7 @@
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="company_id" select="1" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</search> </search>
</field> </field>
</record> </record>
@ -228,7 +228,7 @@
<field name="model">ir.sequence.type</field> <field name="model">ir.sequence.type</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Sequence Type"> <form string="Sequence Type" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
@ -255,8 +255,8 @@
<field name="type">search</field> <field name="type">search</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Sequences Type"> <search string="Sequences Type">
<field name="name" select="1"/> <field name="name"/>
<field name="code" select="1"/> <field name="code"/>
</search> </search>
</field> </field>
</record> </record>
@ -280,7 +280,7 @@
<field name="model">ir.actions.actions</field> <field name="model">ir.actions.actions</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Action"> <form string="Action" version="7.0">
<group> <group>
<field name="name"/> <field name="name"/>
<field name="type"/> <field name="type"/>
@ -332,13 +332,13 @@
<field name="model">ir.actions.report.xml</field> <field name="model">ir.actions.report.xml</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Report"> <form string="Report" version="7.0">
<group col="6"> <group col="6">
<field name="name" select="1"/> <field name="name"/>
<field name="model" select="1"/> <field name="model"/>
<field name="usage"/> <field name="usage"/>
<field name="report_name" select="1"/> <field name="report_name"/>
<field name="report_type"/> <field name="report_type"/>
<field name="report_file"/> <field name="report_file"/>
</group> </group>
@ -436,12 +436,12 @@
<field name="model">ir.actions.act_window</field> <field name="model">ir.actions.act_window</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Open a Window"> <form string="Open a Window" version="7.0">
<group col="6"> <group col="6">
<field name="name" select="1"/> <field name="name"/>
<field name="res_model" select="1"/> <field name="res_model"/>
<field name="type" readonly="1"/> <field name="type" readonly="1"/>
<field name="src_model" select="2"/> <field name="src_model"/>
<field name="usage"/> <field name="usage"/>
<field name="target"/> <field name="target"/>
</group> </group>
@ -468,7 +468,7 @@
</group> </group>
<group string="Views"> <group string="Views">
<field colspan="2" name="view_ids" nolabel="1"> <field colspan="2" name="view_ids" nolabel="1">
<form string="Views"> <form string="Views" version="7.0">
<group> <group>
<field colspan="4" name="sequence"/> <field colspan="4" name="sequence"/>
<field name="view_mode"/> <field name="view_mode"/>
@ -536,8 +536,8 @@
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Wizard"> <tree string="Wizard">
<field name="name" select="1"/> <field name="name"/>
<field name="wiz_name" select="1"/> <field name="wiz_name"/>
<field name="multi"/> <field name="multi"/>
</tree> </tree>
</field> </field>
@ -548,7 +548,7 @@
<field name="model">ir.actions.wizard</field> <field name="model">ir.actions.wizard</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Wizards"> <form string="Wizards" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="type"/> <field name="type"/>
@ -615,17 +615,19 @@
<field name="model">ir.ui.view</field> <field name="model">ir.ui.view</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Views"> <form string="Views" version="7.0">
<group> <group>
<field name="name"/> <group>
<field name="type"/> <field name="name"/>
<field name="model"/> <field name="type"/>
<field name="priority"/> <field name="model"/>
</group> <field name="priority"/>
<group> </group>
<field name="field_parent"/> <group>
<field name="inherit_id"/> <field name="field_parent"/>
<field name="xml_id"/> <field name="inherit_id"/>
<field name="xml_id"/>
</group>
</group> </group>
<field name="arch"/> <field name="arch"/>
</form> </form>
@ -704,7 +706,7 @@
<field name="model">ir.ui.view.custom</field> <field name="model">ir.ui.view.custom</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Customized Views"> <form string="Customized Views" version="7.0">
<group col="4"> <group col="4">
<field name="user_id"/> <field name="user_id"/>
<field name="ref_id"/> <field name="ref_id"/>
@ -739,13 +741,13 @@
<field name="model">ir.attachment</field> <field name="model">ir.attachment</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Attachments"> <form string="Attachments" version="7.0">
<group col="4"> <group col="4">
<field name="name" /> <field name="name" />
<field name="type"/> <field name="type"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/> <field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group> </group>
<notebook colspan="4"> <notebook>
<page string="Attachment"> <page string="Attachment">
<group> <group>
<group attrs="{'invisible':[('type','=','url')]}" string="Data"> <group attrs="{'invisible':[('type','=','url')]}" string="Data">
@ -840,7 +842,7 @@
<field name="model">ir.model</field> <field name="model">ir.model</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Model Description"> <form string="Model Description" version="7.0">
<group col="6"> <group col="6">
<field name="name"/> <field name="name"/>
<field name="model"/> <field name="model"/>
@ -860,7 +862,7 @@
<field name="select_level"/> <field name="select_level"/>
<field name="state"/> <field name="state"/>
</tree> </tree>
<form string="Fields Description"> <form string="Fields Description" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="state"/> <field name="state"/>
@ -969,9 +971,9 @@
<field name="model">ir.model.fields</field> <field name="model">ir.model.fields</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Fields"> <form string="Fields" version="7.0">
<group colspan="4" col="6"> <group colspan="4" col="6">
<field name="name" select="1" /> <field name="name" />
<field name="model_id" attrs="{'readonly': [('state','!=', 'manual')]}"/> <field name="model_id" attrs="{'readonly': [('state','!=', 'manual')]}"/>
<field name="field_description"/> <field name="field_description"/>
<field name="state"/> <field name="state"/>
@ -1059,7 +1061,7 @@
<field name="model">ir.model.data</field> <field name="model">ir.model.data</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="External Identifiers"> <form string="External Identifiers" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="module"/> <field name="module"/>
@ -1153,9 +1155,9 @@
string="Untranslated" string="Untranslated"
domain="['|',('value', '=', False),('value','=','')]"/> domain="['|',('value', '=', False),('value','=','')]"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="lang" select="1"/> <field name="lang"/>
<field name="src" select="1"/> <field name="src"/>
<field name="value" select="1"/> <field name="value"/>
</search> </search>
</field> </field>
</record> </record>
@ -1165,7 +1167,7 @@
<field name="model">ir.translation</field> <field name="model">ir.translation</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Translations"> <form string="Translations" version="7.0">
<group> <group>
<group> <group>
<field name="name"/> <field name="name"/>
@ -1219,7 +1221,7 @@
<field name="model">ir.ui.view_sc</field> <field name="model">ir.ui.view_sc</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Shortcut"> <form string="Shortcut" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="sequence"/> <field name="sequence"/>
@ -1257,7 +1259,7 @@
<field name="model">ir.ui.menu</field> <field name="model">ir.ui.menu</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Menu"> <form string="Menu" version="7.0">
<group> <group>
<group> <group>
<field name="name"/> <field name="name"/>
@ -1337,7 +1339,7 @@
<field name="model">ir.cron</field> <field name="model">ir.cron</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Scheduled Actions"> <form string="Scheduled Actions" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="active"/> <field name="active"/>
@ -1436,7 +1438,7 @@
<field name="model">ir.model.access</field> <field name="model">ir.model.access</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Access Controls"> <form string="Access Controls" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
@ -1493,7 +1495,7 @@
<field name="model">ir.rule</field> <field name="model">ir.rule</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Record rules"> <form string="Record rules" version="7.0">
<group> <group>
<group string="General"> <group string="General">
<field colspan="4" name="name"/> <field colspan="4" name="name"/>
@ -1590,7 +1592,7 @@
<field name="model">ir.actions.server</field> <field name="model">ir.actions.server</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Server Action"> <form string="Server Action" version="7.0">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
@ -1642,7 +1644,7 @@
<field name="type"/> <field name="type"/>
<field name="value" colspan="4"/> <field name="value" colspan="4"/>
</tree> </tree>
<form string="Field Mapping"> <form string="Field Mapping" version="7.0">
<group col="4"> <group col="4">
<field name="col1" domain="[('model_id','=',parent.srcmodel_id or parent.model_id)]"/> <field name="col1" domain="[('model_id','=',parent.srcmodel_id or parent.model_id)]"/>
<field name="type"/> <field name="type"/>
@ -1742,7 +1744,7 @@
<field name="name">Config Wizard Steps</field> <field name="name">Config Wizard Steps</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Config Wizard Steps"> <form string="Config Wizard Steps" version="7.0">
<group col="4"> <group col="4">
<field name="action_id"/> <field name="action_id"/>
<field name="type"/> <field name="type"/>
@ -1816,7 +1818,7 @@
<field name="model">ir.actions.todo.category</field> <field name="model">ir.actions.todo.category</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Wizard Category"> <form string="Wizard Category" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="sequence"/> <field name="sequence"/>
@ -1859,7 +1861,7 @@
<field name="model">ir.mail_server</field> <field name="model">ir.mail_server</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Outgoing Mail Servers"> <form string="Outgoing Mail Servers" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="sequence"/> <field name="sequence"/>

View File

@ -203,53 +203,11 @@ class act_window(osv.osv):
def _search_view(self, cr, uid, ids, name, arg, context=None): def _search_view(self, cr, uid, ids, name, arg, context=None):
res = {} res = {}
def encode(s):
if isinstance(s, unicode):
return s.encode('utf8')
return s
for act in self.browse(cr, uid, ids, context=context): for act in self.browse(cr, uid, ids, context=context):
fields_from_fields_get = self.pool.get(act.res_model).fields_get(cr, uid, context=context) field_get = self.pool.get(act.res_model).fields_view_get(cr, uid,
search_view_id = False act.search_view_id and act.search_view_id.id or False,
if act.search_view_id: 'search', context=context)
search_view_id = act.search_view_id.id res[act.id] = str(field_get)
else:
res_view = self.pool.get('ir.ui.view').search(cr, uid,
[('model','=',act.res_model),('type','=','search'),
('inherit_id','=',False)], context=context)
if res_view:
search_view_id = res_view[0]
if search_view_id:
field_get = self.pool.get(act.res_model).fields_view_get(cr, uid, search_view_id,
'search', context)
fields_from_fields_get.update(field_get['fields'])
field_get['fields'] = fields_from_fields_get
res[act.id] = str(field_get)
else:
def process_child(node, new_node, doc):
for child in node.childNodes:
if child.localName=='field' and child.hasAttribute('select') \
and child.getAttribute('select')=='1':
if child.childNodes:
fld = doc.createElement('field')
for attr in child.attributes.keys():
fld.setAttribute(attr, child.getAttribute(attr))
new_node.appendChild(fld)
else:
new_node.appendChild(child)
elif child.localName in ('page','group','notebook'):
process_child(child, new_node, doc)
form_arch = self.pool.get(act.res_model).fields_view_get(cr, uid, False, 'form', context)
dom_arc = dom.minidom.parseString(encode(form_arch['arch']))
new_node = copy.deepcopy(dom_arc)
for child_node in new_node.childNodes[0].childNodes:
if child_node.nodeType == child_node.ELEMENT_NODE:
new_node.childNodes[0].removeChild(child_node)
process_child(dom_arc.childNodes[0],new_node.childNodes[0],dom_arc)
form_arch['arch'] = new_node.toxml()
form_arch['fields'].update(fields_from_fields_get)
res[act.id] = str(form_arch)
return res return res
def _get_help_status(self, cr, uid, ids, name, arg, context=None): def _get_help_status(self, cr, uid, ids, name, arg, context=None):

View File

@ -28,7 +28,7 @@
<field name="model">ir.config_parameter</field> <field name="model">ir.config_parameter</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="System Parameters"> <form string="System Parameters" version="7.0">
<group> <group>
<field name="key"/> <field name="key"/>
<field name="value"/> <field name="value"/>

View File

@ -16,7 +16,7 @@
<field name="model">ir.filters</field> <field name="model">ir.filters</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Filters"> <form string="Filters" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="user_id"/> <field name="user_id"/>

View File

@ -6,7 +6,7 @@
<field name="model">wizard.ir.model.menu.create</field> <field name="model">wizard.ir.model.menu.create</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Create Menu"> <form string="Create Menu" version="7.0">
<header> <header>
<button name="menu_create" string="Create _Menu" type="object"/> <button name="menu_create" string="Create _Menu" type="object"/>
<button special="cancel" string="_Cancel"/> <button special="cancel" string="_Cancel"/>

View File

@ -14,7 +14,7 @@
<field name="model">workflow</field> <field name="model">workflow</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Workflow"> <form string="Workflow" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="osv"/> <field name="osv"/>
@ -92,7 +92,7 @@
<field name="model">workflow.activity</field> <field name="model">workflow.activity</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Activity"> <form string="Activity" version="7.0">
<group> <group>
<group> <group>
<field name="name"/> <field name="name"/>
@ -201,7 +201,7 @@
<field name="model">workflow.transition</field> <field name="model">workflow.transition</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Transition"> <form string="Transition" version="7.0">
<group col="6"> <group col="6">
<field name="act_from"/> <field name="act_from"/>
<field name="act_to"/> <field name="act_to"/>
@ -262,7 +262,7 @@
<field name="model">workflow.instance</field> <field name="model">workflow.instance</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Workflow Instances"> <form string="Workflow Instances" version="7.0">
<group col="4"> <group col="4">
<field name="wkf_id"/> <field name="wkf_id"/>
<field name="res_id"/> <field name="res_id"/>
@ -322,7 +322,7 @@
<field name="model">workflow.workitem</field> <field name="model">workflow.workitem</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Workflow Workitems"> <form string="Workflow Workitems" version="7.0">
<group col="4"> <group col="4">
<field name="wkf_id"/> <field name="wkf_id"/>
<field name="act_id"/> <field name="act_id"/>

View File

@ -163,7 +163,7 @@ class module(osv.osv):
_columns = { _columns = {
'name': fields.char("Technical Name", size=128, readonly=True, required=True, select=True), 'name': fields.char("Technical Name", size=128, readonly=True, required=True, select=True),
'category_id': fields.many2one('ir.module.category', 'Category', readonly=True, select=True), 'category_id': fields.many2one('ir.module.category', 'Category', readonly=True, select=True),
'shortdesc': fields.char('Name', size=256, readonly=True, translate=True), 'shortdesc': fields.char('Module Name', size=256, readonly=True, translate=True),
'description': fields.text("Description", readonly=True, translate=True), 'description': fields.text("Description", readonly=True, translate=True),
'author': fields.char("Author", size=128, readonly=True), 'author': fields.char("Author", size=128, readonly=True),
'maintainer': fields.char('Maintainer', size=128, readonly=True), 'maintainer': fields.char('Maintainer', size=128, readonly=True),

View File

@ -9,7 +9,7 @@
<field name="model">ir.module.category</field> <field name="model">ir.module.category</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Module Category"> <form string="Module Category" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="parent_id"/> <field name="parent_id"/>
@ -119,7 +119,7 @@
<field name="model">ir.module.module</field> <field name="model">ir.module.module</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Module"> <form string="Module" version="7.0">
<header> <header>
<button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object" class="oe_form_button_hi"/> <button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object" class="oe_form_button_hi"/>
<button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object" class="oe_form_button_hi"/> <button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object" class="oe_form_button_hi"/>
@ -173,8 +173,8 @@
<separator string="Created Menus"/> <separator string="Created Menus"/>
<field name="menus_by_module"/> <field name="menus_by_module"/>
<separator string="Created Views"/> <separator string="Created Views"/>
<separator string="Defined Reports"/>
<field name="views_by_module"/> <field name="views_by_module"/>
<separator string="Defined Reports"/>
<field name="reports_by_module"/> <field name="reports_by_module"/>
</page> </page>
</notebook> </notebook>

View File

@ -7,34 +7,18 @@
<field name="model">base.language.import</field> <field name="model">base.language.import</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Import Translation"> <form string="Import Translation" version="7.0">
<group col="8"> <header>
<group colspan="3"> <button name="import_lang" string="_Import" type="object" icon="gtk-ok"/>
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/> <button special="cancel" string="_Close" icon="gtk-cancel"/>
<newline/> </header>
<label colspan="4" width="220" string="Supported file formats: *.csv (Comma-separated values) or *.po (GetText Portable Objects)"/> <separator string="Import Translation" colspan="2"/>
<label colspan="4" width="220" string="Please double-check that the file encoding is set to UTF-8 (sometimes called Unicode) when the translator exports it."/> <label nolabel="1" string="If you need another language than the official ones available, you can import a language pack from here. Other OpenERP languages than the official ones can be found on launchpad." colspan="2"/>
<label colspan="4" width="220"/> <group col="4">
<label colspan="4" width="220" string="When using CSV format, please also check that the first line of your file is one of the following:"/> <field name="name"/>
<label colspan="4" width="220" string="- type,name,res_id,src,value"/> <field name="code"/>
<label colspan="4" width="220" string="- module,type,name,res_id,src,value"/> <field name="data"/>
</group> <field name="overwrite"/>
<separator orientation="vertical" rowspan="15"/>
<group colspan="4" col="4">
<separator string="Import Translation" colspan="4"/>
<label colspan="4" nolabel="1" string="If you need another language than the official ones available, you can import a language pack from here. Other OpenERP languages than the official ones can be found on launchpad."/>
<newline/>
<field name="name" width="200"/>
<field name="code"/>
<field name="data" colspan="4"/>
<field name="overwrite"/>
</group>
<group colspan="8" col="8">
<separator string="" colspan="8"/>
<label colspan="6" width="220"/>
<button special="cancel" string="_Close" icon="gtk-cancel"/>
<button name="import_lang" string="_Import" type="object" icon="gtk-ok"/>
</group>
</group> </group>
</form> </form>
</field> </field>

View File

@ -7,7 +7,7 @@
<field name="model">base.module.configuration</field> <field name="model">base.module.configuration</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="System Configuration Done"> <form string="System Configuration Done" version="7.0">
<header> <header>
<button special="cancel" string="_Ok"/> <button special="cancel" string="_Ok"/>
</header> </header>

View File

@ -7,7 +7,7 @@
<field name="model">base.module.scan</field> <field name="model">base.module.scan</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Scan for new modules"> <form string="Scan for new modules" version="7.0">
<header> <header>
<button name="watch_dir" string="Check new modules" type="object" icon="gtk-ok"/> <button name="watch_dir" string="Check new modules" type="object" icon="gtk-ok"/>
<button special="cancel" string="Close" icon="gtk-cancel"/> <button special="cancel" string="Close" icon="gtk-cancel"/>

View File

@ -46,14 +46,14 @@ class base_module_upgrade(osv.osv_memory):
ids = self.get_module_list(cr, uid, context=context) ids = self.get_module_list(cr, uid, context=context)
if not ids: if not ids:
res['arch'] = '''<form string="Apply Scheduled Upgrades"> res['arch'] = '''<form string="Apply Scheduled Upgrades" version="7.0">
<header>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
</header>
<separator string="System update completed" colspan="4"/> <separator string="System update completed" colspan="4"/>
<label align="0.0" string="The selected modules have been updated / installed !" colspan="4"/> <label align="0.0" string="The selected modules have been updated / installed !" colspan="4"/>
<label align="0.0" string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)." colspan="4"/> <label align="0.0" string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)." colspan="4"/>
<separator string="" colspan="4"/>
<newline/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
</form>''' </form>'''
return res return res

View File

@ -7,7 +7,7 @@
<field name="model">base.module.upgrade</field> <field name="model">base.module.upgrade</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="System Update"> <form string="System Update" version="7.0">
<header> <header>
<button name="upgrade_module" string="Update" type="object" icon="gtk-go-forward"/> <button name="upgrade_module" string="Update" type="object" icon="gtk-go-forward"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
@ -43,7 +43,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="priority" eval="20"/> <field name="priority" eval="20"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Apply Scheduled Upgrades"> <form string="Apply Scheduled Upgrades" version="7.0">
<header> <header>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/> <button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>

View File

@ -24,7 +24,7 @@
<field name="model">ir.property</field> <field name="model">ir.property</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Parameters"> <form string="Parameters" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>

View File

@ -7,11 +7,10 @@
<field name="model">res.bank</field> <field name="model">res.bank</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bank"> <form string="Bank" version="7.0">
<group col="6"> <group col="4">
<field name="name" select="1"/> <field name="name"/>
<field name="bic" select="1"/> <field name="bic"/>
<field name="active" select="2"/>
</group> </group>
<group> <group>
<group string="Address"> <group string="Address">
@ -31,6 +30,7 @@
<field name="phone"/> <field name="phone"/>
<field name="fax"/> <field name="fax"/>
<field name="email" widget="email"/> <field name="email" widget="email"/>
<field name="active"/>
</group> </group>
</group> </group>
</form> </form>
@ -63,7 +63,7 @@
<field name="model">res.partner.bank.type</field> <field name="model">res.partner.bank.type</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bank Account Type"> <form string="Bank Account Type" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
@ -79,8 +79,8 @@
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Bank Account Type"> <tree string="Bank Account Type">
<field name="name" select="1"/> <field name="name"/>
<field name="code" select="1"/> <field name="code"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -90,7 +90,7 @@
<field name="model">res.partner.bank</field> <field name="model">res.partner.bank</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bank account"> <form string="Bank account" version="7.0">
<group col="4"> <group col="4">
<field name="state"/> <field name="state"/>
<field name="acc_number"/> <field name="acc_number"/>

View File

@ -18,7 +18,7 @@
<field name="model">res.company</field> <field name="model">res.company</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Company"> <form string="Company" version="7.0">
<sheet> <sheet>
<div class="oe_right oe_form_avatar"> <div class="oe_right oe_form_avatar">
<field name="logo" nolabel="1" widget="image"/> <field name="logo" nolabel="1" widget="image"/>
@ -148,7 +148,7 @@
<field name="type">form</field> <field name="type">form</field>
<field name="priority" eval="8"/> <field name="priority" eval="8"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Multi Company"> <form string="Multi Company" version="7.0">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name" colspan="6"/> <field name="name" colspan="6"/>
<separator string="Matching" colspan="6"/> <separator string="Matching" colspan="6"/>
@ -171,10 +171,10 @@
<field name="priority" eval="8"/> <field name="priority" eval="8"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Multi Company"> <search string="Multi Company">
<field name="name" select="1"/> <field name="name"/>
<field name="company_id" select="1" widget="selection"/> <field name="company_id" widget="selection"/>
<field name="company_dest_id" select="1" widget="selection"/> <field name="company_dest_id" widget="selection"/>
<field name="object_id" select="1"/> <field name="object_id"/>
</search> </search>
</field> </field>
</record> </record>

View File

@ -5,7 +5,7 @@
<field name="model">res.config</field> <field name="model">res.config</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form version="7.0">
<header> <header>
<button name="action_skip" icon="gtk-jump-to" special="cancel" <button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/> type="object" string="Cancel" colspan="1"/>
@ -22,7 +22,7 @@
<field name="model">ir.actions.configuration.wizard</field> <field name="model">ir.actions.configuration.wizard</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Next Configuration Step"> <form string="Next Configuration Step" version="7.0">
<header> <header>
<button name="action_next" icon="gtk-go-forward" <button name="action_next" icon="gtk-go-forward"
type="object" string="Continue"/> type="object" string="Continue"/>
@ -37,7 +37,7 @@
<field name="model">res.config.installer</field> <field name="model">res.config.installer</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form> <form version="7.0">
<header> <header>
<button name="action_skip" icon="gtk-jump-to" special="cancel" <button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/> type="object" string="Cancel" colspan="1"/>

View File

@ -23,7 +23,7 @@
<field name="model">res.country</field> <field name="model">res.country</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Country"> <form string="Country" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>
@ -67,7 +67,7 @@
<field name="model">res.country.state</field> <field name="model">res.country.state</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="State"> <form string="State" version="7.0">
<group> <group>
<field name="name"/> <field name="name"/>
<field name="code"/> <field name="code"/>

View File

@ -37,14 +37,14 @@
<field name="model">res.currency</field> <field name="model">res.currency</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Currency"> <form string="Currency" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="rate"/> <field name="rate"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>
<group col="3"> <group>
<group string="Price Accuracy"> <group string="Price Accuracy">
<field name="rounding"/> <field name="rounding"/>
<field name="accuracy"/> <field name="accuracy"/>
@ -88,8 +88,10 @@
<field name="model">res.currency.rate.type</field> <field name="model">res.currency.rate.type</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Currency Rate Type"> <form string="Currency Rate Type" version="7.0">
<field name="name"/> <group>
<field name="name"/>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -23,7 +23,7 @@
<field name="model">res.lang</field> <field name="model">res.lang</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Languages"> <form string="Languages" version="7.0">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name"/> <field name="name"/>
<field name="code" /> <field name="code" />

View File

@ -17,8 +17,8 @@
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Partner Titles"> <tree string="Partner Titles">
<field name="name" select="1"/> <field name="name"/>
<field name="shortcut" select="1"/> <field name="shortcut"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -27,7 +27,7 @@
<field name="model">res.partner.title</field> <field name="model">res.partner.title</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Partner Titles"> <form string="Partner Titles" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="shortcut"/> <field name="shortcut"/>
@ -99,7 +99,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Partners" validate="0"> <form string="Partners" version="7.0">
<sheet> <sheet>
<field name="photo" widget='image' class="oe_form_avatar oe_right"/> <field name="photo" widget='image' class="oe_form_avatar oe_right"/>
<div class="oe_right oe_form_button_box" name="buttons"> <div class="oe_right oe_form_button_box" name="buttons">
@ -399,8 +399,10 @@
<field name="model">res.payterm</field> <field name="model">res.payterm</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Payment Term"> <form string="Payment Term" version="7.0">
<field name="name"/> <group>
<field name="name"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -421,7 +423,7 @@
<field name="model">res.partner.category</field> <field name="model">res.partner.category</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Partner Category"> <form string="Partner Category" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="active"/> <field name="active"/>

View File

@ -6,7 +6,7 @@
<field name="model">res.request.link</field> <field name="model">res.request.link</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Request Link"> <form string="Request Link" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="object"/> <field name="object"/>

View File

@ -7,12 +7,12 @@
<field name="model">res.groups</field> <field name="model">res.groups</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Groups"> <form string="Groups" version="7.0">
<group col="4"> <group col="4">
<field name="category_id"/> <field name="category_id"/>
<field name="name"/> <field name="name"/>
</group> </group>
<notebook colspan="4"> <notebook>
<page string="Users"> <page string="Users">
<field name="users"/> <field name="users"/>
</page> </page>
@ -33,7 +33,7 @@
<field name="perm_unlink"/> <field name="perm_unlink"/>
<field name="name"/> <field name="name"/>
</tree> </tree>
<form string="Access Controls"> <form string="Access Controls" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
@ -76,7 +76,7 @@
<field name="model">res.users</field> <field name="model">res.users</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Users"> <form string="Users" version="7.0">
<field name="id" invisible="1"/> <field name="id" invisible="1"/>
<sheet> <sheet>
<div class="oe_right"> <div class="oe_right">
@ -192,7 +192,7 @@
<field name="type">form</field> <field name="type">form</field>
<field eval="18" name="priority"/> <field eval="18" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Users" layout="auto"> <form string="Users" version="7.0">
<div class="oe_right oe_form_avatar"> <div class="oe_right oe_form_avatar">
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)"/> <field name="avatar" widget='image' on_change="onchange_avatar(avatar)"/>
</div> </div>

View File

@ -16,7 +16,7 @@
<field name="model">res.widget</field> <field name="model">res.widget</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Widgets"> <form string="Widgets" version="7.0">
<group> <group>
<field name="title"/> <field name="title"/>
<field name="content"/> <field name="content"/>
@ -61,7 +61,7 @@
<field name="model">res.widget.user</field> <field name="model">res.widget.user</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="User Widgets"> <form string="User Widgets" version="7.0">
<group col="4"> <group col="4">
<field name="widget_id"/> <field name="widget_id"/>
<field name="user_id"/> <field name="user_id"/>
@ -83,7 +83,7 @@
<field name="model">res.widget.wizard</field> <field name="model">res.widget.wizard</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Widget Wizard" col="4"> <form string="Widget Wizard" col="4" version="7.0">
<header> <header>
<button name="res_widget_add" string="Add" type="object"/> <button name="res_widget_add" string="Add" type="object"/>
<button special="cancel" string="Cancel" icon="gtk-cancel" /> <button special="cancel" string="Cancel" icon="gtk-cancel" />

View File

@ -1859,6 +1859,24 @@ class BaseModel(object):
etree.SubElement(view, 'newline') etree.SubElement(view, 'newline')
return view return view
def _get_default_search_view(self, cr, user, context=None):
""" Generates a single-field tree view, using _rec_name if
it's one of the columns or the first column it finds otherwise
:param cr: database cursor
:param int user: user id
:param dict context: connection context
:returns: a tree view as an lxml document
:rtype: etree._Element
"""
_rec_name = self._rec_name
if _rec_name not in self._columns:
_rec_name = self._columns.keys()[0] if len(self._columns.keys()) > 0 else "id"
view = etree.Element('search', string=self._description)
etree.SubElement(view, 'field', name=_rec_name)
return view
def _get_default_tree_view(self, cr, user, context=None): def _get_default_tree_view(self, cr, user, context=None):
""" Generates a single-field tree view, using _rec_name if """ Generates a single-field tree view, using _rec_name if
it's one of the columns or the first column it finds otherwise it's one of the columns or the first column it finds otherwise
@ -1928,38 +1946,6 @@ class BaseModel(object):
return view return view
def _get_default_search_view(self, cr, uid, context=None):
"""
:param cr: database cursor
:param int user: user id
:param dict context: connection context
:returns: an lxml document of the view
:rtype: etree._Element
"""
form_view = self.fields_view_get(cr, uid, False, 'form', context=context)
tree_view = self.fields_view_get(cr, uid, False, 'tree', context=context)
# TODO it seems _all_columns could be used instead of fields_get (no need for translated fields info)
fields = self.fields_get(cr, uid, context=context)
fields_to_search = set(
field for field, descriptor in fields.iteritems()
if descriptor.get('select'))
for view in (form_view, tree_view):
view_root = etree.fromstring(view['arch'])
# Only care about select=1 in xpath below, because select=2 is covered
# by the custom advanced search in clients
fields_to_search.update(view_root.xpath("//field[@select=1]/@name"))
tree_view_root = view_root # as provided by loop above
search_view = etree.Element("search", string=tree_view_root.get("string", ""))
field_group = etree.SubElement(search_view, "group")
for field_name in fields_to_search:
etree.SubElement(field_group, "field", name=field_name)
return search_view
# #
# if view_id, view_type is not required # if view_id, view_type is not required
# #