diff --git a/addons/account_analytic_plans/__init__.py b/addons/account_analytic_plans/__init__.py
index 6f0609db41d..a5c371fa6ec 100644
--- a/addons/account_analytic_plans/__init__.py
+++ b/addons/account_analytic_plans/__init__.py
@@ -18,7 +18,6 @@
# 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 1404f8e9a92..1240a336500 100644
--- a/addons/account_analytic_plans/__openerp__.py
+++ b/addons/account_analytic_plans/__openerp__.py
@@ -70,7 +70,7 @@ of distribution models.
'account_analytic_plans_report.xml',
'wizard/analytic_plan_create_model_view.xml',
'wizard/account_crossovered_analytic_view.xml',
- 'installer_view.xml'
+ 'account_analytic_plans_installer_view.xml'
],
'demo_xml' : [],
'test' : ['test/acount_analytic_plans_report.yml'],
diff --git a/addons/account_analytic_plans/installer_view.xml b/addons/account_analytic_plans/account_analytic_plans_installer_view.xml
similarity index 94%
rename from addons/account_analytic_plans/installer_view.xml
rename to addons/account_analytic_plans/account_analytic_plans_installer_view.xml
index f394732a8c1..4bc6c555611 100644
--- a/addons/account_analytic_plans/installer_view.xml
+++ b/addons/account_analytic_plans/account_analytic_plans_installer_view.xml
@@ -12,7 +12,7 @@
- 3
+ 15
always
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
index bd0914208e9..0f7ff03f6f3 100644
--- a/addons/crm/crm_installer_view.xml
+++ b/addons/crm/crm_installer_view.xml
@@ -76,7 +76,7 @@
- 3
+ 10
always
@@ -91,7 +91,7 @@
- 3
+ 10
always
diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py
index 49215ed12d0..24f6898f163 100644
--- a/addons/fetchmail/__openerp__.py
+++ b/addons/fetchmail/__openerp__.py
@@ -42,7 +42,7 @@ Fetch email from POP / IMAP servers.
"fetchmail_view.xml",
"fetchmail_data.xml",
'security/ir.model.access.csv',
- 'installer_view.xml'
+ 'fetchmail_installer_view.xml'
],
'demo_xml': [
diff --git a/addons/fetchmail/installer_view.xml b/addons/fetchmail/fetchmail_installer_view.xml
similarity index 100%
rename from addons/fetchmail/installer_view.xml
rename to addons/fetchmail/fetchmail_installer_view.xml
diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py
index 11f6b236582..607f41aa111 100644
--- a/addons/hr_evaluation/__openerp__.py
+++ b/addons/hr_evaluation/__openerp__.py
@@ -48,7 +48,7 @@ in the form of pdf file. Implements a dashboard for My Current Evaluations
"hr_evaluation_view.xml",
"report/hr_evaluation_report_view.xml",
"board_hr_evaluation_view.xml",
- 'installer_view.xml'
+ 'hr_evaluation_installer_view.xml'
],
"test": ["test/test_hr_evaluation.yml"],
"active": False,
diff --git a/addons/hr_evaluation/installer_view.xml b/addons/hr_evaluation/hr_evaluation_installer_view.xml
similarity index 100%
rename from addons/hr_evaluation/installer_view.xml
rename to addons/hr_evaluation/hr_evaluation_installer_view.xml
diff --git a/addons/hr_expense/__openerp__.py b/addons/hr_expense/__openerp__.py
index a648bea92bc..613198c3200 100644
--- a/addons/hr_expense/__openerp__.py
+++ b/addons/hr_expense/__openerp__.py
@@ -55,7 +55,7 @@ re-invoice your customer's expenses if your work by project.
'report/hr_expense_report_view.xml',
'board_hr_expense_view.xml',
'board_hr_expense_manager_view.xml',
- 'installer_view.xml',
+ 'hr_expense_installer_view.xml',
'hr_expense_data.xml'
],
'demo_xml': [
diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py
index 995b5950019..f78b3da8114 100644
--- a/addons/hr_expense/hr_expense.py
+++ b/addons/hr_expense/hr_expense.py
@@ -230,9 +230,13 @@ class product_product(osv.osv):
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
+
if not hr_expense_ok:
return {}
- res = {'value' : {'type':'service','procure_method':'make_to_stock','supply_method':'buy','purchase_ok':True,'sale_ok' :False,'categ_id':19 }}
+ 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()
diff --git a/addons/hr_expense/installer_view.xml b/addons/hr_expense/hr_expense_installer_view.xml
similarity index 100%
rename from addons/hr_expense/installer_view.xml
rename to addons/hr_expense/hr_expense_installer_view.xml
diff --git a/addons/hr_recruitment/__openerp__.py b/addons/hr_recruitment/__openerp__.py
index 158d51fc491..18c5b034624 100644
--- a/addons/hr_recruitment/__openerp__.py
+++ b/addons/hr_recruitment/__openerp__.py
@@ -47,7 +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',
- 'installer_view.xml'
+ 'hr_recruitment_installer_view.xml'
],
'init_xml': [
'hr_recruitment_data.xml'
diff --git a/addons/hr_recruitment/installer_view.xml b/addons/hr_recruitment/hr_recruitment_installer_view.xml
similarity index 100%
rename from addons/hr_recruitment/installer_view.xml
rename to addons/hr_recruitment/hr_recruitment_installer_view.xml
diff --git a/addons/hr_timesheet_invoice/__openerp__.py b/addons/hr_timesheet_invoice/__openerp__.py
index 79fcd3ca9a6..5d5e41ecbb0 100644
--- a/addons/hr_timesheet_invoice/__openerp__.py
+++ b/addons/hr_timesheet_invoice/__openerp__.py
@@ -47,7 +47,7 @@ reports, etc.""",
'wizard/hr_timesheet_invoice_create_view.xml',
'wizard/hr_timesheet_invoice_create_final_view.xml',
'board_hr_timesheet_invoice.xml',
- 'installer_view.xml'
+ 'hr_timesheet_invoice_installer_view.xml'
],
'demo': [
'hr_timesheet_invoice_demo.xml',
diff --git a/addons/hr_timesheet_invoice/installer_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml
similarity index 93%
rename from addons/hr_timesheet_invoice/installer_view.xml
rename to addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml
index ef63c30779e..274c215fd37 100644
--- a/addons/hr_timesheet_invoice/installer_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_installer_view.xml
@@ -22,7 +22,7 @@
-
+
@@ -40,7 +40,7 @@
3
- always
+ never
diff --git a/addons/hr_timesheet_invoice/installer.py b/addons/hr_timesheet_invoice/installer.py
index fb2fa5ea8eb..52b5ba5a301 100644
--- a/addons/hr_timesheet_invoice/installer.py
+++ b/addons/hr_timesheet_invoice/installer.py
@@ -56,24 +56,23 @@ class hr_timesheet_invoice_wizard(osv.osv_memory):
context = {}
res = super(hr_timesheet_invoice_wizard, self).default_get(cr, uid, fields, context=context)
emp_obj = self.pool.get('hr.employee')
- emp_id = emp_obj.search(cr, uid, ['|',('user_id', '=', uid),('product_id','=',False),('journal_id','=','')], context=context)
+ emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
result = []
data = {}
for emp in emp_obj.browse(cr, uid, emp_id, context=context):
- data = {'employee_id':emp.id,'product_id':emp.product_id.id,'journal_id':emp.journal_id.id}
+ data = {'employee_id':emp.id, 'product_id':emp.product_id.id, 'journal_id':emp.journal_id.id}
result.append(data)
if 'emp_ids' in fields:
res.update({'emp_ids': result})
return res
- def employee_data(self, cr, uid, ids, context=None):
+ def set_employee_data(self, cr, uid, ids, context=None):
if context is None:
context = {}
hr_obj = self.pool.get('hr.employee')
for emp in self.browse(cr, uid, ids, context=context):
for emp_data in emp.emp_ids:
- emp_id = hr_obj.search(cr, uid, [('id', '=', emp_data.employee_id.id)], context=context)
- hr_obj.write(cr, uid, emp_id, {'name': emp_data.employee_id.name,'product_id':emp_data.product_id.id or False, 'journal_id':emp_data.journal_id.id or ''})
+ hr_obj.write(cr, uid, emp_data.employee_id.id, {'name': emp_data.employee_id.name, 'product_id':emp_data.product_id.id or False, 'journal_id':emp_data.journal_id.id or ''})
return {'type': 'ir.actions.act_window_close'}
hr_timesheet_invoice_wizard()
diff --git a/addons/lunch/__openerp__.py b/addons/lunch/__openerp__.py
index ba980ad71e2..2384ebb26d1 100644
--- a/addons/lunch/__openerp__.py
+++ b/addons/lunch/__openerp__.py
@@ -49,7 +49,7 @@
'lunch_view.xml',
'lunch_report.xml',
'report/report_lunch_order_view.xml',
- 'installer_view.xml'
+ 'lunch_installer_view.xml'
],
"demo_xml": ['lunch_demo.xml'],
"test": ['test/test_lunch.yml', 'test/lunch_report.yml'],
diff --git a/addons/lunch/installer_view.xml b/addons/lunch/lunch_installer_view.xml
similarity index 94%
rename from addons/lunch/installer_view.xml
rename to addons/lunch/lunch_installer_view.xml
index 8cd51a47ea6..bb5a7381b7a 100644
--- a/addons/lunch/installer_view.xml
+++ b/addons/lunch/lunch_installer_view.xml
@@ -12,7 +12,7 @@
- 3
+ 50
always