From b2f0af4543293350365a43893f9184e0a8669b48 Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Fri, 1 Dec 2017 13:52:31 -0800 Subject: [PATCH 1/5] [FIX] point_of_sale: allow searching a partner on >2 fields When searching for a partner the ' ' (SPC) character can be used as a field separator. You can search for e.g.: 'agr namur' which will return the 'Agrolait, 69 rue de Namur,...' partner. For some reason only the first space was considered a separator. So e.g.: 'agr namur belgium' wouldn't work. This commit makes it so that every space character is considered a separator. Fixes #21357 --- addons/point_of_sale/static/src/js/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 4fdaa652a82..dd7cc59cb7d 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -321,7 +321,7 @@ var PosDB = core.Class.extend({ search_partner: function(query){ try { query = query.replace(/[\[\]\(\)\+\*\?\.\-\!\&\^\$\|\~\_\{\}\:\,\\\/]/g,'.'); - query = query.replace(' ','.+'); + query = query.replace(/ /g,'.+'); var re = RegExp("([0-9]+):.*?"+query,"gi"); }catch(e){ return []; From ed326e056946f5990357649245639a39b85134dc Mon Sep 17 00:00:00 2001 From: Ruter Date: Tue, 5 Dec 2017 12:23:25 +0800 Subject: [PATCH 2/5] [CLA] signature for ruter --- doc/cla/individual/ruter.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/ruter.md diff --git a/doc/cla/individual/ruter.md b/doc/cla/individual/ruter.md new file mode 100644 index 00000000000..1560ba2b7f3 --- /dev/null +++ b/doc/cla/individual/ruter.md @@ -0,0 +1,11 @@ +China, 2017-12-05 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Ruter ruter.lv@gmail.com https://github.com/ruter From fe8668e509d36b48a6be0c82f46a44a0f553cbb6 Mon Sep 17 00:00:00 2001 From: Ruter Date: Tue, 5 Dec 2017 12:28:16 +0800 Subject: [PATCH 3/5] [FIX] web: Setting disable_favorites on Search View causes Exception --- addons/web/static/src/js/views/search_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/search_view.js b/addons/web/static/src/js/views/search_view.js index 65dbb4557e7..d11af68c107 100644 --- a/addons/web/static/src/js/views/search_view.js +++ b/addons/web/static/src/js/views/search_view.js @@ -337,7 +337,7 @@ var SearchView = View.extend({ }, set_default_filters: function () { var self = this, - default_custom_filter = this.$buttons && this.favorite_menu.get_default_filter(); + default_custom_filter = this.$buttons && this.favorite_menu && this.favorite_menu.get_default_filter(); if (!self.options.disable_custom_filters && default_custom_filter) { return this.favorite_menu.toggle_filter(default_custom_filter, true); } From 04bfd54013cd26d95332641789b4e2b294c4b3b5 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 4 Dec 2017 16:59:07 +0100 Subject: [PATCH 4/5] [FIX] sales_team: multicompany issue typo 3ad1867e 3ad1867e could lead to wrong results in a multicompany setting because the change got the company from the lead but it was intended to be gotten from the user. Since ('company_id', 'child_of', False) returned "root" companies, the code still got a sales team but possibly one from another company if the user was on another company that its sales team. This would lead to an access issue that this commit solves. opw-784455 closes #21428 --- addons/sales_team/models/crm_team.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sales_team/models/crm_team.py b/addons/sales_team/models/crm_team.py index 2eebdd5eceb..ae491e7866e 100644 --- a/addons/sales_team/models/crm_team.py +++ b/addons/sales_team/models/crm_team.py @@ -19,7 +19,7 @@ class CrmTeam(models.Model): if 'default_team_id' in self.env.context: team_id = self.env['crm.team'].browse(self.env.context.get('default_team_id')) if not team_id or not team_id.exists(): - company_id = self.sudo(user_id).company_id.id + company_id = self.sudo(user_id).env.user.company_id.id team_id = self.env['crm.team'].sudo().search([ '|', ('user_id', '=', user_id), ('member_ids', '=', user_id), '|', ('company_id', '=', False), ('company_id', 'child_of', [company_id]) From ce038f5d1531107a1e45fd867de42e82940babdb Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Tue, 5 Dec 2017 13:29:06 +0100 Subject: [PATCH 5/5] [FIX] auth_oauth: correctly retrieve user facebook email Before this commit, you could never get the user's facebook email. Since there was no email field on facebook response, email would be then set to an auto generated value like 'provider_2_user_0123456789123456' by odoo. Now, we correctly request user's email to facebook. opw-782771 --- addons/auth_oauth/auth_oauth_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/auth_oauth/auth_oauth_data.xml b/addons/auth_oauth/auth_oauth_data.xml index 3b71b56be1f..7fc4633cc0a 100644 --- a/addons/auth_oauth/auth_oauth_data.xml +++ b/addons/auth_oauth/auth_oauth_data.xml @@ -16,7 +16,7 @@ https://www.facebook.com/dialog/oauth public_profile,email https://graph.facebook.com/me - + https://graph.facebook.com/me?fields=id,name,email fa fa-facebook-square Log in with facebook