diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml
index 609dd8a6c5e..dd106e75afb 100644
--- a/addons/account/account_installer.xml
+++ b/addons/account/account_installer.xml
@@ -45,35 +45,19 @@
account.installer.modules.form
- account.installer.modules
+ base.setup.installerform
-
+
-
-
- Configure Your Accounting Application
-
-
-
- Add extra Accounting functionalities to the ones already installed.
+
+
+
+
+
+
+
-
- Configure
-
-
-
-
-
-
-
-
-
-
-
-
@@ -88,27 +72,16 @@
new
-
- Accounting Application Configuration
- ir.actions.act_window
- account.installer.modules
-
- form
- form
- new
-
+
+ Accounting
+ 5
+
+ 3
- onskip
-
-
-
-
- 5
- always
-
+ special
diff --git a/addons/account/company_view.xml b/addons/account/company_view.xml
index a9e6815f975..60a3d0eea84 100644
--- a/addons/account/company_view.xml
+++ b/addons/account/company_view.xml
@@ -22,12 +22,9 @@
res.companyform
-
-
-
+
-
-
+
diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml
index 1a0a21d3971..fbae77349af 100644
--- a/addons/account/configurable_account_chart.xml
+++ b/addons/account/configurable_account_chart.xml
@@ -612,12 +612,12 @@
-
+
Generate Chart of Accounts from a Chart Template
- open
- onskip
+
+ special
diff --git a/addons/account/installer.py b/addons/account/installer.py
index 639cc2578ae..39c0863b3c1 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -240,8 +240,7 @@ class account_installer(osv.osv_memory):
account_installer()
class account_installer_modules(osv.osv_memory):
- _name = 'account.installer.modules'
- _inherit = 'res.config.installer'
+ _inherit = 'base.setup.installer'
_columns = {
'account_analytic_plans': fields.boolean('Multiple Analytic Plans',
help="Allows invoice lines to impact multiple analytic accounts "
@@ -253,18 +252,11 @@ class account_installer_modules(osv.osv_memory):
help="Helps you generate reminder letters for unpaid invoices, "
"including multiple levels of reminding and customized "
"per-partner policies."),
- 'account_voucher': fields.boolean('Voucher Management',
- help="Account Voucher module includes all the basic requirements of "
- "Voucher Entries for Bank, Cash, Sales, Purchase, Expenses, Contra, etc... "),
'account_anglo_saxon': fields.boolean('Anglo-Saxon Accounting',
help="This module will support the Anglo-Saxons accounting methodology by "
"changing the accounting logic with stock transactions."),
}
- _defaults = {
- 'account_voucher': True,
- }
-
account_installer_modules()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account_analytic_plans/__init__.py b/addons/account_analytic_plans/__init__.py
index 067aa84d267..a5c371fa6ec 100644
--- a/addons/account_analytic_plans/__init__.py
+++ b/addons/account_analytic_plans/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,10 +15,9 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-
import account_analytic_plans
import wizard
import report
diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py
index dab9e83c75a..1240a336500 100644
--- a/addons/account_analytic_plans/__openerp__.py
+++ b/addons/account_analytic_plans/__openerp__.py
@@ -69,7 +69,8 @@ of distribution models.
'account_analytic_plans_view.xml',
'account_analytic_plans_report.xml',
'wizard/analytic_plan_create_model_view.xml',
- 'wizard/account_crossovered_analytic_view.xml'
+ 'wizard/account_crossovered_analytic_view.xml',
+ 'account_analytic_plans_installer_view.xml'
],
'demo_xml' : [],
'test' : ['test/acount_analytic_plans_report.yml'],
diff --git a/addons/account_analytic_plans/account_analytic_plans_installer_view.xml b/addons/account_analytic_plans/account_analytic_plans_installer_view.xml
new file mode 100644
index 00000000000..3543539debb
--- /dev/null
+++ b/addons/account_analytic_plans/account_analytic_plans_installer_view.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+ Account Analytic Plans
+ ir.actions.act_window
+ account.analytic.plan
+ form
+ tree,form
+
+
+
+
+
+
+ 15
+ normal
+ skip
+
+
+
+
+
+
diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py
index c798c703f37..06a53bb9548 100644
--- a/addons/account_followup/account_followup.py
+++ b/addons/account_followup/account_followup.py
@@ -33,6 +33,20 @@ class followup(osv.osv):
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'account_followup.followup', context=c),
}
+
+ def check_company_uniq(self, cr, uid, ids, context=None):
+ sr_id = self.search(cr,uid,[],context=context)
+ lines = self.browse(cr, uid, sr_id, context=context)
+ company = []
+ for l in lines:
+ if l.company_id.id in company:
+ return False
+ if l.company_id.id not in company:
+ company.append(l.company_id.id)
+ return True
+ _constraints = [
+ (check_company_uniq, 'Only One Folllowup by Company.',['company_id'] )
+ ]
followup()
@@ -47,6 +61,9 @@ class followup_line(osv.osv):
'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"),
'description': fields.text('Printed Message', translate=True),
}
+ _defaults = {
+ 'start': 'days',
+ }
followup_line()
diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml
index 326264ffdcd..60d414477b0 100644
--- a/addons/account_followup/account_followup_view.xml
+++ b/addons/account_followup/account_followup_view.xml
@@ -8,10 +8,9 @@
tree
-
-
+
@@ -22,12 +21,14 @@
form
@@ -75,6 +74,10 @@
+
+
+
+
@@ -85,6 +88,7 @@
account_followup.followupform
+ Define follow up levels and their related messages and delay. For each step, specify the message and the day of delay. Use the legend to know the using code to adapt the email content to the good context (good name, good date) and you can manage the multi language of messages.
@@ -170,6 +174,28 @@
+
+
+
+
+ Configure Follow-Ups
+ ir.actions.act_window
+ account_followup.followup
+ form
+ form,tree
+
+
+
+
+
+
+
+ current
+ normal
+ skip
+
+
+
diff --git a/addons/account_followup/test/account_followup.yml b/addons/account_followup/test/account_followup.yml
index c69fdb112c6..b43ca32d200 100644
--- a/addons/account_followup/test/account_followup.yml
+++ b/addons/account_followup/test/account_followup.yml
@@ -1,8 +1,12 @@
-
In order to test account followup module in OpenERP I create a FollowUp structure
+-
+ !record {model: res.company, id: ymltest_company_2}:
+ name: Acme 2
-
!record {model: account_followup.followup, id: account_followup_followup_testfollowups0}:
description: First letter after 15 net days, 30 net days and 45 days end of month levels.
+ company_id: ymltest_company_2
followup_line:
- delay: 15
name: 'level 0: 15 days'
diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py
index a8608c2fdd0..18b0fc1b874 100644
--- a/addons/account_followup/wizard/account_followup_print.py
+++ b/addons/account_followup/wizard/account_followup_print.py
@@ -171,7 +171,7 @@ class account_followup_print_all(osv.osv_memory):
"SELECT * "\
"FROM account_followup_followup_line "\
"WHERE followup_id=%s "\
- "ORDER BY sequence", (fup_id,))
+ "ORDER BY delay", (fup_id,))
for result in cr.dictfetchall():
delay = datetime.timedelta(days=result['delay'])
fups[old] = (current_date - delay, result['id'])
diff --git a/addons/account_sequence/account_sequence_installer_view.xml b/addons/account_sequence/account_sequence_installer_view.xml
index 1051b133045..b39521d3c01 100644
--- a/addons/account_sequence/account_sequence_installer_view.xml
+++ b/addons/account_sequence/account_sequence_installer_view.xml
@@ -49,8 +49,10 @@
+ 3
- onskip
+ special
+ skip
diff --git a/addons/association/profile_association.py b/addons/association/profile_association.py
index 2b73dd69885..8a528177a30 100644
--- a/addons/association/profile_association.py
+++ b/addons/association/profile_association.py
@@ -22,17 +22,13 @@
from osv import fields, osv
class profile_association_config_install_modules_wizard(osv.osv_memory):
- _name='profile.association.config.install_modules_wizard'
- _inherit = 'res.config.installer'
+ _inherit = 'base.setup.installer'
_columns = {
- 'hr_expense':fields.boolean('Expenses Tracking', help="Tracks and manages employee expenses, and can "
+ 'hr_expense':fields.boolean('Resources Management: Expenses Tracking', help="Tracks and manages employee expenses, and can "
"automatically re-invoice clients if the expenses are "
"project-related."),
- 'project':fields.boolean('Project Management',
- help="Helps you manage your projects and tasks by tracking them, "
- "generating plannings, etc..."),
- 'event_project':fields.boolean('Events', help="Helps you to manage and organize your events."),
+ 'event_project':fields.boolean('Event Management: Events', help="Helps you to manage and organize your events."),
'project_gtd':fields.boolean('Getting Things Done',
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
'wiki': fields.boolean('Wiki', help="Lets you create wiki pages and page groups in order "
diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml
index 95e46457cca..12222ecbd90 100644
--- a/addons/association/profile_association.xml
+++ b/addons/association/profile_association.xml
@@ -3,56 +3,22 @@
Association Application Configuration
- profile.association.config.install_modules_wizard
+ base.setup.installerform
-
+
-
-
-
-
-
- Here are specific applications related to the Association Profile you selected.
+
+
+
+
+
+
+
-
- Configure
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Association Application Configuration
- ir.actions.act_window
- profile.association.config.install_modules_wizard
-
- form
- form
- new
-
-
-
-
- 3
- always
-
-
diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml
index 2c0cf191e4e..0afee6233ef 100644
--- a/addons/base_report_designer/base_report_designer_installer.xml
+++ b/addons/base_report_designer/base_report_designer_installer.xml
@@ -56,8 +56,9 @@
+ 3
- always
+ special
diff --git a/addons/base_setup/__init__.py b/addons/base_setup/__init__.py
index 9ed5ec84535..2dab90b90b2 100644
--- a/addons/base_setup/__init__.py
+++ b/addons/base_setup/__init__.py
@@ -20,7 +20,6 @@
##############################################################################
import installer
-import todo
import wizard
import os
import base64
diff --git a/addons/base_setup/__openerp__.py b/addons/base_setup/__openerp__.py
index 420deb46bfb..39a417460b0 100644
--- a/addons/base_setup/__openerp__.py
+++ b/addons/base_setup/__openerp__.py
@@ -37,8 +37,8 @@ It also helps to easily configure your company.
'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',
- 'base_setup_todo.xml',
],
'demo_xml': ['base_setup_demo.xml'],
'installable': True,
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index 13906abe6ba..e8168a69ea9 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -1,5 +1,6 @@
+
base.setup.installer.viewbase.setup.installer
@@ -23,7 +24,7 @@
Install Applications
-
+
@@ -40,9 +41,21 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -60,8 +73,237 @@
+ 2
- always
+ normal_recurring
+
+
+
+
+ migrade.application.installer.modules.form
+ migrade.application.installer.modules
+ form
+
+
+
+
+
+ Migrate data from another application
+
+
+ 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
+
+
+ Configure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Migrate data from another application
+ ir.actions.act_window
+ migrade.application.installer.modules
+
+ form
+ form
+ new
+
+
+
+
+
+ normal
+ skip
+
+
+
+
+
+ Import or create customers
+ ir.actions.act_window
+ res.partner
+ form
+ tree,form
+
+ Create some customers, suppliers and their contacts manually or import a CSV spreadsheet by clicking on the import link
+
+
+
+
+
+
+ normal
+ current
+ skip
+
+
+
+
+
+ Define default users preferences
+ user.preferences.config
+ form
+
+
+
+
+
+ Define default users preferences
+
+
+ Specify default values. This will set the default values for each new user, each user is free to change his own preferences.
+
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Define default users preferences
+ ir.actions.act_window
+ user.preferences.config
+ form
+
+ form
+ new
+
+
+
+
+
+
+
+ normal
+ skip
+
+
+
+
+
+ Create New User's Login
+ ir.actions.act_window
+ res.users
+ form
+ form
+
+
+
+
+
+
+
+
+ normal
+ current
+ 1000
+ cancel
+
+
+
+
+
+
+
+ normal
+ cancel
+
+
+
+
+
+ Specify Your Terminology
+ specify.partner.terminology
+ form
+
+
+
+
+
+ Specify Your Terminology
+
+
+ Based on the industry needs you can use this wizard to change the terminologies for Partners.
+
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+ Specify Your Terminology
+ ir.actions.act_window
+ specify.partner.terminology
+ form
+
+ form
+ new
+
+
+
+
+
+
+
+ normal
+ skip
+
+
+
+
+ Company Configuration
+ ir.actions.act_window
+ res.company
+
+ form
+ form
+ {'res_id': user.company_id.id}
+
+
+
+
+
+ 1
+ normal
+ skip
+
+
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
deleted file mode 100644
index 7cd0563aafe..00000000000
--- a/addons/base_setup/base_setup_todo.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
- Company Configuration
- base.setup.company
- form
-
-
-
-
-
- Your company information will be used to personalize documents issued with OpenERP such as invoices, sales orders and much more.
-
-
- Configure Your Company Information
-
-
- 25
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Company Configuration
- ir.actions.act_window
- base.setup.company
-
- form
- form
- new
-
-
-
-
- 1
- onskip
-
-
-
diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py
index e23f1171752..172d9687582 100644
--- a/addons/base_setup/installer.py
+++ b/addons/base_setup/installer.py
@@ -19,6 +19,10 @@
#
##############################################################################
from osv import fields, osv
+import pooler
+import pytz
+from tools.translate import _
+import tools
class base_setup_installer(osv.osv_memory):
_name = 'base.setup.installer'
@@ -49,7 +53,7 @@ class base_setup_installer(osv.osv_memory):
'mrp':fields.boolean('Manufacturing',
help="Helps you manage your manufacturing processes and generate "
"reports on those processes."),
- 'account_voucher':fields.boolean('Invoicing',
+ 'account_voucher':fields.boolean('Invoicing & Payments',
help="Allows you to create your invoices and track the payments. It is an easier version of the accounting module for managers who are not accountants."),
'account_accountant':fields.boolean('Accounting & Finance',
help="Helps you handle your accounting needs, if you are not an accountant, we suggest you to install only the Invoicing "),
@@ -101,5 +105,219 @@ class base_setup_installer(osv.osv_memory):
value.update({'progress':progress})
if progress < 10.:
progress = 10.
+
return {'value':value}
+
+
+ def execute(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ module_pool = self.pool.get('ir.module.module')
+ modules_selected = []
+ datas = self.read(cr, uid, ids, context=context)[0]
+ for mod in datas.keys():
+ if mod in ('id', 'progress'):
+ continue
+ if datas[mod] == 1:
+ modules_selected.append(mod)
+
+ module_ids = module_pool.search(cr, uid, [('name', 'in', modules_selected)], context=context)
+ for module in module_pool.browse(cr, uid, module_ids, context=context):
+ if module.state == 'uninstalled':
+ module_pool.state_update(cr, uid, [module.id], 'to install', ['uninstalled'], context)
+ cr.commit()
+ new_db, self.pool = pooler.restart_pool(cr.dbname, update_module=True)
+ elif module.state == 'installed':
+ cr.execute("update ir_actions_todo set state='open' \
+ from ir_model_data as data where data.res_id = ir_actions_todo.id \
+ and ir_actions_todo.type='special'\
+ and data.model = 'ir.actions.todo' and data.module=%s", (module.name, ))
+ return
+
base_setup_installer()
+
+#Migrate data from another application Conf wiz
+
+class migrade_application_installer_modules(osv.osv_memory):
+ _name = 'migrade.application.installer.modules'
+ _inherit = 'res.config.installer'
+ _columns = {
+ 'import_saleforce': fields.boolean('Import Saleforce',
+ help="For Import Saleforce"),
+ 'import_sugarcrm': fields.boolean('Import Sugarcrm',
+ help="For Import Sugarcrm"),
+ 'sync_google_contact': fields.boolean('Sync Google Contact',
+ help="For Sync Google Contact"),
+ 'quickbooks_ippids': fields.boolean('Quickbooks Ippids',
+ help="For Quickbooks Ippids"),
+ }
+
+migrade_application_installer_modules()
+
+class product_installer(osv.osv_memory):
+ _name = 'product.installer'
+ _inherit = 'res.config'
+ _columns = {
+ 'customers': fields.selection([('create','Create'), ('import','Import')], 'Customers', size=32, required=True, help="Import or create customers"),
+
+ }
+ _defaults = {
+ 'customers': 'create',
+ }
+
+ def execute(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ data_obj = self.pool.get('ir.model.data')
+ val = self.browse(cr, uid, ids, context=context)[0]
+ if val.customers == 'create':
+ id2 = data_obj._get_id(cr, uid, 'base', 'view_partner_form')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'res.partner',
+ 'views': [(id2, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'current',
+ 'nodestroy':False,
+ }
+ if val.customers == 'import':
+ return {'type': 'ir.actions.act_window'}
+
+product_installer()
+
+
+# Define default users preferences config wiz
+
+def _lang_get(self, cr, uid, context=None):
+ obj = self.pool.get('res.lang')
+ ids = obj.search(cr, uid, [('translatable','=',True)])
+ res = obj.read(cr, uid, ids, ['code', 'name'], context=context)
+ res = [(r['code'], r['name']) for r in res]
+ return res
+
+def _tz_get(self,cr,uid, context=None):
+ return [(x, x) for x in pytz.all_timezones]
+
+class user_preferences_config(osv.osv_memory):
+ _name = 'user.preferences.config'
+ _inherit = 'res.config'
+ _columns = {
+ 'context_tz': fields.selection(_tz_get, 'Timezone', size=64,
+ help="Set default for new user's timezone, used to perform timezone conversions "
+ "between the server and the client."),
+ 'context_lang': fields.selection(_lang_get, 'Language', required=True,
+ help="Sets default language for the all user interface, when UI "
+ "translations are available. If you want to Add new Language, you can add it from 'Load an Official Translation' wizard from 'Administration' menu."),
+ 'view': fields.selection([('simple','Simplified'),
+ ('extended','Extended')],
+ 'Interface', required=True, help= "If you use OpenERP for the first time we strongly advise you to select the simplified interface, which has less features but is easier. You can always switch later from the user preferences." ),
+ 'menu_tips': fields.boolean('Display Tips', help="Check out this box if you want to always display tips on each menu action"),
+
+ }
+ _defaults={
+ 'view' : lambda self,cr,uid,*args: self.pool.get('res.users').browse(cr, uid, uid).view or 'simple',
+ 'context_lang' : 'en_US',
+ 'menu_tips' : True
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ if context is None:
+ context = {}
+ res = super(user_preferences_config, self).default_get(cr, uid, fields, context=context)
+ res_default = self.pool.get('ir.values').get(cr, uid, 'default', False, ['res.users'])
+ for id, field, value in res_default:
+ res.update({field: value})
+ return res
+
+ def execute(self, cr, uid, ids, context=None):
+ user_obj = self.pool.get('res.users')
+ user_ids = user_obj.search(cr, uid, [], context=context)
+ for o in self.browse(cr, uid, ids, context=context):
+ user_obj.write(cr , uid, user_ids ,{'context_tz' : o.context_tz, 'context_lang' : o.context_lang, 'view' : o.view, 'menu_tips' : o.menu_tips}, context=context)
+ ir_values_obj = self.pool.get('ir.values')
+ ir_values_obj.set(cr, uid, 'default', False, 'context_tz', ['res.users'], o.context_tz)
+ ir_values_obj.set(cr, uid, 'default', False, 'context_lang', ['res.users'], o.context_lang)
+ ir_values_obj.set(cr, uid, 'default', False, 'view', ['res.users'], o.view)
+ 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'
+ _inherit = 'res.config'
+ _columns = {
+ 'partner': fields.selection([('Customer','Customer'),
+ ('Client','Client'),
+ ('Member','Member'),
+ ('Patient','Patient'),
+ ('Partner','Partner'),
+ ('Donor','Donor'),
+ ('Guest','Guest'),
+ ('Tenant','Tenant')
+ ],
+ 'Choose how to call a customer', required=True ),
+ }
+ _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')
+ context_lang = user_obj.browse(cr, uid, uid, context=context).context_lang
+ existing_trans_ids = trans_obj.search(cr, uid, [('name','=',name), ('lang','=',context_lang), ('type','=',type), ('src','=',src), ('res_id','=',res_id)])
+ if existing_trans_ids:
+ trans_obj.write(cr, uid, existing_trans_ids, {'value': value}, context=context)
+ 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
+ pattern = re.compile(src, re.IGNORECASE)
+ return pattern.sub(_(value), _(ref_string))
+ trans_obj = self.pool.get('ir.translation')
+ fields_obj = self.pool.get('ir.model.fields')
+ menu_obj = self.pool.get('ir.ui.menu')
+ act_window_obj = self.pool.get('ir.actions.act_window')
+ for o in self.browse(cr, uid, ids, context=context):
+ #translate label of field
+ field_ids = fields_obj.search(cr, uid, [('field_description','ilike','Customer')])
+ for f_id in fields_obj.browse(cr ,uid, field_ids, context=context):
+ field_ref = f_id.model_id.model + ',' + f_id.name
+ self.make_translations(cr, uid, ids, field_ref, 'field', f_id.field_description, _case_insensitive_replace(f_id.field_description,'Customer',o.partner), context=context)
+ #translate help tooltip of field
+ for obj in self.pool.obj_pool.values():
+ for field_name, field_rec in obj._columns.items():
+ if field_rec.help.lower().count('customer'):
+ field_ref = obj._name + ',' + field_name
+ self.make_translations(cr, uid, ids, field_ref, 'help', field_rec.help, _case_insensitive_replace(field_rec.help,'Customer',o.partner), context=context)
+ #translate menuitems
+ menu_ids = menu_obj.search(cr,uid, [('name','ilike','Customer')])
+ for m_id in menu_obj.browse(cr, uid, menu_ids, context=context):
+ menu_name = m_id.name
+ menu_ref = 'ir.ui.menu' + ',' + 'name'
+ self.make_translations(cr, uid, ids, menu_ref, 'model', menu_name, _case_insensitive_replace(menu_name,'Customer',o.partner), res_id=m_id.id, context=context)
+ #translate act window name
+ act_window_ids = act_window_obj.search(cr, uid, [('name','ilike','Customer')])
+ for act_id in act_window_obj.browse(cr ,uid, act_window_ids, context=context):
+ act_ref = 'ir.actions.act_window' + ',' + 'name'
+ self.make_translations(cr, uid, ids, act_ref, 'model', act_id.name, _case_insensitive_replace(act_id.name,'Customer',o.partner), res_id=act_id.id, context=context)
+ #translate act window tooltips
+ act_window_ids = act_window_obj.search(cr, uid, [('help','ilike','Customer')])
+ for act_id in act_window_obj.browse(cr ,uid, act_window_ids, context=context):
+ 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:
diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py
deleted file mode 100644
index f5c8c8d09a6..00000000000
--- a/addons/base_setup/todo.py
+++ /dev/null
@@ -1,178 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-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 _show_company_data(self, cr, uid, context=None):
- # We only want to show the default company data in demo mode, otherwise users tend to forget
- # to fill in the real company data in their production databases
- return self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'module_meta_information').demo
-
-
- 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], context=context)
- defaults['company_id'] = company.id
-
- if not self._show_company_data(cr, uid, context=context):
- return defaults
-
- 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, 'Fed. State'),
- 'country_id':fields.selection(_get_all_countries, 'Country'),
- 'email':fields.char('E-mail', size=64),
- 'phone':fields.char('Phone', size=64),
- 'currency':fields.many2one('res.currency', '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'),
- 'account_no':fields.char('Bank Account No', size=64),
- 'website': fields.char('Company Website', size=64, help="Example: http://openerp.com"),
- }
-
- 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,
- 'currency_id':payload.currency.id,
- 'account_no':payload.account_no,
- })
-
- company.partner_id.write({
- 'name':payload.name,
- 'website':payload.website,
- })
-
- 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()
-
-class res_currency(osv.osv):
- _inherit = 'res.currency'
-
- def name_get(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
-# We can use the following line,if we want to restrict this name_get for company setup only
-# But, its better to show currencies as name(Code).
- if not len(ids):
- return []
- if isinstance(ids, (int, long)):
- ids = [ids]
- reads = self.read(cr, uid, ids, ['name','symbol'], context, load='_classic_write')
- return [(x['id'], tools.ustr(x['name']) + (x['symbol'] and (' (' + tools.ustr(x['symbol']) + ')') or '')) for x in reads]
-
-res_currency()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_setup/wizard/__init__.py b/addons/base_setup/wizard/__init__.py
new file mode 100644
index 00000000000..3c482efa976
--- /dev/null
+++ b/addons/base_setup/wizard/__init__.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import res_company_logo
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/base_setup/wizard/res_company_logo.py b/addons/base_setup/wizard/res_company_logo.py
new file mode 100644
index 00000000000..255b0e89408
--- /dev/null
+++ b/addons/base_setup/wizard/res_company_logo.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+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:
+
diff --git a/addons/base_setup/wizard/res_company_logo_view.xml b/addons/base_setup/wizard/res_company_logo_view.xml
new file mode 100644
index 00000000000..a21fd261dd8
--- /dev/null
+++ b/addons/base_setup/wizard/res_company_logo_view.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+ res.company.logo.form
+ res.company.logo
+ form
+
+
+
+
+
+
+
+
+ Upload your company logo in JPG or PNG with a format similar to 450*150 pixels
+
+
+
+ 12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Upload Your Company Logo
+ res.company.logo
+ form
+ tree,form
+
+ new
+
+
+
+
diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py
index f6c61337ce4..1ca212d0525 100644
--- a/addons/crm/crm_installer.py
+++ b/addons/crm/crm_installer.py
@@ -23,19 +23,18 @@ from lxml import etree
from osv import fields, osv
class crm_installer(osv.osv_memory):
- _name = 'crm.installer'
- _inherit = 'res.config.installer'
+ _inherit = 'base.setup.installer'
_columns = {
'name': fields.char('Name', size=64),
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages a Helpdesk service."),
'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fundraising process and tracking."),
'crm_claim': fields.boolean('Claims', help="Manages the suppliers and customers claims, including your corrective or preventive actions."),
- 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Helps you to synchronize the meetings with other calendar clients and mobiles."),
+ 'crm_caldav': fields.boolean('Synchronization: Calendar Synchronizing', help="Helps you to synchronize the meetings with other calendar clients and mobiles."),
'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale from opportunity cases in the CRM."),
- 'fetchmail': fields.boolean('Fetch Emails', help="Allows you to receive E-Mails from POP/IMAP server."),
- 'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
- 'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
+ 'fetchmail': fields.boolean('Synchronization: Fetch Emails', help="Allows you to receive E-Mails from POP/IMAP server."),
+ 'thunderbird': fields.boolean('Plug-In: Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
+ 'outlook': fields.boolean('Plug-In: MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application."),
'import_google': fields.boolean('Google Import', help="Imports contacts and events from your google account."),
}
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
index 14e882f2967..e5566e2f7b0 100644
--- a/addons/crm/crm_installer_view.xml
+++ b/addons/crm/crm_installer_view.xml
@@ -2,68 +2,63 @@
crm.installer.view
- crm.installer
+ base.setup.installerform
-
+
-
-
-
- Configure Your CRM Application
-
-
- Enhance your core CRM Application with additional functionalities.
+
+
+
+
+
+
+
+
+
+
+
+
-
- 8
-
-
-
- Configure
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM Application Configuration
- ir.actions.act_window
- crm.installer
-
- form
- form
- new
+
+
+ Create Sales Team
+ ir.actions.act_window
+ crm.case.section
+ form
+ tree,form
+
+ Define sales teams to structure your sales organization and assign users to each team. You should also define the sales stage to each team. As an example, if you use Solutions Selling techniques to track your opportunities, you can assign the following stage to the team: Territory, Qualified, Qualified Sponsors, Proposition, Negociaton, Won/Lost.
-
-
- 3
- always
-
+
+
+
+ 10
+ normal
+ skip
+
+
+ Review Sales Stages
+ ir.actions.act_window
+ crm.case.stage
+ form
+ tree,form
+
+ Stages will allow salesmen to easily track how a specific opportunity is positioned in the sales cycle. In order to efficiently manage your sales pipeline, it's important to define conditions to go to the next step. Example: to set an opportunity as 'Qualified', you must set the "Expected Revenue" and the "Expected Closing Date." You should also have a look at the tooltip of the field "Change Probability Automatically".
+
+
+
+
+
+ 10
+ normal
+ skip
+
+
diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py
index 7ad3f7fff5f..d70af4b4d1e 100644
--- a/addons/delivery/delivery.py
+++ b/addons/delivery/delivery.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -40,6 +40,7 @@ class delivery_carrier(osv.osv):
currency = order.pricelist_id.currency_id.name or ''
res = [(r['id'], r['name']+' ('+(str(r['price']))+' '+currency+')') for r in self.read(cr, uid, ids, ['name', 'price'], context)]
return res
+
def get_price(self, cr, uid, ids, field_name, arg=None, context=None):
res={}
if context is None:
@@ -58,17 +59,26 @@ class delivery_carrier(osv.osv):
price = 0.0
res[carrier.id]=price
return res
+
_columns = {
'name': fields.char('Carrier', size=64, required=True),
'partner_id': fields.many2one('res.partner', 'Carrier Partner', required=True),
'product_id': fields.many2one('product.product', 'Delivery Product', required=True),
'grids_id': fields.one2many('delivery.grid', 'carrier_id', 'Delivery Grids'),
- 'price' : fields.function(get_price,string='Price'),
- 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it.")
+ 'price' : fields.function(get_price, string='Price'),
+ 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it."),
+ 'normal_price': fields.float('Normal Price'),
+ 'free_if_more_than': fields.boolean('Free If More Than'),
+ 'amount': fields.float('Amount'),
+ 'use_detailed_pricelist': fields.boolean('Use Detailed Pricelist'),
+ 'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Price List'),
}
+
_defaults = {
- 'active': lambda *args:1
+ 'active': 1,
+ 'free_if_more_than': False,
}
+
def grid_get(self, cr, uid, ids, contact_id, context=None):
contact = self.pool.get('res.partner.address').browse(cr, uid, contact_id, context=context)
for carrier in self.browse(cr, uid, ids, context=context):
@@ -86,6 +96,63 @@ class delivery_carrier(osv.osv):
continue
return grid.id
return False
+
+ def create_grid_lines(self, cr, uid, ids, vals, context=None):
+ if context == None:
+ context = {}
+ grid_line_pool = self.pool.get('delivery.grid.line')
+ grid_pool = self.pool.get('delivery.grid')
+ for record in self.browse(cr, uid, ids, context=context):
+ grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id)], context=context)
+ if not grid_id:
+ record_data = {
+ 'name': vals.get('name', False),
+ 'carrier_id': record.id,
+ 'seqeunce': 10,
+ }
+ new_grid_id = grid_pool.create(cr, uid, record_data, context=context)
+ grid_id = [new_grid_id]
+
+ #delete all existing grid lines
+ grid_lines = [line.id for line in grid_pool.browse(cr, uid, grid_id[0]).line_ids if line.type == 'price']
+ grid_line_pool.unlink(cr, uid, grid_lines, context=context)
+
+ #create the grid lines
+ if record.free_if_more_than:
+ data = {
+ 'grid_id': grid_id and grid_id[0],
+ 'name': _('Free if more than %d') % record.amount,
+ 'type': 'price',
+ 'operator': '>=',
+ 'max_value': record.amount,
+ 'standard_price': 0.0,
+ 'list_price': 0.0,
+ }
+ grid_line_pool.create(cr, uid, data, context=context)
+
+ if record.normal_price:
+ default_data = {
+ 'grid_id': grid_id and grid_id[0],
+ 'name': _('Default price'),
+ 'type': 'price',
+ 'operator': '>=',
+ 'max_value': 0.0,
+ 'standard_price': record.normal_price,
+ 'list_price': record.normal_price,
+ }
+ grid_line_pool.create(cr, uid, default_data, context=context)
+ return True
+
+ def write(self, cr, uid, ids, vals, context=None):
+ res_id = super(delivery_carrier, self).write(cr, uid, ids, vals, context=context)
+ self.create_grid_lines(cr, uid, ids, vals, context=context)
+ return res_id
+
+ def create(self, cr, uid, vals, context=None):
+ res_id = super(delivery_carrier, self).create(cr, uid, vals, context=context)
+ self.create_grid_lines(cr, uid, [res_id], vals, context=context)
+ return res_id
+
delivery_carrier()
class delivery_grid(osv.osv):
@@ -151,7 +218,9 @@ class delivery_grid_line(osv.osv):
_columns = {
'name': fields.char('Name', size=32, required=True),
'grid_id': fields.many2one('delivery.grid', 'Grid',required=True),
- 'type': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable', required=True),
+ 'type': fields.selection([('weight','Weight'),('volume','Volume'),\
+ ('wv','Weight * Volume'), ('price','Price')],\
+ 'Variable', required=True),
'operator': fields.selection([('==','='),('<=','<='),('>=','>=')], 'Operator', required=True),
'max_value': fields.float('Maximum Value', required=True),
'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
@@ -167,7 +236,6 @@ class delivery_grid_line(osv.osv):
}
_order = 'list_price'
-
delivery_grid_line()
diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml
index 1e3fb6b2a1d..e0dd12e0038 100644
--- a/addons/delivery/delivery_view.xml
+++ b/addons/delivery/delivery_view.xml
@@ -4,9 +4,6 @@
-
-
-
delivery.carrier.treedelivery.carrier
@@ -25,10 +22,46 @@
form
@@ -38,8 +71,18 @@
delivery.carrierformtree,form
- Create and manage the delivery methods you need for your sales activities. Each delivery method can be assigned to a price list which computes the price of the delivery according to the products sold or delivered.
+ Define the delivery methods you are using and their pricing in order to reinvoice the delivery costs when you are doing invoicing based on delivery orders
+
+
+ Delivery Method
+ ir.actions.act_window
+ delivery.carrier
+ form
+ form,tree
+ Define the delivery methods you are using and their pricing in order to reinvoice the delivery costs when you are doing invoicing based on delivery orders
+
+
@@ -98,13 +141,17 @@
form
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -118,7 +165,7 @@
-
+
@@ -286,6 +333,12 @@
+
+
+ 10
+ normal
+ skip
+
diff --git a/addons/document/wizard/document_configuration_view.xml b/addons/document/wizard/document_configuration_view.xml
index 156af432b0e..c2bf3245afb 100644
--- a/addons/document/wizard/document_configuration_view.xml
+++ b/addons/document/wizard/document_configuration_view.xml
@@ -41,12 +41,18 @@
formnew
+
+
+ Knowledge Management
+ 5
+
+
-
-
+ special
+ skip
diff --git a/addons/document_ftp/wizard/ftp_configuration_view.xml b/addons/document_ftp/wizard/ftp_configuration_view.xml
index 151e2ce49c6..9943fa6d177 100644
--- a/addons/document_ftp/wizard/ftp_configuration_view.xml
+++ b/addons/document_ftp/wizard/ftp_configuration_view.xml
@@ -44,10 +44,12 @@
formnew
-
+
+
+ skip
diff --git a/addons/document_ics/document_ics_config_wizard.xml b/addons/document_ics/document_ics_config_wizard.xml
index e338765e97d..efa232a0a0d 100644
--- a/addons/document_ics/document_ics_config_wizard.xml
+++ b/addons/document_ics/document_ics_config_wizard.xml
@@ -55,7 +55,9 @@
- always
+
+ special
+ skip
diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py
index 9950502b4dd..d2694fdb958 100644
--- a/addons/fetchmail/__openerp__.py
+++ b/addons/fetchmail/__openerp__.py
@@ -41,6 +41,7 @@ Fetch email from POP / IMAP servers.
"fetchmail_view.xml",
"fetchmail_data.xml",
'security/ir.model.access.csv',
+ 'fetchmail_installer_view.xml'
],
'demo_xml': [
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 386b48f1546..9817f0d6633 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -59,9 +59,9 @@ class email_server(osv.osv):
'password' : fields.char('Password', size=1024, invisible=True, required=True, readonly=True, states={'draft':[('readonly', False)]}),
'note': fields.text('Description'),
'action_id':fields.many2one('ir.actions.server', 'Email Server Action', required=False, domain="[('state','=','email')]", help="An Email Server Action. It will be run whenever an e-mail is fetched from server."),
- 'object_id': fields.many2one('ir.model', "Model", required=True, help="OpenObject Model. Generates a record of this model.\nSelect Object with message_new attrbutes."),
+ 'object_id': fields.many2one('ir.model', "Object To Create", required=True, help="Whenever an email arrives, it automatically creates the object of this type with all the information attached."),
'priority': fields.integer('Server Priority', readonly=True, states={'draft':[('readonly', False)]}, help="Priority between 0 to 10, select define the order of Processing"),
- 'user_id':fields.many2one('res.users', 'User', required=False),
+ 'user_id':fields.many2one('res.users', 'User', required=False, help="This is the user that runs the cron"),
'message_ids': fields.one2many('mailgate.message', 'server_id', 'Messages', readonly=True),
}
_defaults = {
diff --git a/addons/fetchmail/fetchmail_installer_view.xml b/addons/fetchmail/fetchmail_installer_view.xml
new file mode 100644
index 00000000000..48c9a174998
--- /dev/null
+++ b/addons/fetchmail/fetchmail_installer_view.xml
@@ -0,0 +1,21 @@
+
+
+
+
+ Setup Your Mail server
+ ir.actions.act_window
+ email.server
+ form
+ tree,form
+
+
+
+
+
+
+ 4
+ normal
+ skip
+
+
+
\ No newline at end of file
diff --git a/addons/fetchmail/fetchmail_view.xml b/addons/fetchmail/fetchmail_view.xml
index 096a83bfa4e..99f421ac4a5 100644
--- a/addons/fetchmail/fetchmail_view.xml
+++ b/addons/fetchmail/fetchmail_view.xml
@@ -61,9 +61,9 @@
-
+
-
+
diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml
index 5ccbaefa3f5..483f6f870dd 100644
--- a/addons/hr/hr_installer.xml
+++ b/addons/hr/hr_installer.xml
@@ -4,56 +4,50 @@
hr.installer.view
- hr.installer
+ base.setup.installerform
-
+
-
- Human Resources Application Configuration
-
-
- Configure Your Human Resources Application
-
-
-
-
-
- You can enhance the base HR Application by installing few HR-related functionalities.
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
- Configure
-
+
+
+
+
+
+
+
+
+
-
-
- Human Resources Application Configuration
- ir.actions.act_window
- hr.installer
-
- form
- form
- new
+
+
+ HR Management
+ 5
-
-
- 3
- always
+
+
+ Create your employees
+ ir.actions.act_window
+ hr.employee
+ form
+ form
+
+
+
+
+ normal
+ current
+ skip
+
+
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index c70209d6d12..deabaff540d 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -63,7 +63,7 @@
-
+
diff --git a/addons/hr/installer.py b/addons/hr/installer.py
index cdeb2ca77a3..93f920f3cb8 100644
--- a/addons/hr/installer.py
+++ b/addons/hr/installer.py
@@ -21,8 +21,7 @@
from osv import fields, osv
class hr_installer(osv.osv_memory):
- _name = 'hr.installer'
- _inherit = 'res.config.installer'
+ _inherit = 'base.setup.installer'
_columns = {
# Human Resources Management
'hr_holidays': fields.boolean('Holidays / Leaves Management',
diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py
index 1a611768d7e..607f41aa111 100644
--- a/addons/hr_evaluation/__openerp__.py
+++ b/addons/hr_evaluation/__openerp__.py
@@ -47,7 +47,8 @@ in the form of pdf file. Implements a dashboard for My Current Evaluations
"wizard/hr_evaluation_mail_view.xml",
"hr_evaluation_view.xml",
"report/hr_evaluation_report_view.xml",
- "board_hr_evaluation_view.xml"
+ "board_hr_evaluation_view.xml",
+ 'hr_evaluation_installer_view.xml'
],
"test": ["test/test_hr_evaluation.yml"],
"active": False,
diff --git a/addons/hr_evaluation/hr_evaluation_installer_view.xml b/addons/hr_evaluation/hr_evaluation_installer_view.xml
new file mode 100644
index 00000000000..7eba2b40876
--- /dev/null
+++ b/addons/hr_evaluation/hr_evaluation_installer_view.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ Define Your Department Structure
+ ir.actions.act_window
+ hr.department
+ form
+ tree,form
+
+ Your Company's Department Structure is used to manage all documents related to employees by departments: expenses and timesheet validation, leaves management, recruitments, etc.
+
+
+
+
+
+ 3
+ normal
+ skip
+
+
+
diff --git a/addons/hr_expense/__init__.py b/addons/hr_expense/__init__.py
index 06f78648101..55a87f95400 100644
--- a/addons/hr_expense/__init__.py
+++ b/addons/hr_expense/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -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 .
+# along with this program. If not, see .
#
##############################################################################
diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py
index 95d2b60300b..aa6dd557be8 100644
--- a/addons/hr_expense/__openerp__.py
+++ b/addons/hr_expense/__openerp__.py
@@ -46,6 +46,7 @@ re-invoice your customer's expenses if your work by project.
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',
+ 'hr_expense_data.xml',
'hr_expense_sequence.xml',
'hr_expense_workflow.xml',
'hr_expense_view.xml',
@@ -54,7 +55,8 @@ re-invoice your customer's expenses if your work by project.
'security/ir_rule.xml',
'report/hr_expense_report_view.xml',
'board_hr_expense_view.xml',
- 'board_hr_expense_manager_view.xml'
+ 'board_hr_expense_manager_view.xml',
+ 'hr_expense_installer_view.xml',
],
'demo_xml': [
'hr_expense_demo.xml',
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 0f996c79e79..1b2d97ac253 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -227,6 +227,16 @@ class product_product(osv.osv):
'hr_expense_ok': fields.boolean('Can Constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
}
+ def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
+
+ if not hr_expense_ok:
+ return {}
+ data_obj = self.pool.get('ir.model.data')
+ cat_id = data_obj._get_id(cr, uid, 'hr_expense', 'cat_expense')
+ categ_id = data_obj.browse(cr, uid, cat_id).res_id
+ res = {'value' : {'type':'service','procure_method':'make_to_stock','supply_method':'buy','purchase_ok':True,'sale_ok' :False,'categ_id':categ_id }}
+ return res
+
product_product()
class hr_expense_line(osv.osv):
diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml
new file mode 100644
index 00000000000..33a7ec7604c
--- /dev/null
+++ b/addons/hr_expense/hr_expense_data.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Expenses
+
+
+
+
\ No newline at end of file
diff --git a/addons/hr_expense/hr_expense_installer_view.xml b/addons/hr_expense/hr_expense_installer_view.xml
new file mode 100644
index 00000000000..aa0ecbd1ae1
--- /dev/null
+++ b/addons/hr_expense/hr_expense_installer_view.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ Review Your Expenses Products
+ ir.actions.act_window
+ product.product
+ form
+ tree,form
+
+
+
+
+
+
+
+ 3
+ normal
+ skip
+
+
+
diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index 5aa2fe5c38e..750404c40d9 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -189,7 +189,7 @@
form
-
+
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 18b1bacc836..62f9e7e44fb 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -322,3 +322,48 @@ class resource_calendar_leaves(osv.osv):
resource_calendar_leaves()
+
+class hr_employee(osv.osv):
+ _inherit="hr.employee"
+
+ def _set_remaining_days(self, cr, uid, empl_id, name, value, arg, context=None):
+ employee = self.browse(cr, uid, empl_id, context=context)
+ diff = value - employee.remaining_leaves
+ type_obj = self.pool.get('hr.holidays.status')
+ holiday_obj = self.pool.get('hr.holidays')
+ # Find for holidays status
+ status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
+ if len(status_ids) != 1 :
+ raise osv.except_osv(_('Warning !'),_("To use this feature, you must have only one leave type without the option 'Allow to Override Limit' set. (%s Found).") % (len(status_ids)))
+ status_id = status_ids and status_ids[0] or False
+ if not status_id:
+ return False
+ if diff > 0:
+ leave_id = holiday_obj.create(cr, uid, {'name': _('Allocation for %s') % employee.name, 'employee_id': employee.id, 'holiday_status_id': status_id, 'type': 'add', 'holiday_type': 'employee', 'number_of_days_temp': diff}, context=context)
+ elif diff < 0:
+ leave_id = holiday_obj.create(cr, uid, {'name': _('Leave Request for %s') % employee.name, 'employee_id': employee.id, 'holiday_status_id': status_id, 'type': 'remove', 'holiday_type': 'employee', 'number_of_days_temp': abs(diff)}, context=context)
+ else:
+ return False
+ holiday_obj.holidays_confirm(cr, uid, [leave_id])
+ holiday_obj.holidays_validate2(cr, uid, [leave_id])
+ return True
+
+ def _get_remaining_days(self, cr, uid, ids, name, args, context=None):
+ cr.execute("SELECT sum(h.number_of_days_temp) as days, h.employee_id from hr_holidays h join hr_holidays_status s on (s.id=h.holiday_status_id) where h.type='add' and h.state='validate' and s.limit=False group by h.employee_id")
+ res = cr.dictfetchall()
+ remaining = {}
+ for r in res:
+ remaining[r['employee_id']] = r['days']
+ for employee_id in ids:
+ if not remaining.get(employee_id):
+ remaining[employee_id] = 0.0
+ return remaining
+
+
+ _columns = {
+ 'remaining_leaves': fields.function(_get_remaining_days, method=True, string='Remaining Legal Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave requests.', store=True),
+ }
+
+hr_employee()
+
+
diff --git a/addons/hr_holidays/hr_holidays_data.xml b/addons/hr_holidays/hr_holidays_data.xml
index 825f8b672d2..2c0debb3552 100644
--- a/addons/hr_holidays/hr_holidays_data.xml
+++ b/addons/hr_holidays/hr_holidays_data.xml
@@ -5,7 +5,6 @@
Legal Leaves
- Falseblack
@@ -20,7 +19,7 @@
Compensatory Days
- False
+ Truebrown
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 608fda554fb..cf725735641 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -458,6 +458,50 @@
src_model="hr.employee"
view_id ="view_holiday"
id="act_hr_employee_holiday_request"/>
+
+
+
+
+ hr.employee.leave.tree
+ hr.employee
+ tree
+
+
+
+
+
+
+
+
+
+ Assign Legal Leaves to Employees
+ ir.actions.act_window
+ hr.employee
+ form
+ tree,form
+
+
+
+
+
+
+ normal
+ skip
+
+
+
+
+
+ hr.employee.leave.form.inherit
+ hr.employee
+ form
+
+
+
+
+
+
+
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index c7f97cf3075..18c5b034624 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -47,6 +47,7 @@ system to store and search in your CV base.
'security/ir.model.access.csv',
'report/hr_recruitment_report_view.xml',
'board_hr_recruitment_statistical_view.xml',
+ 'hr_recruitment_installer_view.xml'
],
'init_xml': [
'hr_recruitment_data.xml'
diff --git a/addons/hr_recruitment/hr_recruitment_installer_view.xml b/addons/hr_recruitment/hr_recruitment_installer_view.xml
new file mode 100644
index 00000000000..d1614117826
--- /dev/null
+++ b/addons/hr_recruitment/hr_recruitment_installer_view.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ Review Recruitment Stages
+ ir.actions.act_window
+ hr.recruitment.stage
+ form
+ tree,form
+ Check if the following stages are matching your recruitment process. Don't forget to specify the department if your recruitment process is different according to the job position.
+
+
+
+
+
+
+ 3
+ normal
+ skip
+
+
+
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml
index 2d11116bf32..28c69394e96 100644
--- a/addons/hr_recruitment/hr_recruitment_view.xml
+++ b/addons/hr_recruitment/hr_recruitment_view.xml
@@ -346,6 +346,7 @@
hr.recruitment.stageform
+ Check if the following stages are matching your recruitment process. Don't forget to specify the department if your recruitment process is different according to the job position.