From ada7a18cefe285500fde3a0a9cda9d7f1ca123e5 Mon Sep 17 00:00:00 2001 From: "RGA(Open ERP)" <> Date: Thu, 3 Jun 2010 14:21:24 +0530 Subject: [PATCH 01/12] [IMP,FIX] Sales Configuration menu Improved bzr revid: vir@tinyerp.com-20100603085124-4az0nn4t3pq12ayd --- addons/crm/crm_lead_view.xml | 17 ++++++----- addons/crm/crm_meeting_view.xml | 4 +-- addons/crm/crm_opportunity_view.xml | 14 ++++----- addons/crm/crm_phonecall_view.xml | 11 ++++--- addons/crm/crm_view.xml | 35 ++++++++++++++--------- addons/mail_gateway/mail_gateway_view.xml | 8 ++---- 6 files changed, 48 insertions(+), 41 deletions(-) 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/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 @@ + - Date: Thu, 3 Jun 2010 14:57:55 +0530 Subject: [PATCH 02/12] [IMP] stock_*, survey : New icons are added for views bzr revid: vir@tinyerp.com-20100603092755-f9lah87tbak53yq0 --- .../stock/report/report_stock_move_view.xml | 34 ++--- .../report/report_stock_picking_view.xml | 30 ++-- addons/stock/report/report_stock_view.xml | 16 +-- addons/stock/stock_view.xml | 128 +++++++++--------- addons/stock_planning/stock_planning_view.xml | 2 +- addons/survey/survey_view.xml | 10 +- 6 files changed, 110 insertions(+), 110 deletions(-) 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..e9e5fa8b5e3 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 @@ - - - - + + + + - - + + - + - - + + @@ -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 @@ - - + + - + From d497f5c6e979971f6221480b3578714f0b07ee72 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Wed, 2 Jun 2010 15:06:25 +0200 Subject: [PATCH 03/12] [FIX] Define the local variable 'res' bzr revid: stephane@openerp.com-20100602130625-0xl1sqo57h6f0kue --- addons/account/account.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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), From feb6c1ed59ada372c46aff35c60b0a829028abc5 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 3 Jun 2010 11:49:51 +0200 Subject: [PATCH 04/12] [FIX] Typo bzr revid: stephane@openerp.com-20100603094951-vx4fxk1qsldkep4l --- addons/stock/stock_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index e9e5fa8b5e3..d821ab39d51 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1451,7 +1451,7 @@ - + From 235193bc757e12f891b1bb63130f29c14381d91a Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 3 Jun 2010 11:50:41 +0200 Subject: [PATCH 05/12] [FIX] Remove the duplicated xml_id bzr revid: stephane@openerp.com-20100603095041-i1588xri2lefsi75 --- addons/purchase/report/purchase_report_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index 00c1c62f0ff..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 From 859b9b84c56f5d197c8f01046ae844758cd5ff6a Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 3 Jun 2010 11:51:06 +0200 Subject: [PATCH 06/12] [REF] Refactor the code of the wizard 'Sign In / Sign Out' [FIX] Remove the unless exception handling bzr revid: stephane@openerp.com-20100603095106-4v2uvxg3g6eakp82 --- .../wizard/hr_timesheet_sign_in_out.py | 43 ++++++------------- 1 file changed, 14 insertions(+), 29 deletions(-) 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: From 8ce1789a575992f1cc7eab99ee1f1d6a9839d4c3 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 3 Jun 2010 17:10:23 +0530 Subject: [PATCH 07/12] [FIX]: crm: context problem of onchange in forward to partner wizard bzr revid: rpa@tinyerp.com-20100603114023-2uwwm7sopkw6ccle --- addons/crm/wizard/crm_forward_to_partner.py | 4 ++-- addons/crm/wizard/crm_forward_to_partner_view.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py index 156ab3311f4..945066506d7 100644 --- a/addons/crm/wizard/crm_forward_to_partner.py +++ b/addons/crm/wizard/crm_forward_to_partner.py @@ -107,8 +107,8 @@ class crm_lead_forward_to_partner(osv.osv_memory): #TODO: ids and context are not comming res = False msg_val = '' - res_id = False # Comes from context - model = None # Comes from context + res_id = context.get('active_id') + model = context.get('active_model') model_pool = self.pool.get(model) if not res_id or not model: return res diff --git a/addons/crm/wizard/crm_forward_to_partner_view.xml b/addons/crm/wizard/crm_forward_to_partner_view.xml index 1e8c6fc8583..b6295cfa3a9 100644 --- a/addons/crm/wizard/crm_forward_to_partner_view.xml +++ b/addons/crm/wizard/crm_forward_to_partner_view.xml @@ -9,7 +9,7 @@
- + From 4ab90ab79f47656eb7bffeb1a4482da96e6706a2 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Thu, 3 Jun 2010 19:14:00 +0530 Subject: [PATCH 08/12] [IMP] hr,hr_attendance,hr_contract,hr_evaluation,idea,marketing_campaign,membership icon are modified to new icons, membership search view improved bzr revid: vir@tinyerp.com-20100603134400-1zua9zqi6y6ty8ys --- addons/hr/hr_view.xml | 20 ++-- addons/hr_attendance/hr_attendance_view.xml | 10 +- addons/hr_contract/hr_contract_view.xml | 4 +- addons/hr_evaluation/hr_evaluation_view.xml | 28 +++--- .../report/hr_evaluation_report_view.xml | 30 +++--- addons/idea/idea_view.xml | 40 ++++---- .../marketing_campaign_view.xml | 92 +++++++++---------- .../report/campaign_analysis_view.xml | 26 +++--- addons/membership/membership_view.xml | 13 +-- 9 files changed, 130 insertions(+), 133 deletions(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 36524395355..75da20cef20 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -106,7 +106,7 @@ search - @@ -114,12 +114,12 @@ - - - + + + - - + + @@ -358,15 +358,15 @@ search - - - @@ -374,7 +374,7 @@ - diff --git a/addons/hr_attendance/hr_attendance_view.xml b/addons/hr_attendance/hr_attendance_view.xml index 8b9a68575b0..e3db974ebb5 100644 --- a/addons/hr_attendance/hr_attendance_view.xml +++ b/addons/hr_attendance/hr_attendance_view.xml @@ -48,16 +48,16 @@ search - - + + - - - + + + diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml index e4e8259bda4..84cc82ebe8b 100644 --- a/addons/hr_contract/hr_contract_view.xml +++ b/addons/hr_contract/hr_contract_view.xml @@ -146,8 +146,8 @@ - - + + diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index d02c76bc44c..a3e4cac2a5f 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -13,8 +13,8 @@ - - + + @@ -243,15 +243,15 @@ - - - + + + - - @@ -261,12 +261,12 @@ - - - - + + + + - + @@ -344,10 +344,10 @@ - + - + diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml index 6ccd1e80ab9..5406a7a3fbd 100644 --- a/addons/hr_evaluation/report/hr_evaluation_report_view.xml +++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml @@ -42,32 +42,32 @@ - - - - @@ -75,16 +75,16 @@ - - - + + + - - + + - - - + + + diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index 8aa0802fcda..90ee35d21e2 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -61,15 +61,15 @@ - + - - + action="action_idea_select"/> @@ -139,7 +139,7 @@
- + @@ -153,10 +153,10 @@
- - - - + + + +
@@ -218,20 +218,20 @@ - - + +