From 344beaf2826e0d09c2d19923f53657b46979a110 Mon Sep 17 00:00:00 2001 From: "Florimond Husquinet (fhu)" Date: Wed, 28 Aug 2019 08:14:50 +0000 Subject: [PATCH 1/3] [CLA] Signature for hari4274 Ticket: 2058955 closes odoo/odoo#36162 Signed-off-by: Martin Trigaux (mat) --- doc/cla/individual/hari4274.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/hari4274.md diff --git a/doc/cla/individual/hari4274.md b/doc/cla/individual/hari4274.md new file mode 100644 index 00000000000..24ff61a8cd6 --- /dev/null +++ b/doc/cla/individual/hari4274.md @@ -0,0 +1,11 @@ +India, 2019-08-24 + +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, + +Hariprasath bala.hariprasath@gmail.com https://github.com/hari4274 \ No newline at end of file From 3862f6366908c07b6ffe06d8693c2a82c7d74f58 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 28 Aug 2019 08:54:30 +0000 Subject: [PATCH 2/3] [FIX] theme_bootswatch, doc: https import for less3 The @import directive in less leave the @import as is if it detects .css extension. Otherwise it will use the less import. Since less 3.0.0 less/less.js@77fde7eb7 checking css extension regex changed from: /[#\.\&\?\/]css([\?;].*)?$/ to: /[#\.\&\?]css([\?;].*)?$/ thus all our import of google fonts with URI like: //fonts.googleapis.com/css?family=FontName now are getting imported as less, thus they are included directly in the output file with HTTP scheme URL which may be blocked on HTTPS instance. With this fix, we specify that the import is a normal CSS one with (css) import option: http://lesscss.org/features/#import-atrules-feature-css opw-2057037 closes #36167 Signed-off-by: Nicolas Lempereur (nle) --- .../theme_bootswatch/static/src/less/amelia/bootswatch.less | 2 +- addons/theme_bootswatch/static/src/less/cosmo/bootswatch.less | 2 +- .../theme_bootswatch/static/src/less/cyborg/bootswatch.less | 4 ++-- .../theme_bootswatch/static/src/less/flatly/bootswatch.less | 2 +- .../theme_bootswatch/static/src/less/journal/bootswatch.less | 2 +- .../theme_bootswatch/static/src/less/readable/bootswatch.less | 2 +- .../theme_bootswatch/static/src/less/simplex/bootswatch.less | 4 ++-- .../theme_bootswatch/static/src/less/spacelab/bootswatch.less | 4 ++-- .../theme_bootswatch/static/src/less/united/bootswatch.less | 4 ++-- doc/_extensions/odoo_ext/static/variables.less | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/theme_bootswatch/static/src/less/amelia/bootswatch.less b/addons/theme_bootswatch/static/src/less/amelia/bootswatch.less index d581785e9fd..740c7c138d3 100644 --- a/addons/theme_bootswatch/static/src/less/amelia/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/amelia/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Lobster|Cabin:400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Lobster|Cabin:400,700"); // Navbar ===================================================================== diff --git a/addons/theme_bootswatch/static/src/less/cosmo/bootswatch.less b/addons/theme_bootswatch/static/src/less/cosmo/bootswatch.less index 0be302254db..2da2fa2218a 100644 --- a/addons/theme_bootswatch/static/src/less/cosmo/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/cosmo/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700"); // Navbar ===================================================================== diff --git a/addons/theme_bootswatch/static/src/less/cyborg/bootswatch.less b/addons/theme_bootswatch/static/src/less/cyborg/bootswatch.less index eb5f6dff002..ee353fb753e 100644 --- a/addons/theme_bootswatch/static/src/less/cyborg/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/cyborg/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Roboto:400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Roboto:400,700"); // Navbar ===================================================================== @@ -161,4 +161,4 @@ a.thumbnail.active { h1, h2, h3, h4, h5, h6 { color: #fff; } -} \ No newline at end of file +} diff --git a/addons/theme_bootswatch/static/src/less/flatly/bootswatch.less b/addons/theme_bootswatch/static/src/less/flatly/bootswatch.less index a4d8f311836..2b53000bc5f 100644 --- a/addons/theme_bootswatch/static/src/less/flatly/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/flatly/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Lato:400,700,400italic"); +@import (css) url("//fonts.googleapis.com/css?family=Lato:400,700,400italic"); // Navbar ===================================================================== diff --git a/addons/theme_bootswatch/static/src/less/journal/bootswatch.less b/addons/theme_bootswatch/static/src/less/journal/bootswatch.less index 151f5af7650..167c6863f2b 100644 --- a/addons/theme_bootswatch/static/src/less/journal/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/journal/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=News+Cycle:400,700"); +@import (css) url("//fonts.googleapis.com/css?family=News+Cycle:400,700"); // Navbar ===================================================================== diff --git a/addons/theme_bootswatch/static/src/less/readable/bootswatch.less b/addons/theme_bootswatch/static/src/less/readable/bootswatch.less index 621582acb3a..c7d7cd4cc66 100644 --- a/addons/theme_bootswatch/static/src/less/readable/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/readable/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Raleway:400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Raleway:400,700"); // Navbar ===================================================================== diff --git a/addons/theme_bootswatch/static/src/less/simplex/bootswatch.less b/addons/theme_bootswatch/static/src/less/simplex/bootswatch.less index 9587dd0ec88..137501ff46c 100644 --- a/addons/theme_bootswatch/static/src/less/simplex/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/simplex/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Open+Sans:400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Open+Sans:400,700"); .btn-shadow(@color) { #gradient > .vertical-three-colors(lighten(@color, 3%), @color, 6%, darken(@color, 3%)); @@ -139,4 +139,4 @@ label { // Progress bars ============================================================== -// Containers ================================================================= \ No newline at end of file +// Containers ================================================================= diff --git a/addons/theme_bootswatch/static/src/less/spacelab/bootswatch.less b/addons/theme_bootswatch/static/src/less/spacelab/bootswatch.less index 16a6678dc59..30f87c110ed 100644 --- a/addons/theme_bootswatch/static/src/less/spacelab/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/spacelab/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"); +@import (css) url("//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"); .btn-shadow(@color) { #gradient > .vertical-three-colors(lighten(@color, 15%), @color, 50%, darken(@color, 4%)); @@ -136,4 +136,4 @@ color: #fff; } } -} \ No newline at end of file +} diff --git a/addons/theme_bootswatch/static/src/less/united/bootswatch.less b/addons/theme_bootswatch/static/src/less/united/bootswatch.less index dbe7aba6dfe..0446b9a9b82 100644 --- a/addons/theme_bootswatch/static/src/less/united/bootswatch.less +++ b/addons/theme_bootswatch/static/src/less/united/bootswatch.less @@ -2,7 +2,7 @@ // Bootswatch // ----------------------------------------------------- -@import url("//fonts.googleapis.com/css?family=Ubuntu"); +@import (css) url("//fonts.googleapis.com/css?family=Ubuntu"); // Navbar ===================================================================== @@ -39,4 +39,4 @@ // Progress bars ============================================================== -// Containers ================================================================= \ No newline at end of file +// Containers ================================================================= diff --git a/doc/_extensions/odoo_ext/static/variables.less b/doc/_extensions/odoo_ext/static/variables.less index 27399411813..8031d3568be 100644 --- a/doc/_extensions/odoo_ext/static/variables.less +++ b/doc/_extensions/odoo_ext/static/variables.less @@ -79,7 +79,7 @@ // =============================================== //== Fonts -@import url(https://fonts.googleapis.com/css?family=Work+Sans:300,400,500,600,700&subset=latin,latin-ext); +@import (css) url(https://fonts.googleapis.com/css?family=Work+Sans:300,400,500,600,700&subset=latin,latin-ext); //== Font sizes/weigths @font-size-base : 15px; From 7c99310b2337468db1b19e682fc0b9555d3a8731 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 9 Jul 2019 11:31:25 +0000 Subject: [PATCH 3/3] [FIX] auth_oauth: Override qcontext in the right place Before this patch, if some module was based on top of `auth_signup`, and `auth_oauth` was also installed in the same database, the only way to get the proper qcontext would be to call `super()` inside `web_auth_signup_qcontext`, which would produce a login, which is most likely not desired because such addon would try to add some logic on top of it that maybe prevents login based on some circumstances. After this patch, any submodules can work properly without workarounds. closes odoo/odoo#34690 Signed-off-by: Christophe Simonis --- addons/auth_oauth/controllers/main.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 0e8270d7eed..255da750f4b 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -109,19 +109,10 @@ class OAuthLogin(Home): return response - @http.route() - def web_auth_signup(self, *args, **kw): - providers = self.list_providers() - response = super(OAuthLogin, self).web_auth_signup(*args, **kw) - response.qcontext.update(providers=providers) - return response - - @http.route() - def web_auth_reset_password(self, *args, **kw): - providers = self.list_providers() - response = super(OAuthLogin, self).web_auth_reset_password(*args, **kw) - response.qcontext.update(providers=providers) - return response + def get_auth_signup_qcontext(self): + result = super(OAuthLogin, self).get_auth_signup_qcontext() + result["providers"] = self.list_providers() + return result class OAuthController(http.Controller):