diff --git a/addons/account/account.py b/addons/account/account.py
index 04a0bb5da68..61319f7f973 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1965,13 +1965,12 @@ class account_add_tmpl_wizard(osv.osv_memory):
if not tids or not tids[0]['parent_id']:
return False
ptids = tmpl_obj.read(cr, uid, [tids[0]['parent_id'][0]],['code'])
+ res = None
if not ptids or not ptids[0]['code']:
raise osv.except_osv(_('Error !'), _('Cannot locate parent code for template account!'))
res = acc_obj.search(cr,uid,[('code','=',ptids[0]['code'])])
- if res:
- return res[0]
- else:
- return False
+
+ return res and res[0] or False
_columns = {
'cparent_id':fields.many2one('account.account', 'Parent target', help="Creates an account with the selected template under this existing parent.", required=True),
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 31872e27ef4..dbfbeedf0a8 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -12,9 +12,11 @@
[('object_id.model', '=', 'crm.lead')]
{'object_id':'crm.lead'}
-
+
+
+
@@ -26,10 +28,11 @@
[('object_id.model', '=', 'crm.lead')]
{'object_id':'crm.lead'}
-
+
+
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index e84bbb673ee..e2decc30340 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -13,8 +13,8 @@
{'object_id':'crm.meeting'}
-
+
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 8b5cc42c502..407c3c53cf4 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -14,8 +14,8 @@
+ id="menu_crm_case_opportunity-act" name="Categories"
+ parent="menu_crm_config_opportunity" />
@@ -29,8 +29,8 @@
+ id="menu_crm_opportunity_stage_act" name="Stages"
+ parent="menu_crm_config_opportunity" />
@@ -44,8 +44,8 @@
+ id="menu_crm_opportunity_resource_act" name="Resource"
+ parent="menu_crm_config_opportunity" />
@@ -329,7 +329,7 @@
-
+
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index 65b77ed5abe..c5813a38b09 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -13,8 +13,8 @@
{'object_id':'crm.phonecall'}
-
+
@@ -27,10 +27,9 @@
{'object_id':'crm.phonecall'}
-
-
+
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 52450419fd2..f854981858c 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -1,8 +1,20 @@
-
+
+
+
+
+
+
+
+
+
@@ -117,9 +129,7 @@
-
-
-
+
crm.case.categ.form
@@ -156,11 +166,11 @@
form
-
+ id="menu_crm_case_section_act" sequence="4"
+ parent="base.menu_crm_config_sales" />
+
@@ -201,8 +211,6 @@
form
-
Cases by section
@@ -342,10 +350,11 @@
form
tree,form
-
+ groups="base.group_extended" sequence="5"
+ parent="base.menu_crm_config_sales" />
view.users.form.crm.modif.inherited1
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
index fa57cfdd1a5..dc1a6723786 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
+++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
@@ -115,31 +115,19 @@ class hr_si_project(osv.osv_memory):
# get the latest action (sign_in or out) for this employee
cr.execute('select action from hr_attendance where employee_id=%s and action in (\'sign_in\',\'sign_out\') order by name desc limit 1', (emp_id,))
res = (cr.fetchone() or ('sign_out',))[0]
+ in_out = res == 'sign_out' and 'out' or 'in'
#TODO: invert sign_in et sign_out
- if res == 'sign_out':
- model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_hr_timesheet_sign_in')])
- resource_id = obj_model.read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
- return {
- 'name': 'Sign in / Sign out',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'hr.sign.in.project',
- 'views': [(False,'tree'), (resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new'
- }
- else:
- model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_hr_timesheet_sign_out')])
- resource_id = obj_model.read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
- return {
- 'name': 'Sign in / Sign out',
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'hr.sign.out.project',
- 'views': [(False,'tree'), (resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new'
- }
+ model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_hr_timesheet_sign_%s' % in_out)])
+ resource_id = obj_model.read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
+ return {
+ 'name': 'Sign in / Sign out',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'hr.sign.%s.project' % in_out,
+ 'views': [(False,'tree'), (resource_id,'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new'
+ }
def _get_empid(self, cr, uid, context=None):
emp_obj = self.pool.get('hr.employee')
@@ -153,10 +141,7 @@ class hr_si_project(osv.osv_memory):
emp_obj = self.pool.get('hr.employee')
data = self.read(cr, uid, ids, [], context)[0]
emp_id = data['emp_id']
- try:
- success = emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data['date'] or False)
- except except_osv, e:
- raise osv.except_osv(e.name, e.value)
+ success = emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data['date'] or False)
return {}
def default_get(self, cr, uid, fields_list, context=None):
@@ -166,4 +151,4 @@ class hr_si_project(osv.osv_memory):
hr_si_project()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail_gateway/mail_gateway_view.xml b/addons/mail_gateway/mail_gateway_view.xml
index 611416055f7..e5b7b426fe9 100644
--- a/addons/mail_gateway/mail_gateway_view.xml
+++ b/addons/mail_gateway/mail_gateway_view.xml
@@ -165,13 +165,9 @@
+
-
-
-
-
-
+
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index a94ffac39d9..26488eae254 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -58,7 +58,7 @@
-
-
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 9631e3151f6..dd3ed036691 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -213,7 +213,7 @@
-
+
-
+
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 72d4feb0ae9..10c5ccd9749 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -169,7 +169,7 @@
-
+
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index 5dd8dd31900..8fb7836468d 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -1,7 +1,7 @@
-
+
product.month.graph
purchase.report
graph
@@ -88,7 +88,7 @@
-
+
diff --git a/addons/resource/resource_view.xml b/addons/resource/resource_view.xml
index 275c111225f..df0974fd9ed 100644
--- a/addons/resource/resource_view.xml
+++ b/addons/resource/resource_view.xml
@@ -55,7 +55,7 @@
-
+
diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index 673fd14e76e..a3771b4a480 100755
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -44,16 +44,16 @@
-
-
-
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index e570e2b55ea..a14298ff771 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -54,38 +54,38 @@
-
-
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/addons/stock/report/report_stock_view.xml b/addons/stock/report/report_stock_view.xml
index 27f18d4ff43..34121d0c9ed 100644
--- a/addons/stock/report/report_stock_view.xml
+++ b/addons/stock/report/report_stock_view.xml
@@ -9,17 +9,17 @@
-
-
-
+
+
+
-
-
+
+
@@ -155,12 +155,12 @@
search
-
-
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 92653501ed3..d821ab39d51 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -55,9 +55,9 @@
-
-
-
+
+
+
@@ -271,7 +271,7 @@
-
+
@@ -280,8 +280,8 @@
-
-
+
+
@@ -438,11 +438,11 @@
search
-
-
-
@@ -712,10 +712,10 @@
-
-
+
+
-
+
@@ -723,10 +723,10 @@
-
-
-
-
+
+
+
+
@@ -859,20 +859,20 @@
-
-
+
+
-
+
-
-
-
-
+
+
+
+
@@ -1041,8 +1041,8 @@
-
-
+
+
@@ -1051,11 +1051,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -1216,9 +1216,9 @@
-
+
-
+
@@ -1226,13 +1226,13 @@
-
-
+
+
-
+
-
-
+
+
@@ -1275,20 +1275,20 @@
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -1397,9 +1397,9 @@
-
+
-
+
@@ -1407,18 +1407,18 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
+
-
-
+
+
@@ -1451,7 +1451,7 @@
-
+
@@ -1526,9 +1526,9 @@
-
-
-
+
+
+
@@ -1539,12 +1539,12 @@
-
-
-
+
+
+
-
-
+
+
diff --git a/addons/stock_planning/stock_planning_view.xml b/addons/stock_planning/stock_planning_view.xml
index dfca96b0163..1bfb1d0f1aa 100644
--- a/addons/stock_planning/stock_planning_view.xml
+++ b/addons/stock_planning/stock_planning_view.xml
@@ -239,7 +239,7 @@
-
+
diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml
index f838739d0da..a604b7c7c37 100644
--- a/addons/survey/survey_view.xml
+++ b/addons/survey/survey_view.xml
@@ -255,8 +255,8 @@
-
-
+
+
@@ -1065,13 +1065,13 @@
-
-
+
+
-
+