bzr revid: chs@tinyerp.com-20100205152837-539yy3vedgqreyvc
This commit is contained in:
Christophe Simonis 2010-02-05 16:28:37 +01:00
commit 73502052a2
42 changed files with 767 additions and 1075 deletions

View File

@ -1748,15 +1748,6 @@ class account_config_wizard(osv.osv_memory):
_name = 'account.config.wizard'
_inherit = 'res.config'
def _get_charts(self, cr, uid, context):
module_obj=self.pool.get('ir.module.module')
ids=module_obj.search(cr, uid, [('category_id', '=', 'Account Charts'),
('state', '<>', 'installed')])
res=[(m.id, m.shortdesc) for m in module_obj.browse(cr, uid, ids)]
res.append((-1, 'None'))
res.sort(key=lambda x: x[1])
return res
_columns = {
'name':fields.char(
'Name', required=True, size=64,
@ -1768,7 +1759,6 @@ class account_config_wizard(osv.osv_memory):
'date2': fields.date('End Date', required=True),
'period':fields.selection([('month','Month'), ('3months','3 Months')],
'Periods', required=True),
'charts' : fields.selection(_get_charts, 'Charts of Account',required=True)
}
_defaults = {
'code': lambda *a: time.strftime('%Y'),
@ -1777,14 +1767,6 @@ class account_config_wizard(osv.osv_memory):
'date2': lambda *a: time.strftime('%Y-12-31'),
'period':lambda *a:'month',
}
def install_account_chart(self, cr, uid, ids, context=None):
for res in self.read(cr,uid,ids):
chart_id = res['charts']
if chart_id > 0:
mod_obj = self.pool.get('ir.module.module')
mod_obj.button_install(cr, uid, [chart_id], context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
def execute(self, cr, uid, ids, context=None):
for res in self.read(cr,uid,ids):
@ -1804,7 +1786,6 @@ class account_config_wizard(osv.osv_memory):
res_obj.create_period(cr,uid,[new_id])
elif res['period']=='3months':
res_obj.create_period3(cr,uid,[new_id])
self.install_account_chart(cr,uid,ids)
account_config_wizard()

View File

@ -4,43 +4,31 @@
<field name="name">account.installer.view</field>
<field name="model">account.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Accounting Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Accounting Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Configure Your Accounting System" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Accounting" colspan="4"/>
<field name="account_analytic_default"/>
<field name="account_analytic_plans"/>
<!-- insert suppliers payment management here -->
<field name="account_followup"/>
<field name="account_asset"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string"
>Configure Your Accounting System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications</attribute>
</xpath>
<group colspan="8">
<separator string="Accounting" colspan="4"/>
<field name="charts"/>
<field name="account_analytic_default"/>
<field name="account_analytic_plans"/>
<field name="account_payment"/>
<field name="account_followup"/>
<field name="account_asset"/>
</group>
</data>
</field>
</record>
@ -57,7 +45,7 @@
<record id="account_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_account_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -1451,9 +1451,9 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Account Configure
</attribute></form>
<form position="attributes">
<attribute name="string">Account Configure</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator col="4" colspan="4" string="Create a Fiscal Year"/>
<field name="name"/>
@ -1461,8 +1461,6 @@
<field name="date1"/>
<field name="date2"/>
<field name="period" colspan="4"/>
<separator col="4" colspan="4" string="Select Chart of Accounts"/>
<field name="charts"/>
</group>
<xpath expr='//button[@name="action_skip"]' position="replace"/>
</data>
@ -1734,16 +1732,14 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Generate Chart of Accounts from a Chart Template
</attribute></form>
<form position="attributes">
<attribute name="string">Generate Chart of Accounts from a Chart Template</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator col="4" colspan="4" string="
Generate Chart of Accounts from a Chart Template"/>
<label align="0.0" colspan="4" string="
This will automatically configure your chart of accounts,
bank accounts, taxes and journals according to the selected
template"/>
<label align="0.0" colspan="4"
string="This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template"/>
<field name="company_id" widget="selection"
groups="base.group_multi_company"/>
<field name ="code_digits" />

View File

@ -33,52 +33,3 @@ out after this mail was sent, please consider the present one as \
void. Do not hesitate to contact our accounting department'
}
res_company()
class company_setup(osv.osv_memory):
"""
Insert Information for a company.
Wizard asks for:
* A Company with its partner
* Insert a suitable message for Overdue Payment Report.
"""
_name='wizard.company.setup'
_inherit = 'res.config'
_columns = {
'company_id':fields.many2one('res.company','Company',required=True),
'overdue_msg': fields.text('Overdue Payment Message'),
}
def get_message(self,cr,uid,context={}):
company =self.pool.get('res.users').browse(cr,uid,[uid],context)[0].company_id
msg = company.overdue_msg
phone = company.partner_id.address and (company.partner_id.address[0].phone and ' at ' + str(company.partner_id.address[0].phone) + '.' or '.') or '.'
msg += str(phone)
return msg
_defaults = {
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.id,
'overdue_msg': get_message,
}
def onchange_company_id(self, cr, uid, ids, company, context=None):
if not company:
return {}
comp_obj = self.pool.get('res.company').browse(cr,uid,company)
partner_address = comp_obj.partner_id.address
if partner_address and partner_address[0].phone:
msg_tail = ' at %s.'%(partner_address[0].phone)
else:
msg_tail = '.'
return {'value': {'overdue_msg': comp_obj.overdue_msg + msg_tail } }
def execute(self, cr, uid, ids, context=None):
content_wiz = self.pool.get('wizard.company.setup')\
.read(cr,uid,ids,['company_id','overdue_msg'])
if content_wiz:
wiz_data = content_wiz[0]
self.pool.get('res.company').write(
cr, uid,
[wiz_data['company_id']],
{'overdue_msg':wiz_data['overdue_msg']})
company_setup()

View File

@ -15,45 +15,5 @@
</notebook>
</field>
</record>
<!-- Wizard for Configuration of Overdue Payments -->
<record model="ir.ui.view" id="wizard_company_setup_form">
<field name="name">wizard.company.setup.form</field>
<field name="model">wizard.company.setup</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">
Overdue Payment Report Message
</attribute></form>
<group string="res_config_contents" position="replace">
<field name="company_id" select="1"
on_change="onchange_company_id(company_id)"
groups="base.group_multi_company"/>
<separator string="Message" colspan="4"/>
<field name="overdue_msg" nolabel="1" colspan="4"/>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
</data>
</field>
</record>
<record id="action_wizard_company_setup_form" model="ir.actions.act_window">
<field name="name">Overdue Payment Report Message</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.company.setup</field>
<field name="view_id" ref="wizard_company_setup_form"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- register configuration wizard -->
<record id="config_wizard_account_base_setup_form" model="ir.actions.todo">
<field name="action_id" ref="action_wizard_company_setup_form"/>
</record>
</data>
</openerp>

View File

@ -18,21 +18,61 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from operator import itemgetter
from osv import fields, osv
import netsvc
class account_installer(osv.osv_memory):
_name = 'account.installer'
_inherit = 'res.config.installer'
def _get_charts(self, cr, uid, context=None):
modules = self.pool.get('ir.module.module')
ids = modules.search(cr, uid, [('category_id','=','Account Charts')])
return list(
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids)),
key=itemgetter(1)))
_columns = {
# Accounting
'account_analytic_default':fields.boolean('Analytic Accounting'),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans'),
'account_payment':fields.boolean('Suppliers Payment Management'),
'account_followup':fields.boolean('Followups Management'),
'account_asset':fields.boolean('Assets Management')
'charts':fields.selection(_get_charts, 'Chart of Accounts',
required=True,
help="Installs localized accounting charts to match as closely as "
"possible the accounting needs of your company based on your "
"country."),
'account_analytic_default':fields.boolean('Analytic Accounting',
help="Automatically selects analytic accounts based on various "
"criteria."),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
"simultaneously."),
'account_payment':fields.boolean('Suppliers Payment Management',
help="Streamlines invoice payment and creates hooks to plug "
"automated payment systems in."),
'account_followup':fields.boolean('Followups Management',
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
'account_asset':fields.boolean('Assets Management',
help="Enables asset management in the accounting application, "
"including asset categories and usage periods.")
}
_defaults = {
'account_analytic_default':True,
}
def modules_to_install(self, cr, uid, ids, context=None):
modules = super(account_installer, self).modules_to_install(
cr, uid, ids, context=context)
chart = self.read(cr, uid, ids, ['charts'],
context=context)[0]['charts']
self.logger.notifyChannel(
'installer', netsvc.LOG_DEBUG,
'Installing chart of accounts %s'%chart)
return modules | set([chart])
account_installer()

View File

@ -87,6 +87,3 @@
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
"access_wizard_company_setup_manager","wizard.company.setup manager","model_wizard_company_setup","account.group_account_manager",1,1,1,1
"access_wizard_company_setup","wizard.company.setup","model_wizard_company_setup","account.group_account_user",1,0,0,0
"access_wizard_company_setup_user","wizard.company.setup user","model_wizard_company_setup","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
87 access_account_fiscal_position_account_template account.fiscal.position.account.template model_account_fiscal_position_account_template account.group_account_manager 1 1 1 1
88 access_account_sequence_fiscal_year account.sequence.fiscalyear model_account_sequence_fiscalyear account.group_account_user 1 1 1 1
89 access_account_sequence_fiscal_year_user account.sequence.fiscalyear user model_account_sequence_fiscalyear base.group_user 1 0 0 0
access_wizard_company_setup_manager wizard.company.setup manager model_wizard_company_setup account.group_account_manager 1 1 1 1
access_wizard_company_setup wizard.company.setup model_wizard_company_setup account.group_account_user 1 0 0 0
access_wizard_company_setup_user wizard.company.setup user model_wizard_company_setup base.group_user 1 0 0 0

View File

@ -20,7 +20,62 @@
##############################################################################
import installer
import todo
import wizard
from osv import osv
import netsvc
class base_setup_config_choice(osv.osv_memory):
"""
"""
_name = 'base.setup.config'
logger = netsvc.Logger()
def set_default_menu(self, cr, uid, menu, context=None):
user = self.pool.get('res.users')\
.browse(cr, uid, uid, context=context)
user.write({'action_id': menu.id,
'menu_id': menu.id})
def get_default_menu(self, cr, uid, context=None):
actions = self.pool.get('ir.actions.act_window')
current_menu_id = actions.search(cr, uid, [('name','=','Menu')],
context=context)
assert len(current_menu_id) == 1,\
'A given user should only have one menu item'
return actions.browse(cr, uid, current_menu_id[0], context=context)
def menu(self, cr, uid, ids, context=None):
menu = self.get_default_menu(cr, uid, context=context)
self.set_default_menu(cr, uid, menu, 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_users': 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):
menu = self.get_default_menu(cr, uid, context=context)
self.set_default_menu(cr, uid, menu, context=context)
return self.pool.get('res.config').next(cr, uid, [], context=context)
base_setup_config_choice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -42,8 +42,8 @@
'depends': ['base'],
'init_xml': ['base_setup_data.xml'],
'update_xml': ['security/ir.model.access.csv',
'base_setup_wizard.xml',
'base_setup_installer.xml'],
'base_setup_installer.xml',
'base_setup_todo.xml',],
'demo_xml': ['base_setup_demo.xml'],
'installable': True,
'active': True,

View File

@ -1,17 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="action_wizard_setup" model="ir.actions.wizard">
<field name="name">Setup</field>
<field name="type">ir.actions.wizard</field>
<field name="wiz_name">base_setup.base_setup</field>
</record>
<record id="base.user_root" model="res.users">
<field name="action_id" ref="action_wizard_setup"/>
<field name="menu_id" ref="action_wizard_setup"/>
</record>
</data>
<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="Setup">
<group colspan="4">
<image name="gtk-dialog-info"/>
<group colspan="2" col="4">
<separator colspan="4" string="Installation Done"/>
<label align="0.0" colspan="4"
string="Your new database is now fully installed."/>
<label align="0.0" colspan="4"
string="You can start configuring the system or connect directly to the database using the default setup."/>
</group>
</group>
<button name="menu" icon="gtk-ok" type="object"
string="Use Directly"/>
<button name="config" icon="gtk-go-forward" type="object"
string="Start Configuration"/>
</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

@ -3,7 +3,7 @@
<data noupdate="1">
<record id="base.user_demo" model="res.users">
<field name="action_id" ref="action_wizard_setup"/>
<field name="action_id" ref="action_base_setup"/>
</record>
</data>

View File

@ -4,51 +4,37 @@
<field name="name">base.setup.installer.view</field>
<field name="model">base.setup.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Base Setup Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Base Setup Modules Installation</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Install Modules</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string"
>Now that OpenERP is installed, we have selected applications commonly useful to users which you can install directly, as well as sets of applications for more specific types or groups of businesses (the vertical modules).
<group string="res_config_contents" position="replace">
<separator string="Install Modules" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Generic Modules" colspan="4"/>
<field name="crm"/> <field name="sale"/>
<field name="project"/> <field name="knowledge"/>
<field name="stock"/> <field name="mrp"/>
<field name="account"/>
<field name="charts" attrs="{'readonly':[('account','=',False)]}"/>
<field name="purchase"/> <field name="hr"/>
<field name="point_of_sale"/> <field name="marketing"/>
<field name="misc_tools"/> <field name="report_designer"/>
<separator string="Generic Modules" colspan="4"/>
<field name="profile_association"/>
<field name="profile_training"/>
<field name="profile_auction"/>
<field name="profile_bookstore"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
If you don't think you need any of these right now, you can easily install them later on.</attribute>
</xpath>
<group colspan="8">
<separator string="Generic Modules" colspan="4"/>
<field name="crm"/> <field name="sale"/>
<field name="project"/> <field name="knowledge"/>
<field name="stock"/> <field name="mrp"/>
<field name="account"/> <field name="purchase"/>
<field name="hr"/> <field name="point_of_sale"/>
<field name="marketing"/> <field name="misc_tools"/>
<field name="report_designer"/>
<separator string="Vertical Modules" colspan="4"/>
<field name="profile_association"/>
<field name="profile_training"/>
<field name="profile_auction"/>
<field name="profile_bookstore"/>
</group>
</data>
</field>
</record>
@ -65,7 +51,7 @@
<record id="base_setup_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_installer"/>
<field name="sequence">1</field>
<field name="sequence">2</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,61 @@
<openerp>
<data>
<record id="view_base_setup_company" model="ir.ui.view">
<field name="name">Setup company information</field>
<field name="model">base.setup.company</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">Main Company Setup</attribute>
</form>
<group string="res_config_contents" position="replace">
<field name="company_id" invisible="1"/>
<separator string="Define Main Company" colspan="4"/>
<field name="name" colspan="4" required="True"/>
<newline/>
<field name="street"/>
<field name="street2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
<field name="email"/>
<field name="phone"/>
<field name="currency"/>
<separator string="Report Information" colspan="4"/>
<field name="rml_header1" colspan="4"/>
<field name="rml_footer1" colspan="4"/>
<field name="rml_footer2" colspan="4"/>
<separator colspan="4"
string="Your Logo - Use a size of about 450x150 pixels."/>
<field colspan="4" name="logo" widget="image"
nolabel="1"/>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
</data>
</field>
</record>
<record id="action_base_setup_company" model="ir.actions.act_window">
<field name="name">Setup company information</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.setup.company</field>
<field name="view_id" ref="view_base_setup_company"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
<field name="sequence">1</field>
</record>
</data>
</openerp>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard id="wizard_base_setup" model="base_setup.base_setup" name="base_setup.base_setup" string="Setup"/>
</data>
</openerp>

View File

@ -19,57 +19,77 @@
#
##############################################################################
from osv import fields, osv
from itertools import chain
from operator import itemgetter
import netsvc
class base_setup_installer(osv.osv_memory):
_name = 'base.setup.installer'
_inherit = 'res.config.installer'
def _get_charts(self, cr, uid, context=None):
modules = self.pool.get('ir.module.module')
ids = modules.search(cr, uid, [('category_id','=','Account Charts'),
('state','!=','installed')])
return list(
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids)),
key=itemgetter(1)))
def _if_account(self, cr, uid, ids, context=None):
chart = self.read(cr, uid, ids, ['charts'],
context=context)[0]['charts']
self.logger.notifyChannel(
'installer', netsvc.LOG_DEBUG,
'Addon "account" selected, installing chart of accounts %s'%chart)
return [chart]
_install_if = {
('sale','crm'): ['sale_crm'],
('sale','project'): ['project_mrp'],
}
_columns = {
# Generic modules
'crm':fields.boolean('Customer Relationship Management'),
'sale':fields.boolean('Sales Management'),
'project':fields.boolean('Project Management'),
'knowledge':fields.boolean('Knowledge Management'),
'stock':fields.boolean('Warehouse Management'),
'mrp':fields.boolean('Manufacturing'),
'account':fields.boolean('Financial & Accounting'),
'charts':fields.selection(_get_charts, 'Chart of Accounts',
readonly=True),
'purchase':fields.boolean('Purchase Management'),
'hr':fields.boolean('Human Resources'),
'point_of_sale':fields.boolean('Point of Sales'),
'marketing':fields.boolean('Marketing'),
'misc_tools':fields.boolean('Miscellaneous Tools'),
'report_designer':fields.boolean('Advanced Reporting'),
'crm':fields.boolean('Customer Relationship Management',
help="Helps you track and manage relations with customers such as"
" leads, requests or issues. Can automatically send "
"reminders, escalate requests or trigger business-specific "
"actions based on standard events."),
'sale':fields.boolean('Sales Management',
help="Helps you handle your quotations, sale orders and invoicing"
"."),
'project':fields.boolean('Project Management',
help="Helps you manage your projects and tasks by tracking them, "
"generating plannings, etc..."),
'knowledge':fields.boolean('Knowledge Management',
help="Lets you install addons geared towards sharing knowledge "
"with and between your employees."),
'stock':fields.boolean('Warehouse Management',
help="Helps you manage your stocks and stocks locations, as well "
"as the flow of stock between warehouses."),
'mrp':fields.boolean('Manufacturing',
help="Helps you manage your manufacturing processes and generate "
"reports on those processes."),
'account':fields.boolean('Financial & Accounting',
help="Helps you handle your accounting needs, as well as create "
"and track your budgets."),
'purchase':fields.boolean('Purchase Management',
help="Helps you manage your purchase-related processes such as "
"requests for quotations, supplier invoices, etc..."),
'hr':fields.boolean('Human Resources',
help="Helps you manage your human resources by encoding your "
"employee structure, generating work sheets, tracking "
"attendance and more."),
'point_of_sale':fields.boolean('Point of Sales',
help="Helps you get the most out of your points of sales with "
"fast sale encoding, simplified payment mode encoding, "
"automatic picking lists generation and more."),
'marketing':fields.boolean('Marketing',
help="Helps you manage your marketing campaigns step by step."),
'misc_tools':fields.boolean('Miscellaneous Tools',
help="Lets you install various interesting but non-essential "
"tools."),
'report_designer':fields.boolean('Advanced Reporting',
help="Lets you install various tools to simplify and enhance "
"OpenERP's report creation."),
# Vertical modules
'profile_association':fields.boolean('Associations'),
'profile_training':fields.boolean('Training Centers'),
'profile_auction':fields.boolean('Auction Houses'),
'profile_bookstore':fields.boolean('Book Stores'),
'profile_association':fields.boolean('Associations',
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
"more efficiently."),
'profile_training':fields.boolean('Training Centers',
help="Helps you manage your training sessions and "
"centers, from the conception of a training project to the "
"gathering of trainee feedback."),
'profile_auction':fields.boolean('Auction Houses',
help="Installs a preselected set of OpenERP "
"applications selected to help you manage your auctions "
"as well as the business processes around them."),
'profile_bookstore':fields.boolean('Book Stores',
help="Installs a preselected set of OpenERP "
"applications which will help you manage your book store "
"or your library."),
}
_defaults = {
'crm': True,

152
addons/base_setup/todo.py Normal file
View File

@ -0,0 +1,152 @@
# -*- 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 operator import itemgetter
from osv import osv, fields
import netsvc
import tools
class base_setup_company(osv.osv_memory):
"""
"""
_name = 'base.setup.company'
_inherit = 'res.config'
logger = netsvc.Logger()
def _get_all(self, cr, uid, model, context=None):
models = self.pool.get(model)
all_model_ids = models.search(cr, uid, [])
output = [(False, '')]
output.extend(
sorted([(o.id, o.name)
for o in models.browse(cr, uid, all_model_ids,
context=context)],
key=itemgetter(1)))
return output
def _get_all_states(self, cr, uid, context=None):
return self._get_all(
cr, uid, 'res.country.state', context=context)
def _get_all_countries(self, cr, uid, context=None):
return self._get_all(cr, uid, 'res.country', context=context)
def _get_all_currencies(self, cr, uid, context=None):
return self._get_all(cr, uid, 'res.currency', context=context)
def default_get(self, cr, uid, fields_list=None, context=None):
""" get default company if any, and the various other fields
from the company's fields
"""
defaults = super(base_setup_company, self)\
.default_get(cr, uid, fields_list=fields_list, context=context)
companies = self.pool.get('res.company')
company_id = companies.search(cr, uid, [], limit=1, order="id")
if not company_id or 'company_id' not in fields_list:
return defaults
company = companies.browse(cr, uid, company_id[0])
defaults['company_id'] = company.id
defaults['currency'] = company.currency_id.id
for field in ['name','logo','rml_header1','rml_footer1','rml_footer2']:
defaults[field] = company[field]
if company.partner_id.address:
address = company.partner_id.address[0]
for field in ['street','street2','zip','city','email','phone']:
defaults[field] = address[field]
for field in ['country_id','state_id']:
if address[field]:
defaults[field] = address[field].id
return defaults
_columns = {
'company_id':fields.many2one('res.company', 'Company'),
'name':fields.char('Company Name', size=64, required=True),
'street':fields.char('Street', size=128),
'street2':fields.char('Street 2', size=128),
'zip':fields.char('Zip Code', size=24),
'city':fields.char('City', size=128),
'state_id':fields.selection(_get_all_states, 'States'),
'country_id':fields.selection(_get_all_countries, 'Countries'),
'email':fields.char('E-mail', size=64),
'phone':fields.char('Phone', size=64),
'currency':fields.selection(_get_all_currencies, 'Currency', required=True),
'rml_header1':fields.char('Report Header', size=200,
help='''This sentence will appear at the top right corner of your reports.
We suggest you to put a slogan here:
"Open Source Business Solutions".'''),
'rml_footer1':fields.char('Report Footer 1', size=200,
help='''This sentence will appear at the bottom of your reports.
We suggest you to write legal sentences here:
Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07'''),
'rml_footer2':fields.char('Report Footer 2', size=200,
help='''This sentence will appear at the bottom of your reports.
We suggest you to put bank information here:
IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701'''),
'logo':fields.binary('Logo'),
}
def execute(self, cr, uid, ids, context=None):
assert len(ids) == 1, "We should only get one object from the form"
payload = self.browse(cr, uid, ids[0], context=context)
if not getattr(payload, 'company_id', None):
raise ValueError('Case where no default main company is setup '
'not handled yet')
company = payload.company_id
company.write({
'name':payload.name,
'rml_header1':payload.rml_header1,
'rml_footer1':payload.rml_footer1,
'rml_footer2':payload.rml_footer2,
'logo':payload.logo,
})
company.partner_id.write({
'name':payload.name,
})
address_data = {
'name':payload.name,
'street':payload.street,
'street2':payload.street2,
'zip':payload.zip,
'city':payload.city,
'email':payload.email,
'phone':payload.phone,
'country_id':int(payload.country_id),
'state_id':int(payload.state_id),
}
if company.partner_id.address:
company.partner_id.address[0].write(
address_data)
else:
self.pool.get('res.partner.address').create(cr, uid,
dict(address_data,
partner_id=int(company.partner_id)),
context=context)
base_setup_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,26 +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 wizard_base_setup
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,416 +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 wizard
import pooler
import time
import tools
import os
view_form_profit = """<?xml version="1.0"?>
<form string="Setup">
<image name="gtk-dialog-info"/>
<group>
<separator string="Select a Profile" colspan="2"/>
<newline/>
<field align="0.0" name="profile"/>
<newline/>
<label string="A profile sets a pre-selection of modules for specific needs. These profiles have been setup to help you discover the different aspects of OpenERP. This is just an overview, we have 300+ available modules." colspan="2" align="0.0"/>
<newline/>
<label string="You'll be able to install more modules later through the Administration menu." colspan="2" align="0.0"/>
</group>
</form>"""
view_form_company = """<?xml version="1.0"?>
<form string="Setup">
<notebook colspan="4">
<page string="General Information">
<image name="gtk-dialog-info" colspan="2"/>
<group>
<separator string="Define Main Company" colspan="4"/>
<newline/>
<field name="name" align="0.0" colspan="4" required="True"/>
<newline/>
<field name="street" align="0.0"/>
<field name="street2" align="0.0"/>
<field name="zip" align="0.0"/>
<field name="city" align="0.0"/>
<field name="country_id" align="0.0"/>
<field name="state_id" align="0.0"/>
<field name="email" align="0.0"/>
<field name="phone" align="0.0"/>
<field name="currency" align="0.0"/>
</group>
</page>
<page string="Report Information">
<separator string="Report header" colspan="4"/>
<newline/>
<field name="rml_header1" align="0.0" colspan="4"/>
<field name="rml_footer1" align="0.0" colspan="4"/>
<field name="rml_footer2" align="0.0" colspan="4"/>
<separator colspan="4" string="Your Logo - Use a size of about 450x150 pixels."/>
<field colspan="4" name="logo" widget="image"/>
</page>
</notebook>
</form>"""
view_form_update = """<?xml version="1.0"?>
<form string="Setup">
<image name="gtk-dialog-info" colspan="2"/>
<group>
<separator string="Summary" colspan="2"/>
<newline/>
<field name="profile" align="0.0" readonly="1"/>
<newline/>
<field name="name" align="0.0" readonly="1"/>
</group>
</form>
"""
view_form_finish = """<?xml version="1.0"?>
<form string="Setup">
<image name="gtk-dialog-info" colspan="2"/>
<group colspan="2" col="4">
<separator colspan="4" string="Installation Done"/>
<label align="0.0" colspan="4" string="Your new database is now fully installed."/>
<label align="0.0" colspan="4" string="You can start configuring the system or connect directly to the database using the default setup."/>
</group>
</form>
"""
class wizard_base_setup(wizard.interface):
def _get_profiles(self, cr, uid, context):
module_obj=pooler.get_pool(cr.dbname).get('ir.module.module')
ids=module_obj.search(cr, uid, [('category_id', '=', 'Profile'),
('state', '<>', 'uninstallable')])
res=[(m.id, m.shortdesc) for m in module_obj.browse(cr, uid, ids, context=context)]
res.append((-1, 'Minimal Profile'))
res.sort()
return res
def _get_company(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
company_obj = pool.get('res.company')
ids=company_obj.search(cr, uid, [])
if not ids:
return {}
company = company_obj.browse(cr, uid, ids)[0]
res = {'currency': company.currency_id.id}
for field in 'name logo rml_header1 rml_footer1 rml_footer2'.split():
res[field] = company[field]
if company.partner_id.address:
address = company.partner_id.address[0]
for field in 'street street2 zip city email phone'.split():
res[field] = address[field]
for field in 'country_id state_id'.split():
if address[field]:
res[field] = address[field].id
serv_pro_id = pool.get('ir.module.module').search(cr, uid, [('name','=','profile_service')]) or False
if serv_pro_id:
res['profile'] = serv_pro_id[0]
return res
def _get_all(self, cr, uid, context, model):
pool = pooler.get_pool(cr.dbname)
obj = pool.get(model)
ids = obj.search(cr, uid, [])
res = [(o.id, o.name) for o in obj.browse(cr, uid, ids, context=context)]
res.append((-1, ''))
res.sort(key=lambda x: x[1])
return res
def _get_states(self, cr, uid, context):
return self._get_all(cr, uid, context, 'res.country.state')
def _get_countries(self, cr, uid, context):
return self._get_all(cr, uid, context, 'res.country')
def _get_currency(self, cr, uid, context):
return self._get_all(cr, uid, context, 'res.currency')
def _update(self, cr, uid, data, context):
pool=pooler.get_pool(cr.dbname)
form=data['form']
if 'profile' in data['form'] and data['form']['profile'] > 0:
module_obj=pool.get('ir.module.module')
module_obj.state_update(cr, uid, [data['form']['profile']], 'to install', ['uninstalled'], context)
company_obj=pool.get('res.company')
partner_obj=pool.get('res.partner')
address_obj=pool.get('res.partner.address')
ids=company_obj.search(cr, uid, [])
company=company_obj.browse(cr, uid, ids)[0]
company_obj.write(cr, uid, [company.id], {
'name': form['name'],
'rml_header1': form['rml_header1'],
'rml_footer1': form['rml_footer1'],
'rml_footer2': form['rml_footer2'],
'currency_id': form['currency'],
'logo': form['logo'],
})
partner_obj.write(cr, uid, [company.partner_id.id], {
'name': form['name'],
})
values={
'name': form['name'],
'street': form['street'],
'street2': form['street2'],
'zip': form['zip'],
'city': form['city'],
'email': form['email'],
'phone': form['phone'],
}
# we can do this, or set res.append((False, '')) in _get_all()
if form['country_id'] > 0:
values['country_id'] = form['country_id']
if form['state_id'] > 0:
values['state_id'] = form['state_id']
if company.partner_id.address:
address=company.partner_id.address[0]
address_obj.write(cr, uid, [address.id], values)
else:
values['partner_id']=company.partner_id.id
add_id=address_obj.create(cr, uid, values)
cr.commit()
(db, pool)=pooler.restart_pool(cr.dbname, update_module=True)
return {}
def _menu(self, cr, uid, data, context):
users_obj=pooler.get_pool(cr.dbname).get('res.users')
action_obj=pooler.get_pool(cr.dbname).get('ir.actions.act_window')
ids=action_obj.search(cr, uid, [('name', '=', 'Menu')])
menu=action_obj.browse(cr, uid, ids)[0]
ids=users_obj.search(cr, uid, [('action_id', '=', 'Setup')])
users_obj.write(cr, uid, ids, {'action_id': menu.id})
ids=users_obj.search(cr, uid, [('menu_id', '=', 'Setup')])
users_obj.write(cr, uid, ids, {'menu_id': menu.id})
return {
'name': menu.name,
'type': menu.type,
'view_id': (menu.view_id and\
(menu.view_id.id, menu.view_id.name)) or False,
'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 _next(self, cr, uid, data, context):
if not data['form']['profile'] or data['form']['profile'] <= 0:
return 'company'
return 'charts'
def _previous(self, cr, uid, data, context):
if 'profile' not in data['form'] or data['form']['profile'] <= 0:
return 'init'
return 'charts'
def _config(self, cr, uid, data, context=None):
pool = pooler.get_pool(cr.dbname)
users_obj=pool.get('res.users')
action_obj=pool.get('ir.actions.act_window')
ids=action_obj.search(cr, uid, [('name', '=', 'Menu')])
menu=action_obj.browse(cr, uid, ids)[0]
ids=users_obj.search(cr, uid, [('action_id', '=', 'Setup')])
users_obj.write(cr, uid, ids, {'action_id': menu.id})
ids=users_obj.search(cr, uid, [('menu_id', '=', 'Setup')])
users_obj.write(cr, uid, ids, {'menu_id': menu.id})
return pool.get('res.config').next(cr, uid, [], context=context)
fields={
'profile':{
'string':'Profile',
'type':'selection',
'selection':_get_profiles,
'required': True,
},
'name':{
'string': 'Company Name',
'type': 'char',
'size': 64,
},
'street':{
'string': 'Street',
'type': 'char',
'size': 128,
},
'street2':{
'string': 'Street2',
'type': 'char',
'size': 128,
},
'zip':{
'string': 'Zip code',
'type': 'char',
'size': 24,
},
'city':{
'string': 'City',
'type': 'char',
'size': 128,
},
'state_id':{
'string': 'State',
'type': 'selection',
'selection':_get_states,
},
'country_id':{
'string': 'Country',
'type': 'selection',
'selection':_get_countries,
},
'email':{
'string': 'E-mail',
'type': 'char',
'size': 64,
},
'phone':{
'string': 'Phone',
'type': 'char',
'size': 64,
},
'currency': {
'string': 'Currency',
'type': 'selection',
'selection':_get_currency,
'required': True,
},
'rml_header1':{
'string': 'Report Header',
'type': 'char',
'help': """This sentence will appear at the top right corner of your reports.
We suggest you to put a slogan here:
"Open Source Business Solutions".""",
'size': 200,
},
'rml_footer1':{
'string': 'Report Footer 1',
'type': 'char',
'help': """This sentence will appear at the bottom of your reports.
We suggest you to write legal sentences here:
Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07""",
'size': 200,
},
'rml_footer2':{
'string': 'Report Footer 2',
'help': """This sentence will appear at the bottom of your reports.
We suggest you to put bank information here:
IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701""",
'type': 'char',
'size': 200,
},
'logo':{
'string': 'Logo',
'type': 'binary',
},
}
states={
'init':{
'actions': [_get_company],
'result': {'type': 'form', 'arch': view_form_profit, 'fields': fields,
'state': [
('menu', 'Cancel', 'gtk-cancel'),
('company', 'Next', 'gtk-go-forward', True)
]
}
},
# 'next': {
# 'actions': [],
# 'result': {'type': 'choice', 'next_state': _next}
# },
# 'charts':{
# 'actions': [],
# 'result': {'type': 'form', 'arch': view_form_charts, 'fields': fields,
# 'state':[
# ('init', 'Previous', 'gtk-go-back'),
# ('company', 'Next', 'gtk-go-forward', True)
# ]
# }
# },
'company':{
'actions': [],
'result': {'type': 'form', 'arch': view_form_company, 'fields': fields,
'state': [
('init', 'Previous', 'gtk-go-back'),
('update', 'Next', 'gtk-go-forward', True)
]
}
},
# 'previous':{
# 'actions': [],
# 'result': {'type': 'choice', 'next_state': _previous}
# },
'update':{
'actions': [],
'result': {'type': 'form', 'arch': view_form_update, 'fields': fields,
'state': [
('company', 'Previous', 'gtk-go-back'),
('finish', 'Install', 'gtk-ok', True)
]
}
},
'finish':{
'actions': [_update],
'result': {'type': 'form', 'arch': view_form_finish, 'fields': {},
'state': [
('menu', 'Use Directly', 'gtk-ok'),
('config', 'Start Configuration', 'gtk-go-forward', True)
]
}
},
'config': {
'result': {
'type': 'action',
'action': _config,
'state': 'end',
},
},
'menu': {
'actions': [],
'result': {'type': 'action', 'action': _menu, 'state': 'end'}
},
}
wizard_base_setup('base_setup.base_setup')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,5 +1,5 @@
<openerp>
<data>
<data>
<record model="ir.actions.url" id="action_document_browse">
<field name="name">Browse Files</field>
<field name="url">ftp://localhost:8021/</field>
@ -21,17 +21,16 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Auto Configure
</attribute></form>
<form position="attributes">
<attribute name="string">Auto Configure</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="FTP Server Configuration." colspan="4"/>
<label align="0.0" colspan="4"
string="Choose the address and port for the Document
Management System's FTP server."/>
string="Choose the address for the Document Management System's FTP server."/>
<field name="host"/>
</group>
<xpath expr='//button[@name="action_skip"]' position="replace"/>
<xpath expr="//button[@name='action_skip']" position="replace"/>
</data>
</field>
</record>
@ -51,4 +50,3 @@
</record>
</data>
</openerp>

View File

@ -8,13 +8,12 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Configure Calendars for CRM Sections
</attribute></form>
<form position="attributes">
<attribute name="string">Configure Calendars for CRM Sections</attribute>
</form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
OpenERP can create and pre-configure a series of integrated
calendar for you."/>
<label colspan="4" align="0.0"
string="OpenERP can create and pre-configure a series of integrated calendar for you."/>
<separator string="Create Pre-Configured Calendars"
colspan="4"/>
<newline/>

View File

@ -4,45 +4,30 @@
<field name="name">hr.installer.view</field>
<field name="model">hr.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Human Resources Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Human Resources Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Configure Human Resources" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Human Resources Management" colspan="4"/>
<field name="hr_holidays"/>
<field name="hr_expense"/>
<field name="hr_jobs"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_contract"/>
<field name="hr_evaluation"/>
<field name="hr_attendance"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string">Configure Human Resources"</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">The base Human Resources addon will help you manage your employee roster, but your can enhance it even further by installing a few HR-related applications.</attribute>
</xpath>
<group colspan="8">
<separator string="Human Resources Management" colspan="4"/>
<field name="hr_holidays"/>
<field name="hr_expense"/>
<field name="crm_hr"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_contract"/>
<field name="hr_evaluation"/>
<field name="hr_attendance"/>
</group>
</data>
</field>
</record>
@ -59,7 +44,7 @@
<record id="hr_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_hr_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -26,13 +26,27 @@ class hr_installer(osv.osv_memory):
_columns = {
# Human Resources Management
'hr_holidays':fields.boolean('Holidays / Leaves Management'),
'hr_expense':fields.boolean('Expenses'),
'hr_jobs':fields.boolean('Recruitement Process'),
'hr_timesheet_sheet':fields.boolean('Timesheets'),
'hr_contract':fields.boolean("Employee's Contracts"),
'hr_evaluation':fields.boolean('Periodic Evaluations'),
'hr_attendance':fields.boolean('Attendances (Sign In/Out)'),
'hr_holidays':fields.boolean('Holidays / Leaves Management',
help="Tracks employee leaves allocations, requests and planning."
"\n\nCan also plug into OpenERP's agendas and calendars "
"applications in order to display accepted leaves requests on"
" OpenERP's calendars."),
'hr_expense':fields.boolean('Expenses',
help="Tracks and manages employee expenses, and can "
"automatically re-invoice clients if the expenses are "
"project-related."),
'crm_hr':fields.boolean('Recruitment Process',
help="Helps you manage and streamline your recruitment process."),
'hr_timesheet_sheet':fields.boolean('Timesheets',
help="Tracks and helps employees encode and validate timesheets "
"and attendance."),
'hr_contract':fields.boolean("Employee's Contracts",
help="Extends employee profiles to help manage their contracts."),
'hr_evaluation':fields.boolean('Periodic Evaluations',
help="Lets you create and manage the periodic evaluation and "
"performance review of employees."),
'hr_attendance':fields.boolean('Attendances (Sign In/Out)',
help="Simplifies the management of employee attendances."),
}
_defaults = {
'hr_holidays': True,

View File

@ -26,12 +26,25 @@ class knowledge_installer(osv.osv_memory):
_columns = {
# Knowledge Management
'document_ftp':fields.boolean('Shared Repositories (FTP)'),
'document_webdav':fields.boolean('Shared Repositories (WebDAV)'),
'wiki':fields.boolean('Collaborative Content (Wiki)'),
'document_ftp':fields.boolean('Shared Repositories (FTP)',
help="Provides an FTP access to your OpenERP's Document "
"Management System. Lets you access attachments and "
"virtual documents through a standard FTP client."),
'document_webdav':fields.boolean('Shared Repositories (WebDAV)',
help="Provides a WebDAV access to your OpenERP's Document "
"Management System. Lets you access attachments and "
"virtual documents through your standard file browser."),
'wiki':fields.boolean('Collaborative Content (Wiki)',
help="Lets you create wiki pages and page groups in order "
"to keep track of business knowledge and share it with "
"and between your employees."),
# Templates of Content
'wiki_faq':fields.boolean('Internal FAQ'),
'wiki_quality_manual':fields.boolean('Quality Manual'),
'wiki_faq':fields.boolean('Internal FAQ',
help="Creates a skeleton internal FAQ pre-filled with "
"documentation about OpenERP's Document Management "
"System."),
'wiki_quality_manual':fields.boolean('Quality Manual',
help="Creates an example skeleton for a standard quality manual."),
}
_defaults = {
'document_ftp':True,

View File

@ -4,45 +4,30 @@
<field name="name">knowledge.installer.view</field>
<field name="model">knowledge.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Knowledge Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Knowledge Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Configure Your Knowledge Management System"
colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Knowledge Management" colspan="4"/>
<field name="document_ftp"/>
<field name="document_webdav"/>
<field name="wiki"/>
<separator string="Templates of Content" colspan="4"/>
<field name="wiki_faq"/>
<field name="wiki_quality_manual"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string"
>Configure Your Knowledge Management System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">From this screen, you can select various OpenERP applications which will help employees store information, distribute it and share it with one another.</attribute>
</xpath>
<group colspan="8">
<separator string="Knowledge Management" colspan="4"/>
<field name="document_ftp"/>
<field name="document_webdav"/>
<field name="wiki"/>
<separator string="Templates of Content" colspan="4"/>
<field name="wiki_faq"/>
<field name="wiki_quality_manual"/>
</group>
</data>
</field>
</record>
@ -59,7 +44,7 @@
<record id="knowledge_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_knowledge_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -7,13 +7,12 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Account Journal
</attribute></form>
<form position="attributes">
<attribute name="string">Account Journal</attribute>
</form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
Set accounts on financial journals defined by CamptoCamp
l10n_ch module"/>
<label colspan="4" align="0.0"
string="Set accounts on financial journals defined by CamptoCamp l10n_ch module"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<field name="name" select="1"/>

View File

@ -14,13 +14,12 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Account tax template
</attribute></form>
<form position="attributes">
<attribute name="string">Account tax template</attribute>
</form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
Set account on financial taxes defined by
Camptocamp l10n_ch_c2c_pcg module"/>
<label colspan="4" align="0.0"
string="Set account on financial taxes defined by Camptocamp l10n_ch_c2c_pcg module"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
</group>
@ -47,4 +46,4 @@
<field name="sequence">5</field>
</record>
</data>
</openerp>
</openerp>

View File

@ -4,42 +4,28 @@
<field name="name">misc_tools.installer.view</field>
<field name="model">misc_tools.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Tools Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Tools Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Select Tools To Install" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Tools" colspan="4"/>
<field name="lunch"/>
<field name="subscription"/>
<field name="survey"/>
<field name="audittrail"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string">Select Tools To Install</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string"
>Here are a few useful applications which, while they don't directly contribute to your business, can improve on it or improve your OpenERP experience</attribute>
</xpath>
<group colspan="8">
<separator string="Tools" colspan="4"/>
<field name="lunch"/>
<field name="subscription"/>
<field name="survey"/>
<field name="audittrail"/>
</group>
</data>
</field>
</record>
@ -56,7 +42,7 @@
<record id="misc_tools_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_misc_tools_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -54,9 +54,6 @@
* Print a production order
* Stock forecasts
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['stock', 'hr', 'purchase', 'product', 'process'],
'init_xml': [],
'update_xml': [
'security/mrp_security.xml',

View File

@ -26,10 +26,24 @@ class mrp_installer(osv.osv_memory):
_columns = {
# Manufacturing Resource Planning
'stock_location':fields.boolean('Advanced Routes'),
'mrp_jit':fields.boolean('Just In Time Scheduling'),
'mrp_operations':fields.boolean('Manufacturing Operations'),
'mrp_subproduct':fields.boolean('MRP Subproducts'),
'mrp_repair':fields.boolean('Repairs'),
'stock_location':fields.boolean('Advanced Routes',
help="Manages product routes and paths within and between "
"locations (e.g. warehouses)"),
'mrp_jit':fields.boolean('Just In Time Scheduling',
help="Enables Just In Time computation of procurement orders."
"\n\nWhile it's more resource intensive than the default "
"setup, the JIT computer avoids having to wait for the "
"procurement scheduler to run or having to run the "
"procurement scheduler manually."),
'mrp_operations':fields.boolean('Manufacturing Operations',
help="Enhances production orders with readiness states as well "
"as the dates of start and end of execution of the order."),
'mrp_subproduct':fields.boolean('MRP Subproducts',
help="Enables multiple product output from a single production "
"order: without this, a productio order can have only one "
"output product."),
'mrp_repair':fields.boolean('Repairs',
help="Enables warranty and repair management (and their impact "
"on stocks and invoicing)."),
}
mrp_installer()

View File

@ -4,43 +4,28 @@
<field name="name">mrp.installer.view</field>
<field name="model">mrp.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
MRP Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">MRP Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Configure Your Manufacturing" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Manufacturing Resource Planning" colspan="4"/>
<!-- Advanced Routes -->
<field name="mrp_jit"/>
<field name="mrp_operations"/>
<field name="mrp_subproduct"/>
<field name="mrp_repair"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string">Configure Your Manufacturing</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">After having installed the core manufacturing application, you can extend it with a few more depending on the needs of your organization</attribute>
</xpath>
<group colspan="8">
<separator string="Manufacturing Resource Planning" colspan="4"/>
<field name="stock_location"/>
<field name="mrp_jit"/>
<field name="mrp_operations"/>
<field name="mrp_subproduct"/>
<field name="mrp_repair"/>
</group>
</data>
</field>
</record>
@ -57,7 +42,7 @@
<record id="mrp_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_mrp_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -24,10 +24,9 @@ import pooler
class profile_accounting_config_install_modules_wizard(osv.osv_memory):
_name='profile.accounting.config.install_modules_wizard'
_inherit = 'res.config'
_inherit = 'res.config.installer'
_columns = {
'name':fields.char('Name', size=64),
'account_analytic_analysis':fields.boolean('Analytic Accounting'),
'account_analytic_plans':fields.boolean('Multiple Analytic Plans'),
'account_payment':fields.boolean('Suppliers Payment Management'),
@ -36,18 +35,6 @@ class profile_accounting_config_install_modules_wizard(osv.osv_memory):
'account_budget':fields.boolean('Budgets', help="Helps you to manage financial and analytic budgets."),
'board_document':fields.boolean('Document Management',help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
}
def execute(self, cr, uid, ids, context=None):
result = self.read(cr, uid, ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
if r != 'id' and res[r]:
ids += mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_accounting_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,17 +5,19 @@
<field name="name">Accounting Profile : Install extra modules</field>
<field name="model">profile.accounting.config.install_modules_wizard</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Install Extra Modules
</attribute></form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
Install more modules. A few modules are proposed according
to the Account Profile you selected. You will be able to
install them based on our requirements."/>
<form position="attributes">
<attribute name="string">Install Extra Modules</attribute>
</form>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string"
>Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements.</attribute>
</xpath>
<separator string="title" position="replace"/>
<group colspan="8">
<separator string="Accounting Management" colspan="4"/>
<field name="account_analytic_analysis"/>
<field name="account_analytic_plans"/>
@ -44,6 +46,7 @@
<record model="ir.actions.todo"
id="profile_accounting.config_install_wizard">
<field name="action_id" ref="action_config_install_module"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -25,7 +25,7 @@ import pooler
class profile_association_config_install_modules_wizard(osv.osv_memory):
_name='profile.association.config.install_modules_wizard'
_inherit = 'res.config'
_inherit = 'res.config.installer'
_columns = {
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
@ -38,15 +38,5 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
'wiki': fields.boolean('Wiki',
help="An integrated wiki content management system. This is really usefull to manage FAQ, quality manuals, etc.")
}
def execute(self, cr, uid, ids, context=None):
result = self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_association_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,17 +5,18 @@
<field name="name">Association Profile : Install extra modules</field>
<field name="model">profile.association.config.install_modules_wizard</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Install Extra Modules
</attribute></form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
Install more modules. A few modules are proposed according
to the Account Profile you selected. You will be able to
install them based on our requirements."/>
<form position="attributes">
<attribute name="string">Install Extra Modules</attribute>
</form>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">Install more modules. A few modules are proposed according to the Association Profile you selected. You will be able to install them based on our requirements.</attribute>
</xpath>
<separator string="title" position="replace"/>
<group colspan="8">
<separator string="Project Management" colspan="4"/>
<field name="project"/>
<field name="project_gtd"/>
@ -41,7 +42,8 @@
<record model="ir.actions.todo"
id="config_install_module">
<field name="action_id" ref="action_config_install_module"/>
</record>
<field name="action_id" ref="action_config_install_module"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -25,7 +25,7 @@ import pooler
class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
_name='profile.manufacturing.config.install_modules_wizard'
_inherit = 'res.config'
_inherit = 'res.config.installer'
_columns = {
'mrp_jit':fields.boolean('Just in Time Scheduling',
@ -78,16 +78,6 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
help="Allows to manage product repairs. Handle the guarantee limit date and the invoicing of products and services."),
}
def execute(self, cr, uid, ids, context=None):
result = self.read(cr,uid,ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_manufacturing_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,14 +5,20 @@
<field name="name">Manufacturing Profile: Install Extra Modules</field>
<field name="model">profile.manufacturing.config.install_modules_wizard</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Manufacturing Profile: Install Extra Modules
</attribute></form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="Here are a few modules which might be useful along with the rest of the Manufacturing profile. You can also install them the normal way later on, but if you think you'll need them to fit your requirements, you can select them now and they'll be installed immediately."/>
<form position="attributes">
<attribute name="string">Manufacturing Profile: Install Extra Modules</attribute>
</form>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">Here are a few modules which might be useful along with the rest of the Manufacturing profile. You can also install them the normal way later on, but if you think you'll need them to fit your requirements, you can select them now and they'll be installed immediately.</attribute>
</xpath>
<separator string="title" position="attributes">
<attribute name="string">Manufacturing Modules</attribute>
</separator>
<group colspan="8">
<separator string="Stock &amp; Manufacturing" colspan="4"/>
<field name="stock_location"/>
<field name="mrp_jit"/>
@ -29,7 +35,6 @@
<field name="warning"/>
<field name="portal"/>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
</data>
</field>
</record>
@ -44,7 +49,8 @@
</record>
<record model="ir.actions.todo"
id="config_install_module">
<field name="action_id" ref="action_config_install_module"/>
</record>
<field name="action_id" ref="action_config_install_module"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -24,7 +24,7 @@ import pooler
class profile_service_config_install_modules_wizard(osv.osv_memory):
_name='profile.service.config.install_modules_wizard'
_inherit = 'res.config'
_inherit = 'res.config.installer'
_rec_name = 'crm_configuration'
_columns = {
'crm_configuration':fields.boolean('CRM & Calendars', help="This installs the customer relationship features like: leads and opportunities tracking, shared calendar, jobs tracking, bug tracker, and so on."),
@ -47,16 +47,6 @@ class profile_service_config_install_modules_wizard(osv.osv_memory):
help="An integrated wiki content management system. This is really "\
"useful to manage FAQ, quality manuals, etc.")
}
def execute(self, cr, uid, ids, context=None):
result = self.read(cr, uid, ids)
mod_obj = self.pool.get('ir.module.module')
for res in result:
for r in res:
if r != 'id' and res[r]:
ids = mod_obj.search(cr, uid, [('name', '=', r)])
mod_obj.button_install(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
profile_service_config_install_modules_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,19 +5,21 @@
<field name="name">Service Profile : Install extra modules</field>
<field name="model">profile.service.config.install_modules_wizard</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Install Extra Modules
</attribute></form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
A few modules are proposed according to the
'service profile' you selected. You will be able to
install them or more modules later through the
Administration menu."/>
<separator string="Services Management" colspan="4"/>
<form position="attributes">
<attribute name="string">Install Extra Service Profile Modules</attribute>
</form>
<xpath expr="//label[@string='description']"
posititon="attributes">
<attribute name="string"
>A few modules are proposed according to the 'service profile' you selected. You will be able to install them or more modules later through the Administration menu.</attribute>
</xpath>
<separator string="title" position="attributes">
<attribute name="string">Services Management</attribute>
</separator>
<group colspan="8">
<field name="project_timesheet"/>
<field name="hr_timesheet_invoice"/>
<field name="project_gtd"/>
@ -51,9 +53,8 @@
<record model="ir.actions.todo"
id="config_install_module">
<field name="action_id" ref="action_config_install_module"/>
</record>
<field name="action_id" ref="action_config_install_module"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -26,15 +26,30 @@ class project_installer(osv.osv_memory):
_columns = {
# Project Management
'project_long_term':fields.boolean('Long Term Planning'),
'project_wiki':fields.boolean('Specifications in a Wiki'),
'hr_timesheet_sheet':fields.boolean('Timesheets'),
'hr_timesheet_invoice':fields.boolean('Invoice Based on Hours'),
'account_budget':fields.boolean('Budgets'),
'project_messages':fields.boolean('Project Messages'),
'project_crm':fields.boolean('Issues Tracker & Features Requests'),
'project_long_term':fields.boolean('Long Term Planning',
help="Enables long-term projects tracking, including "
"multiple-phase projects and resource allocation handling."),
'project_wiki':fields.boolean('Specifications in a Wiki',
help=""),
'hr_timesheet_sheet':fields.boolean('Timesheets',
help="Tracks and helps employees encode and validate timesheets "
"and attendance."),
'hr_timesheet_invoice':fields.boolean('Invoice Based on Hours',
help="Helps generate invoice based on based on human resources "
"costs and general expenses."),
'account_budget':fields.boolean('Budgets',
help="Helps accountants manage analytic and crossover budgets."),
'project_messages':fields.boolean('Project Messages',
help="Lets employees send messages to other members of the "
"projects they're working on."),
'project_crm':fields.boolean('Issues Tracker',
help="Automatically synchronizes project tasks and crm cases."),
# Methodologies
'scrum':fields.boolean('SCRUM'),
'project_gtd':fields.boolean('Getting Things Done'),
'scrum':fields.boolean('SCRUM',
help="Implements and tracks the concepts and task types defined "
"in the SCRUM methodology."),
'project_gtd':fields.boolean('Getting Things Done',
help="Embeds the Getting Things Done concepts into OpenERP's "
"project management."),
}
project_installer()

View File

@ -4,49 +4,34 @@
<field name="name">project.installer.view</field>
<field name="model">project.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Project Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Project Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Configure Your Project Management"
colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Project Management" colspan="4"/>
<field name="project_long_term"/>
<field name="project_wiki"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_timesheet_invoice"/>
<field name="account_budget"/>
<field name="project_messages"/>
<field name="project_crm"/>
<separator string="Methodologies" colspan="4"/>
<field name="scrum"/>
<field name="project_gtd"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string"
>Configure Your Project Management</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">Various OpenERP applications are available to bring your project management to the next levels of control and flexibility.</attribute>
</xpath>
<group colspan="8">
<separator string="Project Management" colspan="4"/>
<field name="project_long_term"/>
<field name="project_wiki"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_timesheet_invoice"/>
<field name="account_budget"/>
<field name="project_messages"/>
<field name="project_crm"/>
<separator string="Methodologies" colspan="4"/>
<field name="scrum"/>
<field name="project_gtd"/>
</group>
</data>
</field>
</record>
@ -63,7 +48,7 @@
<record id="project_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_project_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -4,41 +4,28 @@
<field name="name">report_designer.installer.view</field>
<field name="model">report_designer.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Report Modules Installation
</attribute></form>
<form position="attributes">
<attribute name="string">Report Modules Installation</attribute>
</form>
<group string="res_config_contents" position="replace">
<separator string="Select Reporting Tools To Install" colspan="4"/>
<image name="gtk-dialog-info"/>
<newline/>
<label align="0.0" string=" Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Cras metus
augue, ultricies et vehicula id, fringilla quis
mauris. Vestibulum fringilla ipsum sit amet est
adipiscing eget euismod velit semper. Proin non mauris
velit. Donec malesuada nisi sed augue viverra commodo
sagittis nisi rutrum. Cras vitae libero nunc, a
molestie sapien. Proin et augue sit amet est egestas
fermentum ut eu lacus. Etiam nisi orci, volutpat
aliquam viverra interdum, vehicula iaculis
lectus. Mauris ligula sapien, auctor in pharetra non,
ultrices quis odio."/>
<group>
<separator string="Reporting" colspan="4"/>
<field name="base_report_designer"/>
<field name="base_report_creator"/>
<field name="olap"/>
</group>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
<xpath expr='//button[@name="action_next"]' position='attributes'>
<attribute name='string'>Install Modules</attribute>
<separator string="title" position="attributes">
<attribute name="string"
>Select Reporting Tools To Install</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string"
>OpenERP's built-in reporting abilities can be improved even further with some of the following applications</attribute>
</xpath>
<group colspan="8">
<separator string="Reporting" colspan="4"/>
<field name="base_report_designer"/>
<field name="base_report_creator"/>
<field name="olap"/>
</group>
</data>
</field>
</record>
@ -55,7 +42,7 @@
<record id="report_designer_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_report_designer_installer"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
</record>
</data>
</openerp>

View File

@ -458,13 +458,12 @@
<field name="inherit_id" ref="base.res_config_view_base"/>
<field name="arch" type="xml">
<data>
<form position="attributes"><attribute name="string">
Sales Configuration
</attribute></form>
<form position="attributes">
<attribute name="string">Sales Configuration</attribute>
</form>
<group string="res_config_contents" position="replace">
<label colspan="4" align="0.0" string="
Set the policies selected by default when creating a new
sale order."/>
<label colspan="4" align="0.0"
string="Set the policies selected by default when creating a new sale order."/>
<separator colspan="4"
string="Configure Sale Order Logistic"/>
<newline/>