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/2] [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 ce038f5d1531107a1e45fd867de42e82940babdb Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Tue, 5 Dec 2017 13:29:06 +0100 Subject: [PATCH 2/2] [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