From e8dec0fdf1491c264ffd385d4cc4dac5fc5d8de7 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 26 Jun 2017 16:30:37 +0200 Subject: [PATCH 01/38] [FIX] payment: do not create token in backend Tokens are not meant to be generated from the backend, so we forbid it. opw-746545 --- addons/payment/views/account_payment_views.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/payment/views/account_payment_views.xml b/addons/payment/views/account_payment_views.xml index a284f69b77f..dd9a5400be3 100644 --- a/addons/payment/views/account_payment_views.xml +++ b/addons/payment/views/account_payment_views.xml @@ -19,8 +19,9 @@ - + From a8c12e1fd0542726ada733b592f5196d256ec7e9 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 27 Jun 2017 13:14:01 +0200 Subject: [PATCH 02/38] [FIX] sale: Updating dashboard_graph_model when uninstalling Sales Uninstalling Sales with CRM still installed lead to an error when clicking on CRM app because the dashboard_graph_model was not updated for each crm.team record. opw:748099 --- addons/sale/__init__.py | 18 ++++++++++++++++++ addons/sale/__manifest__.py | 1 + 2 files changed, 19 insertions(+) diff --git a/addons/sale/__init__.py b/addons/sale/__init__.py index d84fb182e8f..7e12dedf6a4 100644 --- a/addons/sale/__init__.py +++ b/addons/sale/__init__.py @@ -1,6 +1,24 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. + +from functools import partial +import openerp +from openerp import api, SUPERUSER_ID + import models import report import wizard + + +def uninstall_hook(cr, registry): + def update_dashboard_graph_model(dbname): + db_registry = openerp.modules.registry.RegistryManager.new(dbname) + with api.Environment.manage(), db_registry.cursor() as cr: + env = api.Environment(cr, SUPERUSER_ID, {}) + if 'crm.team' in env: + recs = env['crm.team'].search([]) + for rec in recs: + rec._onchange_team_type() + + cr.after("commit", partial(update_dashboard_graph_model, cr.dbname)) \ No newline at end of file diff --git a/addons/sale/__manifest__.py b/addons/sale/__manifest__.py index f44873daa8e..d1be4a05528 100644 --- a/addons/sale/__manifest__.py +++ b/addons/sale/__manifest__.py @@ -65,6 +65,7 @@ The Dashboard for the Sales Manager will include 'data/sale_demo.xml', 'data/product_product_demo.xml', ], + 'uninstall_hook': "uninstall_hook", 'css': ['static/src/css/sale.css'], 'installable': True, 'auto_install': False, From 86391525016ce4f01213cd3eae617474907cff3d Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 27 Jun 2017 15:13:37 +0200 Subject: [PATCH 03/38] [FIX] crm: Prevent to select non-customer on lead quick creation Purpose ======= If you create an opp from the kanban you can select any contact (even if not marked "customer") If you try to add a "non-customer" for the same field from the form view you cannot. Specification ============= Apply the same behavior than on the form view. --- addons/crm/views/crm_lead_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index 442011c5fda..a51c141bb52 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -203,7 +203,7 @@ - + - + From 32423169af0a4dcd38398e4ad4f630faccba4ff8 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Wed, 28 Jun 2017 14:36:08 +0200 Subject: [PATCH 10/38] [FIX] web: namespace the event for Apps Widget. With the new client web from v9, we start the new action before to destroy the old one. When we switch from Apps (store) to Update and vice-versa, iframe was not loaded correctly. In case of the Apps widget, we are binding event of the new iframe during the start, and when it is ready, we destroy the old ifram and so unbind the listener of 'message.apps'. Using a uniq id, we ensure to bind new event, and only unbind old event during the destroy. --- addons/web/static/src/js/apps.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/apps.js b/addons/web/static/src/js/apps.js index 156fe9e10b7..69993dcc0ef 100644 --- a/addons/web/static/src/js/apps.js +++ b/addons/web/static/src/js/apps.js @@ -62,7 +62,7 @@ var Apps = Widget.extend({ }, destroy: function() { - $(window).off("message.apps"); + $(window).off("message." + this.uniq); if (this.$ifr) { this.$ifr.remove(); this.$ifr = null; @@ -114,10 +114,12 @@ var Apps = Widget.extend({ var qs = (session.debug ? 'debug&' : '') + 'db=' + client.dbname; var u = client.origin + '/apps/embed/client?' + qs; - var css = {width: '100%', height: '400px'}; + + var css = {width: '100%', height: '750px'}; self.$ifr = $('