From 910e8a2adcd3121045d6d389608ad51a9e8f974d Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Sat, 31 Mar 2012 14:08:35 +0530 Subject: [PATCH 01/13] [FIX] project_gtd : Fixes the unicode problem on my tasks fields_view_get lp bug: https://launchpad.net/bugs/944761 fixed bzr revid: amp@tinyerp.com-20120331083835-ad1l6e4stzy2ia77 --- addons/project_gtd/project_gtd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index bec70779551..fb8bb459c55 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -115,7 +115,7 @@ class project_task(osv.osv): search_extended += '''\n''' search_extended +='''''' - res['arch'] = res['arch'].replace('', search_extended) + res['arch'] = unicode(res['arch'], 'utf-8').replace('', search_extended) return res From f038f70eea4b17b9dcb22c359b6a419638c858e9 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Tue, 3 Apr 2012 18:33:36 +0530 Subject: [PATCH 02/13] [FIX] project_timesheet : Fixes the keyerror of journal_id when edit worklog entry on task lp bug: https://launchpad.net/bugs/953006 fixed bzr revid: amp@tinyerp.com-20120403130336-iprq12cr21q7ykji --- addons/project_timesheet/project_timesheet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index db7066505e1..eff4ea8778a 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -142,10 +142,6 @@ class project_work(osv.osv): vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/') if 'user_id' in vals: vals_line['user_id'] = vals['user_id'] - result = self.get_user_related_details(cr, uid, vals['user_id']) - for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'): - if result.get(fld, False): - vals_line[fld] = result[fld] if 'date' in vals: vals_line['date'] = vals['date'][:10] @@ -153,6 +149,10 @@ class project_work(osv.osv): default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id vals_line['unit_amount'] = vals['hours'] prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set + result = self.get_user_related_details(cr, uid, vals.get('user_id', uid)) + for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'): + if result.get(fld, False): + vals_line[fld] = result[fld] if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom): vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id']) From 426bdbd5b3c669d473be99427f5a82bc29f7cecc Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Sat, 7 Apr 2012 16:36:34 +0530 Subject: [PATCH 03/13] [FIX] crm_helpdesk : Fixes the problem of creating category via helpdesk due to the context lp bug: https://launchpad.net/bugs/972462 fixed bzr revid: amp@tinyerp.com-20120407110634-zvhzw19vzyq9g6uh --- addons/crm_helpdesk/crm_helpdesk_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 5f2fee07ff1..01088d66f2e 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -58,7 +58,7 @@ - + From a498392b47978af00966ad01f8ff7a2450fb8a69 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Tue, 17 Apr 2012 15:01:56 +0530 Subject: [PATCH 04/13] [FIX]share: convert to string and set group_id bzr revid: kjo@tinyerp.com-20120417093156-d29vpph8it39sqiw --- addons/portal/wizard/share_wizard.py | 2 +- addons/share/wizard/share_wizard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/portal/wizard/share_wizard.py b/addons/portal/wizard/share_wizard.py index b5c9d165cc6..5b21f42241c 100644 --- a/addons/portal/wizard/share_wizard.py +++ b/addons/portal/wizard/share_wizard.py @@ -140,7 +140,7 @@ class share_wizard_portal(osv.osv_memory): # must take care of existing users, by adding them to the new group, which is group_ids[0], # and adding the shortcut selected_user_ids = [x.id for x in wizard_data.user_ids] - self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4,group_id)]}) + self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4,group_id[0])]}) self._setup_action_and_shortcut(cr, uid, wizard_data, selected_user_ids, make_home=False, context=context) # populate the result lines for existing users too for user in wizard_data.user_ids: diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 854f021bf67..1efe850f860 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -737,7 +737,7 @@ class share_wizard(osv.osv_memory): # B. main_domain = wizard_data.domain if wizard_data.domain != '[]' else DOMAIN_ALL self._create_or_combine_sharing_rule(cr, current_user, wizard_data, - group_id, model_id=model.id, domain=main_domain, + group_id, model_id=model.id, domain=str(main_domain), restrict=True, context=context) # C. self._create_indirect_sharing_rules(cr, current_user, wizard_data, group_id, obj1, context=context) From a3d768a3cd6b81d03a6faba7d6dd77c69081c487 Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Tue, 24 Apr 2012 18:29:52 +0530 Subject: [PATCH 05/13] [FIX] Correction on above fix bzr revid: amp@tinyerp.com-20120424125952-60z1bclva62j8qxt --- addons/project_timesheet/project_timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index eff4ea8778a..2cec9b90a40 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -149,7 +149,7 @@ class project_work(osv.osv): default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id vals_line['unit_amount'] = vals['hours'] prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set - result = self.get_user_related_details(cr, uid, vals.get('user_id', uid)) + result = self.get_user_related_details(cr, uid, vals.get('user_id', task.user_id.id)) for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'): if result.get(fld, False): vals_line[fld] = result[fld] From 2157901b067831ec5cfd078f28570f7c06f7ffcd Mon Sep 17 00:00:00 2001 From: "Amit (OpenERP)" Date: Wed, 2 May 2012 19:05:21 +0530 Subject: [PATCH 06/13] [IMP] project_gtd : Used the tools.ustr() instead of unicode utf-8 bzr revid: amp@tinyerp.com-20120502133521-ohn7xh1vl7xlbewm --- addons/project_gtd/project_gtd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index fb8bb459c55..5eb19ca1831 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -115,7 +115,7 @@ class project_task(osv.osv): search_extended += '''\n''' search_extended +='''''' - res['arch'] = unicode(res['arch'], 'utf-8').replace('', search_extended) + res['arch'] = tools.ustr(res['arch']).replace('', search_extended) return res From f7055f4e7b82938a65241edce56218a3878a93e2 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 11 Jun 2012 11:06:44 +0530 Subject: [PATCH 07/13] [FIX]crm:fix the global name error of osv lp bug: https://launchpad.net/bugs/1011408 fixed bzr revid: mma@tinyerp.com-20120611053644-pen1vqxahwx4hdve --- addons/base_status/base_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index cc6dda19cdf..0c3bac20da9 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -19,7 +19,7 @@ # ############################################################################## -from osv import fields +from osv import fields, osv from tools.translate import _ class base_stage(object): From 59d4802bcc20f6818badf15be822ae2ccec2732b Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Mon, 18 Jun 2012 13:28:56 +0530 Subject: [PATCH 08/13] [FIX] Fix the meeting form view prob lp bug: https://launchpad.net/bugs/1014505 fixed bzr revid: dbr@tinyerp.com-20120618075856-7xc2sfk2wdw19hcb --- addons/crm/crm_meeting_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index 9123cf7c305..b0e7709842d 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -101,7 +101,7 @@ attrs="{'readonly': [('state', '=', 'done')]}" context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/> + nolabel="1" widget="one2many" mode="tree"> From 26a39a6d0c269921544ce4bd58914dcc7fbcd35b Mon Sep 17 00:00:00 2001 From: "Ankita Patel (OpenERP)" Date: Tue, 19 Jun 2012 17:40:16 +0530 Subject: [PATCH 09/13] [FIX]sale_crm: update context bzr revid: pat@tinyerp.com-20120619121016-quk5kem1eud7ddro --- addons/edi/models/edi.py | 3 ++- addons/sale/sale.py | 3 +++ addons/sale_crm/wizard/crm_make_sale.py | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/edi/models/edi.py b/addons/edi/models/edi.py index 589922ff178..54963fe6f0f 100644 --- a/addons/edi/models/edi.py +++ b/addons/edi/models/edi.py @@ -520,7 +520,8 @@ class EDIMixin(object): 'datas': result, 'datas_fname': file_name, 'res_model': self._name, - 'res_id': record.id}, + 'res_id': record.id, + 'type': 'binary'}, context=context) def _edi_import_attachments(self, cr, uid, record_id, edi_document, context=None): diff --git a/addons/sale/sale.py b/addons/sale/sale.py index dbdfcbc4fbd..c3b787ff85b 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -763,14 +763,17 @@ class sale_order(osv.osv): ''' This function opens a window to compose an email, with the edi sale template message loaded by default ''' + print "\n =--===== context -==>", context assert len(ids) == 1, 'This option should only be used for a single id at a time' mod_obj = self.pool.get('ir.model.data') template = mod_obj.get_object_reference(cr, uid, 'sale', 'email_template_edi_sale') + print "\n\ntemplate.......", template, "\n" template_id = template and template[1] or False res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form') res_id = res and res[1] or False ctx = dict(context, active_model='sale.order', active_id=ids[0]) ctx.update({'mail.compose.template_id': template_id}) + print "\n =--===== cont -==>", ctx return { 'view_type': 'form', 'view_mode': 'form', diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py index 9484b87652e..823d8d6ab07 100644 --- a/addons/sale_crm/wizard/crm_make_sale.py +++ b/addons/sale_crm/wizard/crm_make_sale.py @@ -107,7 +107,6 @@ class crm_make_sale(osv.osv_memory): new_ids.append(new_id) message = _("Opportunity has been converted to the quotation %s.") % (sale_order.name) case.message_append_note(body=message) - if make.close: case_obj.case_close(cr, uid, data) if not new_ids: From e2f3a725ae47efcf247737d384719ff3668c687a Mon Sep 17 00:00:00 2001 From: "Ankita Patel (OpenERP)" Date: Tue, 19 Jun 2012 18:48:34 +0530 Subject: [PATCH 10/13] [FIX]sale_crm: remove print statement bzr revid: pat@tinyerp.com-20120619131834-iluwzicq2q1x765h --- addons/sale/sale.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index c3b787ff85b..dbdfcbc4fbd 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -763,17 +763,14 @@ class sale_order(osv.osv): ''' This function opens a window to compose an email, with the edi sale template message loaded by default ''' - print "\n =--===== context -==>", context assert len(ids) == 1, 'This option should only be used for a single id at a time' mod_obj = self.pool.get('ir.model.data') template = mod_obj.get_object_reference(cr, uid, 'sale', 'email_template_edi_sale') - print "\n\ntemplate.......", template, "\n" template_id = template and template[1] or False res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form') res_id = res and res[1] or False ctx = dict(context, active_model='sale.order', active_id=ids[0]) ctx.update({'mail.compose.template_id': template_id}) - print "\n =--===== cont -==>", ctx return { 'view_type': 'form', 'view_mode': 'form', From c79893908fb37eb84ada4deecb01cff3e39937e7 Mon Sep 17 00:00:00 2001 From: "Kuldeep Joshi (OpenERP)" Date: Thu, 21 Jun 2012 15:01:52 +0530 Subject: [PATCH 11/13] [FIX]crm : remove domain bzr revid: kjo@tinyerp.com-20120621093152-4rq7de01sykcahf1 --- addons/crm/crm_meeting_menu.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/crm/crm_meeting_menu.xml b/addons/crm/crm_meeting_menu.xml index 5f94e3d738f..156aab613a0 100644 --- a/addons/crm/crm_meeting_menu.xml +++ b/addons/crm/crm_meeting_menu.xml @@ -7,15 +7,8 @@ res_model="crm.meeting" view_mode="calendar,tree,form,gantt" context="{'search_default_partner_id': active_id, 'default_duration': 4.0}" - domain="[('partner_id', '=', active_id)]" /> - - Schedule a Meeting - {'default_partner_id': active_id} - - - calendar From ae49c4422af83785be0b7339c49f5b4b7db96bcb Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 21 Jun 2012 16:15:05 +0530 Subject: [PATCH 12/13] [FIX]base:fix the issue Events form view not open lp bug: https://launchpad.net/bugs/1015971 fixed bzr revid: mma@tinyerp.com-20120621104505-27bts5p3qgi52sn9 --- addons/base_calendar/base_calendar_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index d33f453c662..76a69c06759 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -270,7 +270,7 @@ icon="terp-partner" type="action" context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/> + nolabel="1" widget="one2many" mode="tree"> From 9ab592088ceabae9c08ba0c072a7e9d3964d907b Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 21 Jun 2012 18:27:40 +0530 Subject: [PATCH 13/13] [FIX]survey:fix the issue survey form view not open lp bug: https://launchpad.net/bugs/1016031 fixed bzr revid: mma@tinyerp.com-20120621125740-rt1tm5bwpr52k9up --- addons/survey/survey_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index 1e8fd5c9e2c..c27af78f1e9 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -40,7 +40,7 @@ - +