[IMP] base_setup cleanups

bzr revid: al@openerp.com-20110819011312-ekjioj2f1bloom3i
This commit is contained in:
Antony Lesuisse 2011-08-19 03:13:12 +02:00
parent 59f424dcef
commit 88a2b980f8
9 changed files with 63 additions and 388 deletions

View File

@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2004-2011 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -19,84 +19,6 @@
#
##############################################################################
import installer
import wizard
import os
import base64
import random
import tools
from osv import fields, osv
import netsvc
from tools.translate import _
class base_setup_config_choice(osv.osv_memory):
"""
"""
_name = 'base.setup.config'
logger = netsvc.Logger()
def _get_image(self, cr, uid, context=None):
file_no = str(random.randint(1,3))
path = os.path.join('base','res','config_pixmaps/%s.png'%file_no)
file_data = tools.file_open(path,'rb').read()
return base64.encodestring(file_data)
def get_users(self, cr, uid, context=None):
user_obj = self.pool.get('res.users')
user_ids = user_obj.search(cr, uid, [])
user_list = []
user_tmpl_nopass = _(' - %s :\n\t\tLogin : %s')
user_tmpl_pass = _(' - %s :\n\t\tLogin : %s \n\t\tPassword : %s')
for user in user_obj.browse(cr, uid, user_ids, context=context):
if user.password and not user.password.startswith('$'):
user_list.append(user_tmpl_pass % (user.name, user.login, user.password))
else:
user_list.append(user_tmpl_nopass % (user.name, user.login))
return _('The following users have been installed : \n')+ '\n'.join(user_list)
_columns = {
'installed_users':fields.text('Installed Users', readonly=True),
'config_logo' : fields.binary('Image', readonly=True),
}
_defaults = {
'installed_users':get_users,
'config_logo' : _get_image
}
def reset_menu(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
menu_id = user._get_menu()
user.write({'action_id': False,
'menu_id': menu_id})
return self.pool.get('ir.actions.act_window').browse(cr, uid, menu_id, context=context)
def menu(self, cr, uid, ids, context=None):
menu = self.reset_menu(cr, uid, context=context)
if menu.view_id.id:
view_id = (menu.view_id.id, menu.view_id.name)
else:
view_id = False
return {
'name': menu.name,
'type': menu.type,
'view_id': view_id,
'domain': menu.domain,
'res_model': menu.res_model,
'src_model': menu.src_model,
'view_type': menu.view_type,
'view_mode': menu.view_mode,
'views': menu.views,
}
def config(self, cr, uid, ids, context=None):
self.reset_menu(cr, uid, context=context)
return self.pool.get('res.config').next(cr, uid, [], context=context)
base_setup_config_choice()
import base_setup
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -29,19 +29,15 @@
This module helps to configure the system at the installation of a new database.
================================================================================
It allows you to choose the type of interface and select from a list of applications to install.
Shows you a list of applications features to install from.
It also helps to easily configure your company.
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': ['base_setup_data.xml'],
'update_xml': ['security/ir.model.access.csv',
'wizard/res_company_logo_view.xml',
'base_setup_installer.xml',
],
'demo_xml': ['base_setup_demo.xml'],
'init_xml': [],
'update_xml': ['security/ir.model.access.csv', 'base_setup_views.xml' ],
'demo_xml': [],
'installable': True,
'active': True,
'certificate': '0086711085869',

View File

@ -18,11 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import pooler
import pytz
from tools.translate import _
import pooler
import tools
from osv import fields, osv
from tools.translate import _
#Application and feature chooser, this could be done by introspecting ir.modules
class base_setup_installer(osv.osv_memory):
_name = 'base.setup.installer'
@ -134,8 +137,6 @@ class base_setup_installer(osv.osv_memory):
if need_install:
self.pool = pooler.restart_pool(cr.dbname, update_module=True)[1]
return
base_setup_installer()
#Migrate data from another application Conf wiz
@ -152,8 +153,6 @@ class migrade_application_installer_modules(osv.osv_memory):
'quickbooks_ippids': fields.boolean('Quickbooks Ippids',
help="For Quickbooks Ippids"),
}
migrade_application_installer_modules()
class product_installer(osv.osv_memory):
_name = 'product.installer'
@ -165,7 +164,7 @@ class product_installer(osv.osv_memory):
_defaults = {
'customers': 'create',
}
def execute(self, cr, uid, ids, context=None):
if context is None:
context = {}
@ -187,10 +186,7 @@ class product_installer(osv.osv_memory):
if val.customers == 'import':
return {'type': 'ir.actions.act_window'}
product_installer()
# Define default users preferences config wiz
# Define users preferences for new users (ir.values)
def _lang_get(self, cr, uid, context=None):
obj = self.pool.get('res.lang')
@ -245,12 +241,10 @@ class user_preferences_config(osv.osv_memory):
ir_values_obj.set(cr, uid, 'default', False, 'menu_tips', ['res.users'], o.menu_tips)
return {}
user_preferences_config()
# Specify Your Terminology
class specify_partner_terminology(osv.osv_memory):
_name = 'specify.partner.terminology'
_name = 'base.setup.terminology'
_inherit = 'res.config'
_columns = {
'partner': fields.selection([('Customer','Customer'),
@ -267,7 +261,7 @@ class specify_partner_terminology(osv.osv_memory):
_defaults={
'partner' :'Partner',
}
def make_translations(self, cr, uid, ids, name, type, src, value, res_id=0, context=None):
trans_obj = self.pool.get('ir.translation')
user_obj = self.pool.get('res.users')
@ -278,7 +272,7 @@ class specify_partner_terminology(osv.osv_memory):
else:
create_id = trans_obj.create(cr, uid, {'name': name,'lang': context_lang, 'type': type, 'src': src, 'value': value , 'res_id': res_id}, context=context)
return {}
def execute(self, cr, uid, ids, context=None):
def _case_insensitive_replace(ref_string, src, value):
import re
@ -317,8 +311,5 @@ class specify_partner_terminology(osv.osv_memory):
act_ref = 'ir.actions.act_window' + ',' + 'help'
self.make_translations(cr, uid, ids, act_ref, 'model', act_id.help, _case_insensitive_replace(act_id.help,'Customer',o.partner), res_id=act_id.id, context=context)
return {}
specify_partner_terminology()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="view_base_setup" model="ir.ui.view">
<field name="name">Setup</field>
<field name="model">base.setup.config</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Information about your new database">
<group colspan="4" col="8">
<group colspan="3" width="220">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label align="0.0" string="You can start configuring the system or connect directly to the database as an administrator." width="200" colspan="2"/>
</group>
<separator string="" orientation="vertical" colspan="1" rowspan="8"/>
<group colspan="4" width="400">
<separator string="New Database" colspan="4"/>
<label align="0.0" string="Your database is now created." colspan="4"/>
<field name="installed_users" nolabel= "1" colspan="4"/>
</group>
</group>
<group colspan="8" col="8">
<separator string="" colspan="8"/>
<label string="" colspan="6"/>
<button name="menu" icon="gtk-ok" type="object" string="Skip Configuration Wizards" help="Only for experimented users" colspan="1"/>
<button name="config" icon="gtk-go-forward" type="object" string="Start Configuration" colspan="1"/>
</group>
</form>
</field>
</record>
<record id="action_base_setup" model="ir.actions.act_window">
<field name="name">Setup</field>
<field name="res_model">base.setup.config</field>
<field name="type">ir.actions.act_window</field>
<field name="view_id" ref="view_base_setup"/>
<field name="target">new</field>
</record>
<record id="base.user_root" model="res.users">
<field name="action_id" ref="action_base_setup"/>
<field name="menu_id" ref="action_base_setup"/>
</record>
</data>
</openerp>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
</data>
</openerp>

View File

@ -26,24 +26,24 @@
</separator>
<group colspan="8">
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="account_voucher" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="account_accountant" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="profile_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="marketing" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="point_of_sale" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="crm" />
<field name="sale" />
<field name="project" />
<field name="knowledge" />
<field name="stock" />
<field name="mrp" />
<field name="account_voucher" />
<field name="account_accountant" />
<field name="purchase" />
<field name="hr" />
<field name="profile_tools" />
<field name="marketing" groups="base.group_extended" />
<field name="point_of_sale" groups="base.group_extended" />
<field name="report_designer" groups="base.group_extended" />
<separator string="Install Specific Industry Applications" colspan="4"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
<field name="association" />
<field name="auction" />
<field name="product_expiry" />
<group name="crm"/>
<group name="sale"/>
<group name="project"/>
@ -60,7 +60,6 @@
</data>
</field>
</record>
<record id="action_base_setup_installer" model="ir.actions.act_window">
<field name="name">Install Applications</field>
<field name="type">ir.actions.act_window</field>
@ -70,7 +69,6 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="base_setup_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_installer"/>
<field name="category_id" ref="base.category_administration_config"/>
@ -83,7 +81,7 @@
<field name="state">code</field>
<field name="code" eval="'# obj is a browse_record and will provide stupid ids to method\n' 'action = obj.pool.get(\'ir.actions.todo\').action_launch(cr, uid, ' + str([ref('base_setup_installer_todo')]) + ', context=context)'"/>
</record>
<menuitem name="Add More Features" action="action_start_configurator" id="menu_view_base_module_configuration" parent="base.menu_config" type="server" icon="STOCK_EXECUTE" sequence="100"/>
<record id="ir_ui_view_sc_configuration" model="ir.ui.view_sc">
<field name="name">Add More Features</field>
@ -91,57 +89,8 @@
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="menu_view_base_module_configuration"/>
</record>
<!-- Migrate data from another application Conf Wiz-->
<record id="view_migrade_application_installer_modules" model="ir.ui.view">
<field name="name">migrade.application.installer.modules.form</field>
<field name="model">migrade.application.installer.modules</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Migrate data from another application</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Migrate data from another application</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">Import data from other applications. Following the selected application, you can import more or less type of data matching to OpenERP objects. Choose the application and then the data you want to import in OpenERP</attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="attributes">
<attribute name="string">Configure</attribute>
</xpath>
<xpath expr="//separator[@string=&quot;vsep&quot;]" position="attributes">
<attribute name="string"/>
</xpath>
<group colspan="8">
<field name="import_saleforce"/>
<field name="import_sugarcrm"/>
<field name="sync_google_contact"/>
<field name="quickbooks_ippids"/>
</group>
</data>
</field>
</record>
<record id="action_migrade_application_installer_modules" model="ir.actions.act_window">
<field name="name">Migrate data from another application</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">migrade.application.installer.modules</field>
<field name="view_id" ref="view_migrade_application_installer_modules"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="migrade_application_installer_modules_todo" model="ir.actions.todo">
<field name="action_id" ref="action_migrade_application_installer_modules"/>
<field name="category_id" ref="base.category_administration_config"/>
</record>
<!-- Import or create customers configartion view -->
<!-- Import or create customers configartion view -->
<record id="action_import_create_installer" model="ir.actions.act_window">
<field name="name">Import or Create Customers</field>
<field name="type">ir.actions.act_window</field>
@ -151,17 +100,14 @@
<field name="view_id" ref="base.view_partner_tree"/>
<field name="help">Create some Customers, Suppliers and their contacts manually from this form or you can import your existing partners by CSV spreadsheet from "Import Data" wizard</field>
</record>
<!-- register configuration wizard -->
<record id="config_wizard_action_import_create_installer" model="ir.actions.todo">
<field name="action_id" ref="action_import_create_installer"/>
<field name="category_id" ref="base.category_administration_config"/>
</record>
<!-- Define default users preferences-->
<!-- Define default users preferences-->
<record id="view_user_preferences_config_form" model="ir.ui.view">
<field name="name">Define default users preferences</field>
<field name="name">Set default users preferences</field>
<field name="model">user.preferences.config</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
@ -191,7 +137,6 @@
</data>
</field>
</record>
<record id="action_user_preferences_config_form" model="ir.actions.act_window">
<field name="name">Define default users preferences</field>
<field name="type">ir.actions.act_window</field>
@ -201,27 +146,20 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Register configuration wizard -->
<record id="config_action_user_preferences_config_form" model="ir.actions.todo">
<field name="action_id" ref="action_user_preferences_config_form"/>
<field name="category_id" ref="base.category_administration_config"/>
</record>
<!-- Config Wiz Create New User's Login -->
<!-- Create Additional Users -->
<record id="action_config_access_other_user" model="ir.actions.act_window">
<field name="name">Create New User's Login</field>
<field name="name">Create Additional Users</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.users</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="base.view_users_form"/>
</record>
<!-- register configuration wizard -->
<record id="config_wizard_action_config_user_form" model="ir.actions.todo">
<field name="action_id" ref="action_config_access_other_user"/>
<field name="category_id" ref="base.category_administration_config"/>
@ -229,19 +167,11 @@
<field name="state">done</field>
</record>
<!-- register Upload Logo configuration wizard -->
<record id="config_wizard_action_res_company_logo" model="ir.actions.todo">
<field name="action_id" ref="action_res_company_logo"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="state">done</field>
</record>
<!-- Specify Your Terminology Config Wiz-->
<record id="view_partner_terminology_config_form" model="ir.ui.view">
<!-- Specify Your Terminology Config Wiz-->
<record id="base_setup_terminology_form" model="ir.ui.view">
<field name="name">Specify Your Terminology</field>
<field name="model">specify.partner.terminology</field>
<field name="model">base.setup.terminology</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
@ -267,27 +197,23 @@
</data>
</field>
</record>
<record id="action_partner_terminology_config_form" model="ir.actions.act_window">
<field name="name">Customer / Partner / Patient ?</field>
<field name="name">Specify Your Terminology for Customers</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">specify.partner.terminology</field>
<field name="res_model">base.setup.terminology</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_partner_terminology_config_form"/>
<field name="view_id" ref="base_setup_terminology_form"/>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Register configuration wizard -->
<record id="config_action_partner_terminology_config_form" model="ir.actions.todo">
<field name="action_id" ref="action_partner_terminology_config_form"/>
<field name="category_id" ref="base.category_administration_config"/>
</record>
<!-- Company config -->
<record id="action_base_setup_company" model="ir.actions.act_window">
<field name="name">Company Configuration</field>
<field name="name">Set Company Header and Footer</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.company</field>
<field name="view_id" ref="base.view_company_form"/>
@ -295,12 +221,26 @@
<field name="view_mode">form</field>
<field name="context">{'res_id': user.company_id.id}</field>
</record>
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="sequence">1</field>
</record>
<!-- register Upload Logo configuration wizard -->
<record id="base_setup_company_logo_action" model="ir.actions.act_window">
<field name="name">Upload Your Company Logo</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.company</field>
<field name="view_id" ref="base.view_company_form"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="context">{'res_id': user.company_id.id}</field>
</record>
<record id="config_wizard_action_res_company_logo" model="ir.actions.todo">
<field name="action_id" ref="base_setup_company_logo_action"/>
<field name="category_id" ref="base.category_administration_config"/>
<field name="state">done</field>
</record>
</data>
</openerp>

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import res_company_logo
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,49 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import os
import tools
from tools.translate import _
class res_company_logo(osv.osv_memory):
_name = 'res.company.logo'
_inherit = 'res.config'
_columns = {
'logo' : fields.binary('Logo'),
}
_defaults={
'logo':lambda self,cr,uid,c: self.pool.get('res.company').browse(cr, uid, uid,c).logo,
}
def execute(self, cr, uid, ids, context=None):
if context is None:
context = {}
user_comp = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id
get_val = self.browse(cr, uid, ids)[0]
user_comp.write({'logo': get_val.logo}, context=context)
return {'type': 'ir.actions.act_window_close'}
res_company_logo()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_res_company_logo" model="ir.ui.view">
<field name="name">res.company.logo.form</field>
<field name="model">res.company.logo</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Upload Your Company Logo</attribute>
</form>
<xpath expr='//separator[@string="title"]' position='attributes'>
<attribute name='string'> </attribute>
</xpath>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">Upload your company logo in JPG or PNG with a format similar to 450*150 pixels </attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='string'> </attribute>
<attribute name='rowspan'>12</attribute>
</xpath>
<xpath expr="//button[@string='Next']" position="replace">
<button icon="gtk-ok" string="Upload" name="execute" type="object"/>
</xpath>
<group string="res_config_contents" position="replace">
<group colspan="4">
<field colspan="4" height="150" name="logo" widget="image" nolabel="1"/>
</group>
</group>
</data>
</field>
</record>
<record id="action_res_company_logo" model="ir.actions.act_window">
<field name="name">Upload Your Company Logo</field>
<field name="res_model">res.company.logo</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_res_company_logo"/>
<field name="target">new</field>
</record>
</data>
</openerp>