[MERGE] forward port branch 11.0 up to d61873ac4a
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -4,7 +4,12 @@ odoo.define('mail.utils', function (require) {
|
||||
function parse_and_transform(html_string, transform_function) {
|
||||
var open_token = "OPEN" + Date.now();
|
||||
var string = html_string.replace(/</g, open_token);
|
||||
var children = $('<div>').html(string).contents();
|
||||
var children;
|
||||
try {
|
||||
children = $('<div>').html(string).contents();
|
||||
} catch (e) {
|
||||
children = $('<div>').html('<pre>' + string + '</pre>').contents();
|
||||
}
|
||||
return _parse_and_transform(children, transform_function)
|
||||
.replace(new RegExp(open_token, "g"), "<");
|
||||
}
|
||||
|
||||
@@ -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 =====================================================================
|
||||
|
||||
|
||||
@@ -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 =====================================================================
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 =====================================================================
|
||||
|
||||
|
||||
@@ -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 =====================================================================
|
||||
|
||||
|
||||
@@ -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 =====================================================================
|
||||
|
||||
|
||||
@@ -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 =================================================================
|
||||
// Containers =================================================================
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 =================================================================
|
||||
// Containers =================================================================
|
||||
|
||||
@@ -2097,7 +2097,7 @@ var FieldStatus = AbstractField.extend({
|
||||
var FieldSelection = AbstractField.extend({
|
||||
template: 'FieldSelection',
|
||||
specialData: "_fetchSpecialRelation",
|
||||
supportedFieldTypes: ['selection', 'many2one'],
|
||||
supportedFieldTypes: ['selection'],
|
||||
events: _.extend({}, AbstractField.prototype.events, {
|
||||
'change': '_onChange',
|
||||
}),
|
||||
|
||||
@@ -47,6 +47,9 @@ var GraphView = AbstractView.extend({
|
||||
|
||||
this.arch.children.forEach(function (field) {
|
||||
var name = field.attrs.name;
|
||||
if (name === "id") {
|
||||
return;
|
||||
}
|
||||
if (field.attrs.interval) {
|
||||
name += ':' + field.attrs.interval;
|
||||
}
|
||||
|
||||
@@ -127,12 +127,22 @@ return Widget.extend({
|
||||
var $item = self.make_list_item(result).appendTo($list);
|
||||
result.$el = $item;
|
||||
});
|
||||
// IE9 doesn't support addEventListener with option { once: true }
|
||||
this.el.onmousemove = function (ev) {
|
||||
self.$('li').each(function (index, li) {
|
||||
li.onmouseenter = self.focus_element.bind(self, $(li));
|
||||
});
|
||||
var targetFocus = ev.target.tagName === 'LI' ?
|
||||
ev.target :
|
||||
ev.target.closest('li');
|
||||
self.focus_element($(targetFocus));
|
||||
self.el.onmousemove = null;
|
||||
};
|
||||
this.show();
|
||||
},
|
||||
make_list_item: function (result) {
|
||||
var self = this;
|
||||
var $li = $('<li>')
|
||||
.hover(function () {self.focus_element($li);})
|
||||
.mousedown(function (ev) {
|
||||
if (ev.button === 0) { // left button
|
||||
self.select(ev, {item: {facet: result.facet}});
|
||||
|
||||
@@ -105,6 +105,27 @@ QUnit.module('Views', {
|
||||
graph.destroy();
|
||||
});
|
||||
|
||||
QUnit.test('field id not in groupBy', function (assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var graph = createView({
|
||||
View: GraphView,
|
||||
model: "foo",
|
||||
data: this.data,
|
||||
arch: '<graph string="Partners">' +
|
||||
'<field name="id"/>' +
|
||||
'</graph>',
|
||||
mockRPC: function (route, args) {
|
||||
if (args.method === 'read_group') {
|
||||
assert.deepEqual(args.kwargs.groupby, [],
|
||||
'groupby should not contain id field');
|
||||
}
|
||||
return this._super.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
graph.destroy();
|
||||
});
|
||||
|
||||
QUnit.test('switching mode', function (assert) {
|
||||
assert.expect(6);
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -1666,7 +1666,7 @@ Relational fields
|
||||
|
||||
.. autoclass:: web.relational_fields.FieldSelection
|
||||
|
||||
Supported field types: *selection*, *many2one*
|
||||
Supported field types: *selection*
|
||||
|
||||
.. attribute:: placeholder
|
||||
|
||||
@@ -1697,7 +1697,7 @@ Relational fields
|
||||
- many2one (FieldMany2One)
|
||||
Default widget for many2one fields.
|
||||
|
||||
- Supported field types: *selection, many2one*
|
||||
- Supported field types: *many2one*
|
||||
|
||||
Attributes:
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<rng:optional><rng:attribute name="quick_add" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="color" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="event_open_popup" /></rng:optional>
|
||||
<rng:optional><rng:attribute name="js_class"/></rng:optional>
|
||||
<rng:optional>
|
||||
<rng:attribute name="mode">
|
||||
<rng:choice>
|
||||
|
||||
Reference in New Issue
Block a user