From df107e19ec3e51827721f96557dd97927c23126d Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 3 Sep 2012 14:16:25 +0530 Subject: [PATCH 01/15] [FIX] pass context in search and name_get method inside name_search. bzr revid: tpa@tinyerp.com-20120903084625-nnkl9k2ljaauv4bh --- openerp/addons/base/res/res_users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index ca45f03258c..012ab8a116a 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -310,10 +310,10 @@ class res_users(osv.osv): context={} ids = [] if name: - ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit) + ids = self.search(cr, user, [('login','=',name)]+ args, limit=limit, context=context) if not ids: - ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit) - return self.name_get(cr, user, ids) + ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context) + return self.name_get(cr, user, ids, context=context) def copy(self, cr, uid, id, default=None, context=None): user2copy = self.read(cr, uid, [id], ['login','name'])[0] From e6178297dfea0f56c887467f0c5486c06243719f Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Tue, 18 Sep 2012 10:40:18 +0530 Subject: [PATCH 02/15] [IMP]all : set appropriate method on action for mark read as well as unread for fix the issue of read and unread bzr revid: mma@tinyerp.com-20120918051018-ghdv7tk80g5pqlq6 --- addons/base_calendar/crm_meeting_view.xml | 4 ++-- addons/crm/crm_lead_view.xml | 4 ++-- addons/crm/crm_phonecall_view.xml | 4 ++-- addons/event/event_view.xml | 8 ++++---- addons/hr_holidays/hr_holidays_view.xml | 4 ++-- addons/hr_recruitment/hr_recruitment_view.xml | 4 ++-- addons/project/project_view.xml | 8 ++++---- addons/project_issue/project_issue_view.xml | 4 ++-- addons/purchase/purchase_view.xml | 4 ++-- addons/sale/sale_view.xml | 4 ++-- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index 928f8d94d5c..50ea749bff1 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -10,7 +10,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_crm_meeting_read @@ -28,7 +28,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_crm_meeting_unread diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index f018a355579..bca64f863cf 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -9,7 +9,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_crm_lead_unread @@ -27,7 +27,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_crm_lead_read diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml index 2f885e09b61..4b6352bb86e 100644 --- a/addons/crm/crm_phonecall_view.xml +++ b/addons/crm/crm_phonecall_view.xml @@ -9,7 +9,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_crm_phonecall_unread @@ -27,7 +27,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_crm_phonecall_read diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index e2ff2e67e87..36bdbef75b2 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -65,7 +65,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_event_event_unread @@ -83,7 +83,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_event_event_read @@ -387,7 +387,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_event_registration_unread @@ -405,7 +405,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_event_registration_read diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 5a2e0603b88..92ebebc5d5c 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -8,7 +8,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_holidays_unread @@ -26,7 +26,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_holidays_read diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 098a8aec210..838bda35db7 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -42,7 +42,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_project_unread @@ -60,7 +60,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_project_read diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index ff8ac943a67..466472d7324 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -27,7 +27,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_project_unread @@ -45,7 +45,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_project_read @@ -354,7 +354,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_project_task_unread @@ -372,7 +372,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_project_task_read diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index fea22c519a8..1683256673b 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -11,7 +11,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_project_issue_unread @@ -29,7 +29,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_project_issue_read diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 53f27245e7e..e020092eb40 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -118,7 +118,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_purchase_order_unread @@ -136,7 +136,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_purchase_order_read diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 651454ef73d..0c71a1961b4 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -77,7 +77,7 @@ ir.actions.server code - self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context) action_sale_order_unread @@ -95,7 +95,7 @@ ir.actions.server code - self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context) + self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context) action_sale_order_read From fd6da42e301f8061fbc9657a2d76dc664e7ca9d0 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 3 Oct 2012 16:53:19 +0530 Subject: [PATCH 03/15] [IMP] project_timesheet : Click on timesheet button from a new project. You will get this 'Record your timesheets for the project '%s''.Instead of name of the project. bzr revid: mdi@tinyerp.com-20121003112319-ancbub1h7u5mtylk --- 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 4036217b886..87699401e09 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -50,7 +50,7 @@ class project_project(osv.osv): 'search_default_account_id': [project.analytic_account_id.id], 'default_account_id': project.analytic_account_id.id, } - help = _("""

Record your timesheets for the project '%s'.

""") + help = _("""

Record your timesheets for the project '%s'.

""") % (project.name,) try: if project.to_invoice and project.partner_id: help+= _("""

Timesheets on this project may be invoiced to %s, according to the terms defined in the contract.

""" ) % (project.partner_id.name,) From 6401dc03d76021030c9b686cb1ea2e4fd990a40a Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 3 Oct 2012 17:39:55 +0530 Subject: [PATCH 04/15] [IMP] project : 'Task Stages' tab should be visible only if 'tasks' is checked. bzr revid: mdi@tinyerp.com-20121003120955-vhxaey5fdhzkk89q --- addons/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index bd63eec84c5..442efd4660e 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -144,7 +144,7 @@ - + From c8a093941d6e8da9223def633354cd86b82df6a5 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 3 Oct 2012 17:54:46 +0530 Subject: [PATCH 05/15] [IMP] project : Added 'date_start' on project form view. bzr revid: mdi@tinyerp.com-20121003122446-e4iwfe3ctrzq2yt5 --- addons/project/project_view.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 442efd4660e..b07fb17614f 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -135,6 +135,7 @@ + From b273232b71865369f4be306e496b471423b0e299 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Thu, 4 Oct 2012 17:10:21 +0530 Subject: [PATCH 06/15] [FIX] project_timesheet : Fix the integrity error when we embeded 'Timesheet Line' created through project. bzr revid: mdi@tinyerp.com-20121004114021-rgbzhr84uditlhhj --- addons/project_timesheet/project_timesheet.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 41478d60210..6125d59c621 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -46,6 +46,9 @@ class project_project(osv.osv): def open_timesheets(self, cr, uid, ids, context=None): """ open Timesheets view """ + mod_obj = self.pool.get('ir.model.data') + act_obj = self.pool.get('ir.actions.act_window') + project = self.browse(cr, uid, ids[0], context) view_context = { 'search_default_account_id': [project.analytic_account_id.id], @@ -59,16 +62,13 @@ class project_project(osv.osv): # if the user do not have access rights on the partner pass - return { - 'type': 'ir.actions.act_window', - 'name': _('Timesheets'), - 'res_model': 'hr.analytic.timesheet', - 'view_type': 'form', - 'view_mode': 'tree,form', - 'context': view_context, - 'nodestroy': True, - 'help': help - } + result = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form') + id = result and result[1] or False + result = act_obj.read(cr, uid, [id], context=context)[0] + result['name'] = _('Timesheets') + result['context'] = view_context + result['help'] = help + return result project_project() From 2bacc70085275b15b74a2b84038e1571d6f01367 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Tue, 9 Oct 2012 16:41:24 +0530 Subject: [PATCH 07/15] [IMP] project_timesheet : Improved the code. bzr revid: mdi@tinyerp.com-20121009111124-sdii9no8mui4zopz --- addons/project_timesheet/project_timesheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 6125d59c621..c6513e75942 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -62,8 +62,8 @@ class project_project(osv.osv): # if the user do not have access rights on the partner pass - result = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form') - id = result and result[1] or False + res = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form') + id = res and res[1] or False result = act_obj.read(cr, uid, [id], context=context)[0] result['name'] = _('Timesheets') result['context'] = view_context From 564c9066fa8520c9363f7607151b285deff88519 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Mon, 15 Oct 2012 17:22:14 +0530 Subject: [PATCH 08/15] [FIX] diagram view record not reload on refresh bzr revid: rgaopenerp-20121015115214-cdw5ca6d24fgakir --- addons/web_diagram/static/src/js/diagram.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/web_diagram/static/src/js/diagram.js b/addons/web_diagram/static/src/js/diagram.js index 4bae1aed3db..9617bdbafb3 100644 --- a/addons/web_diagram/static/src/js/diagram.js +++ b/addons/web_diagram/static/src/js/diagram.js @@ -116,9 +116,20 @@ instance.web.DiagramView = instance.web.View.extend({ if(id_record) { this.id = id_record; this.get_diagram_info(); + this.do_push_state({id:record.id}); } }, + do_load_state: function(state, warm) { + if (state && !this.dataset.get_id_index(state.id)) { + this.dataset.ids.push(state.id); + } + this.dataset.select_id(state.id); + if (warm) { + this.do_show(); + } + }, + // Set-up the drawing elements of the diagram draw_diagram: function(result) { var self = this; From 96254074d75c2420eebc43bba5ca4f24ee536eb7 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Fri, 19 Oct 2012 16:23:04 +0530 Subject: [PATCH 09/15] [FIX] reconcile view: use backbone event architecture, remove .add bzr revid: rgaopenerp-20121019105304-9ddz8q763prmxdg0 --- .../static/src/js/account_move_reconciliation.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index e8bf24fb27f..100ac3b66b9 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -11,15 +11,15 @@ openerp.account = function (instance) { this._super.apply(this, arguments); var self = this; this.current_partner = null; - this.do_select.add(function() { - if (self.get_selected_ids().length === 0) { + this.on('record_selected', this, function(ids, records) { + if (ids.length === 0) { self.$(".oe_account_recon_reconcile").attr("disabled", ""); } else { self.$(".oe_account_recon_reconcile").removeAttr("disabled"); } }); }, - on_loaded: function() { + load_list: function() { var self = this; var tmp = this._super.apply(this, arguments); if (this.partners) { @@ -121,6 +121,10 @@ openerp.account = function (instance) { self.do_search(self.last_domain, self.last_context, self.last_group_by); }); }, + do_select: function (ids, records) { + this.trigger('record_selected', ids, records) + this._super.apply(this, arguments); + }, }); }; From b8ba7b389c1e477e9b2970099390e42428a82a42 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 22 Oct 2012 10:35:38 +0200 Subject: [PATCH 11/15] [IMP] Improved state in diagram bzr revid: fme@openerp.com-20121022083538-ua6fq20x5qkdwcwy --- addons/web_diagram/static/src/js/diagram.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/addons/web_diagram/static/src/js/diagram.js b/addons/web_diagram/static/src/js/diagram.js index 9617bdbafb3..2e0e5881378 100644 --- a/addons/web_diagram/static/src/js/diagram.js +++ b/addons/web_diagram/static/src/js/diagram.js @@ -113,20 +113,24 @@ instance.web.DiagramView = instance.web.View.extend({ on_diagram_loaded: function(record) { var id_record = record['id']; - if(id_record) { + if (id_record) { this.id = id_record; this.get_diagram_info(); - this.do_push_state({id:record.id}); + this.do_push_state({id: id_record}); + } else { + this.do_push_state({}); } }, do_load_state: function(state, warm) { - if (state && !this.dataset.get_id_index(state.id)) { - this.dataset.ids.push(state.id); - } - this.dataset.select_id(state.id); - if (warm) { - this.do_show(); + if (state && state.id) { + if (!this.dataset.get_id_index(state.id)) { + this.dataset.ids.push(state.id); + } + this.dataset.select_id(state.id); + if (warm) { + this.do_show(); + } } }, From d6f262da378803224902ab852364c69bb6c49529 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 22 Oct 2012 12:08:00 +0200 Subject: [PATCH 12/15] [FIX] methods renamed in web client but not fixed in addons bzr revid: xmo@openerp.com-20121022100800-yft9a5itqgb2ohhy --- addons/base_import/static/src/js/import.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_import/static/src/js/import.js b/addons/base_import/static/src/js/import.js index 043630afc48..407d38dacd7 100644 --- a/addons/base_import/static/src/js/import.js +++ b/addons/base_import/static/src/js/import.js @@ -38,7 +38,7 @@ openerp.base_import = function (instance) { // if true, the 'Import', 'Export', etc... buttons will be shown instance.web.ListView.prototype.defaults.import_enabled = true; instance.web.ListView.include({ - on_loaded: function () { + load_list: function () { var self = this; var add_button = false; if (!this.$buttons) { From 8a3a92bbfc9a432311b0d2399fa043daab1adcf9 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 22 Oct 2012 12:39:35 +0200 Subject: [PATCH 13/15] [IMP] readonly sortable o2m The making of the column invisible would happen after the header was rendered (?), and the header would not be re-rendered afterwards. So there would be a missing chunk of table. Make the cells invisible instead. It's all going to be changed looks-wise anyway so meh. bzr revid: xmo@openerp.com-20121022103935-78bm40gfotpt1ds6 --- addons/web/static/src/js/view_form.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bc171ef1d6e..c2514e4a195 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -3351,23 +3351,13 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({ controller.on('edit:before', self, function (e) { e.cancel = true; }); - var has_handle = _(controller.columns).find(function (column) { + _(controller.columns).find(function (column) { if (!column instanceof instance.web.list.Handle) { return false; } - column.modifiers.tree_invisible = true; - column.invisible = '1'; - // remove from visibles - controller.visible_columns.splice( - controller.visible_columns.indexOf(column), - 1); + column.modifiers.invisible = true; return true; }); - if (has_handle) { - // recompute aggregates - controller.aggregate_columns = - _(controller.visible_columns).invoke('to_aggregate'); - } } } else if (view_type === "form") { if (self.get("effective_readonly")) { From 0244001069c4ed96a93c3820440b61c1e0188460 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 22 Oct 2012 12:41:44 +0200 Subject: [PATCH 14/15] [FIX] fixed another bug in reconciliation javascript part bzr revid: nicolas.vanhoren@openerp.com-20121022104144-6xsiekhp2mflkgs5 --- addons/account/static/src/js/account_move_reconciliation.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/account/static/src/js/account_move_reconciliation.js b/addons/account/static/src/js/account_move_reconciliation.js index bc758179636..8e72e24eb22 100644 --- a/addons/account/static/src/js/account_move_reconciliation.js +++ b/addons/account/static/src/js/account_move_reconciliation.js @@ -102,7 +102,6 @@ openerp.account = function (instance) { action_id: result[1], context: additional_context }).then(function (result) { - result = result.result; result.context = _.extend(result.context || {}, additional_context); result.flags = result.flags || {}; result.flags.new_window = true; From 50e0b17662f2da7dd23bed9b482849d9d52a0002 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Mon, 22 Oct 2012 12:45:29 +0200 Subject: [PATCH 15/15] [FIX] pos closing bzr revid: al@openerp.com-20121022104529-9wq22t76fj6zqxu6 --- addons/point_of_sale/static/src/js/widgets.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 47a527a010d..3f0e439cfba 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -1055,8 +1055,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.pos.barcode_reader.disconnect(); return new instance.web.Model("ir.model.data").get_func("search_read")([['name', '=', 'action_client_pos_menu']], ['res_id']).pipe( _.bind(function(res) { - return this.rpc('/web/action/load', {'action_id': res[0]['res_id']}).pipe(_.bind(function(result) { - var action = result.result; + return this.rpc('/web/action/load', {'action_id': res[0]['res_id']}).pipe(_.bind(function(action) { action.context = _.extend(action.context || {}, {'cancel_action': {type: 'ir.actions.client', tag: 'reload'}}); //self.destroy(); this.do_action(action);