summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-05-26 17:34:04 +0200
committerChristophe Simonis <chs@odoo.com>2015-05-28 14:27:38 +0200
commitfe2b5f35a40ca8df662130608b0f89427a196362 (patch)
tree0c7773f0599f3b1e6dbb869104fad0b04869b269 /addons/web/static
parentd4d8a2eae31e7a6a45029b84603e055300e3be36 (diff)
parentbf1e99964cdbc374f8a0c4cec1b338bf7c7c2930 (diff)
[MERGE] forward port of branch saas-6 up to bf1e999
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/lib/datejs/globalization/bs-BA.js0
-rw-r--r--addons/web/static/lib/datejs/globalization/kab_DZ.js194
-rw-r--r--addons/web/static/lib/datejs/globalization/lo-LA.js0
-rw-r--r--addons/web/static/src/css/base.css20
-rw-r--r--addons/web/static/src/css/base.sass13
-rw-r--r--addons/web/static/src/js/action_manager.js3
-rw-r--r--addons/web/static/src/js/framework/crash_manager.js15
-rw-r--r--addons/web/static/src/js/tour.js8
-rw-r--r--addons/web/static/src/js/views/form_view.js2
-rw-r--r--addons/web/static/src/js/views/form_widgets.js10
-rw-r--r--addons/web/static/src/js/views/graph_widget.js1
-rw-r--r--addons/web/static/src/js/views/pivot_view.js13
-rw-r--r--addons/web/static/src/js/views/search_filters.js4
-rw-r--r--addons/web/static/src/js/views/search_inputs.js14
-rw-r--r--addons/web/static/src/js/views/search_view.js9
-rw-r--r--addons/web/static/src/js/widgets/sidebar.js1
-rw-r--r--addons/web/static/src/js/widgets/user_menu.js2
-rw-r--r--addons/web/static/src/xml/base.xml10
-rw-r--r--addons/web/static/test/search.js6
19 files changed, 299 insertions, 26 deletions
diff --git a/addons/web/static/lib/datejs/globalization/bs-BA.js b/addons/web/static/lib/datejs/globalization/bs-BA.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/addons/web/static/lib/datejs/globalization/bs-BA.js
diff --git a/addons/web/static/lib/datejs/globalization/kab_DZ.js b/addons/web/static/lib/datejs/globalization/kab_DZ.js
new file mode 100644
index 00000000000..7cc18e666af
--- /dev/null
+++ b/addons/web/static/lib/datejs/globalization/kab_DZ.js
@@ -0,0 +1,194 @@
+Date.CultureInfo = {
+ /* Culture Name */
+ name: "kab",
+ englishName: "Kabyle (Algaria)",
+ nativeName: "Taqbaylit (Ledzayer)",
+
+ /* Day Name Strings */
+ dayNames: ["acer", "arim", "aram", "ahad", "amhad", "sem", "sed"],
+ abbreviatedDayNames: ["ace.", "ari.", "ara.", "aha.", "amh.", "sem.", "sed."],
+ shortestDayNames: ["ac", "ar", "ra", "ah", "am", "sm", "sd"],
+ firstLetterDayNames: ["c", "r", "m", "h", "a", "s", "d"],
+
+ /* Month Name Strings */
+ monthNames: ["yennayer", "furar", "meɣres", "yebrir", "maggu", "yunyu", "yulyu", "ɣuct", "ctember", "tuber", "number", "bujember"],
+ abbreviatedMonthNames: ["yen.", "fur.", "meɣ.", "yeb.", "mag.", "yun.", "yul.", "ɣuc", "cte.", "tub.", "num.", "buj."],
+ /* AM/PM Designators */
+ amDesignator: "",
+ pmDesignator: "",
+
+ firstDayOfWeek: 1,
+ twoDigitYearMax: 2029,
+
+ /**
+ * The dateElementOrder is based on the order of the
+ * format specifiers in the formatPatterns.DatePattern.
+ *
+ * Example:
+ <pre>
+ shortDatePattern dateElementOrder
+ ------------------ ----------------
+ "M/d/yyyy" "mdy"
+ "dd/MM/yyyy" "dmy"
+ "yyyy-MM-dd" "ymd"
+ </pre>
+ *
+ * The correct dateElementOrder is required by the parser to
+ * determine the expected order of the date elements in the
+ * string being parsed.
+ */
+ dateElementOrder: "dmy",
+
+ /* Standard date and time format patterns */
+ formatPatterns: {
+ shortDate: "dd/MM/yyyy",
+ longDate: "dddd d MMMM yyyy",
+ shortTime: "HH:mm",
+ longTime: "HH:mm:ss",
+ fullDateTime: "dddd d MMMM yyyy HH:mm:ss",
+ sortableDateTime: "yyyy-MM-ddTHH:mm:ss",
+ universalSortableDateTime: "yyyy-MM-dd HH:mm:ssZ",
+ rfc1123: "ddd, dd MMM yyyy HH:mm:ss GMT",
+ monthDay: "d MMMM",
+ yearMonth: "MMMM yyyy"
+ },
+
+ /**
+ * NOTE: If a string format is not parsing correctly, but
+ * you would expect it parse, the problem likely lies below.
+ *
+ * The following regex patterns control most of the string matching
+ * within the parser.
+ *
+ * The Month name and Day name patterns were automatically generated
+ * and in general should be (mostly) correct.
+ *
+ * Beyond the month and day name patterns are natural language strings.
+ * Example: "next", "today", "months"
+ *
+ * These natural language string may NOT be correct for this culture.
+ * If they are not correct, please translate and edit this file
+ * providing the correct regular expression pattern.
+ *
+ * If you modify this file, please post your revised CultureInfo file
+ * to the Datejs Forum located at http://www.datejs.com/forums/.
+ *
+ * Please mark the subject of the post with [CultureInfo]. Example:
+ * Subject: [CultureInfo] Translated "da-DK" Danish(Denmark)
+ *
+ * We will add the modified patterns to the master source files.
+ *
+ * As well, please review the list of "Future Strings" section below.
+ */
+ regexPatterns: {
+ jan: /^yenna(.(yer)?)?/i,
+ feb: /^fur(.(ar)?)?/i,
+ mar: /^meɣ(.(res)?)?/i,
+ apr: /^yeb(.(rir)?)?/i,
+ may: /^mag(.(gu)?)?/i,
+ jun: /^yun(.(yu)?)?/i,
+ jul: /^yul(.(yu)?)?/i,
+ aug: /^ɣuct/i,
+ sep: /^ctem(.(ber)?)?/i,
+ oct: /^tu(.(ber)?)?/i,
+ nov: /^num(.(ber)?)?/i,
+ dec: /^bujem(.(ber)?)?/i,
+
+ sun: /^ac(.(er)?)?/i,
+ mon: /^ar(.(im)?)?/i,
+ tue: /^ar(.(am)?)?/i,
+ wed: /^ah(.(ad)?)?/i,
+ thu: /^am(.(had)?)?/i,
+ fri: /^se(.(m)?)?/i,
+ sat: /^se(.(d)?)?/i,
+
+ future: /^next/i,
+ past: /^last|past|prev(ious)?/i,
+ add: /^(\+|aft(er)?|from|hence)/i,
+ subtract: /^(\-|bef(ore)?|ago)/i,
+
+ yesterday: /^yes(terday)?/i,
+ today: /^t(od(ay)?)?/i,
+ tomorrow: /^tom(orrow)?/i,
+ now: /^n(ow)?/i,
+
+ millisecond: /^ms|milli(second)?s?/i,
+ second: /^sec(ond)?s?/i,
+ minute: /^mn|min(ute)?s?/i,
+ hour: /^h(our)?s?/i,
+ week: /^w(eek)?s?/i,
+ month: /^m(onth)?s?/i,
+ day: /^d(ay)?s?/i,
+ year: /^y(ear)?s?/i,
+
+ shortMeridian: /^(a|p)/i,
+ longMeridian: /^(a\.?m?\.?|p\.?m?\.?)/i,
+ timezone: /^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,
+ ordinalSuffix: /^\s*(st|nd|rd|th)/i,
+ timeContext: /^\s*(\:|a(?!u|p)|p)/i
+ },
+
+ timezones: [{name:"UTC", offset:"-000"}, {name:"GMT", offset:"-000"}, {name:"EST", offset:"-0500"}, {name:"EDT", offset:"-0400"}, {name:"CST", offset:"-0600"}, {name:"CDT", offset:"-0500"}, {name:"MST", offset:"-0700"}, {name:"MDT", offset:"-0600"}, {name:"PST", offset:"-0800"}, {name:"PDT", offset:"-0700"}]
+};
+
+/********************
+ ** Future Strings **
+ ********************
+ *
+ * The following list of strings may not be currently being used, but
+ * may be incorporated into the Datejs library later.
+ *
+ * We would appreciate any help translating the strings below.
+ *
+ * If you modify this file, please post your revised CultureInfo file
+ * to the Datejs Forum located at http://www.datejs.com/forums/.
+ *
+ * Please mark the subject of the post with [CultureInfo]. Example:
+ * Subject: [CultureInfo] Translated "da-DK" Danish(Denmark)b
+ *
+ * English Name Translated
+ * ------------------ -----------------
+ * about about
+ * ago ago
+ * date date
+ * time time
+ * calendar calendar
+ * show show
+ * hourly hourly
+ * daily daily
+ * weekly weekly
+ * bi-weekly bi-weekly
+ * fortnight fortnight
+ * monthly monthly
+ * bi-monthly bi-monthly
+ * quarter quarter
+ * quarterly quarterly
+ * yearly yearly
+ * annual annual
+ * annually annually
+ * annum annum
+ * again again
+ * between between
+ * after after
+ * from now from now
+ * repeat repeat
+ * times times
+ * per per
+ * min (abbrev minute) min
+ * morning morning
+ * noon noon
+ * night night
+ * midnight midnight
+ * mid-night mid-night
+ * evening evening
+ * final final
+ * future future
+ * spring spring
+ * summer summer
+ * fall fall
+ * winter winter
+ * end of end of
+ * end end
+ * long long
+ * short short
+ */
diff --git a/addons/web/static/lib/datejs/globalization/lo-LA.js b/addons/web/static/lib/datejs/globalization/lo-LA.js
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/addons/web/static/lib/datejs/globalization/lo-LA.js
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 805790930e2..81a1460b0bd 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -52,6 +52,7 @@
box-shadow: 0 0 1px black;
left: 50%;
transform: translate(-50%, 0);
+ -webkit-filter: blur(0);
}
.oe_notification {
@@ -3048,6 +3049,12 @@ body.oe_single_form .oe_single_form_container {
@media print {
body {
height: auto !important;
+ overflow: visible !important;
+ }
+
+ tr, td {
+ page-break-inside: avoid;
+ page-break-after: auto;
}
.openerp#announcement_bar_table {
@@ -3057,6 +3064,13 @@ body.oe_single_form .oe_single_form_container {
.openerp {
text-shadow: none;
}
+ .openerp.openerp_webclient_container {
+ display: block;
+ height: auto !important;
+ }
+ .openerp .oe-view-manager {
+ display: block;
+ }
.openerp .oe_application, .openerp .oe_view_manager_wrapper {
height: auto !important;
}
@@ -3082,6 +3096,9 @@ body.oe_single_form .oe_single_form_container {
.openerp .oe_notebook > li.ui-tabs-selected {
display: block;
}
+ .openerp .oe_application {
+ width: auto;
+ }
.openerp .oe_application .oe_form_sheet, .openerp .oe_application .oe_form_sheetbg {
border: 0px !important;
box-shadow: 0px 0px 0px;
@@ -3099,6 +3116,9 @@ body.oe_single_form .oe_single_form_container {
.openerp .openerp div.oe_mail_wall {
overflow: hidden !important;
}
+ .openerp .oe-view-manager .oe-view-manager-content {
+ overflow: visible;
+ }
.openerp.openerp_webclient_container {
overflow: visible;
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index d848bbe6fc0..1f7a0c1560f 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -161,6 +161,7 @@ $sheet-padding: 16px
box-shadow: 0 0 1px black
left: 50%
transform: translate(-50%, 0)
+ -webkit-filter: blur(0)
.oe_notification
z-index: 1600
@@ -2520,9 +2521,18 @@ body.oe_single_form
@media print
body
height: auto !important
+ overflow: visible !important
+ tr, td
+ page-break-inside: avoid
+ page-break-after: auto
.openerp#announcement_bar_table
display: none
.openerp
+ &.openerp_webclient_container
+ display: block
+ height: auto !important
+ .oe-view-manager
+ display: block
.oe_application, .oe_view_manager_wrapper
height: auto !important
.oe_application > div > .oe_view_manager > .oe_view_manager_wrapper > div > .oe_view_manager_body
@@ -2550,6 +2560,7 @@ body.oe_single_form
box-shadow: 0px 0px 0px
.oe_list
overflow-x: visible
+ width: auto
.oe-control-panel, .oe-o2m-control-panel
border: 0px !important
box-shadow: 0px 0px 0px
@@ -2558,6 +2569,8 @@ body.oe_single_form
background: none
.openerp div.oe_mail_wall
overflow: hidden !important
+ .oe-view-manager .oe-view-manager-content
+ overflow: visible
.openerp.openerp_webclient_container
overflow: visible
// }}}
diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js
index 7b9cfa9cbf8..6700932b4bc 100644
--- a/addons/web/static/src/js/action_manager.js
+++ b/addons/web/static/src/js/action_manager.js
@@ -507,7 +507,8 @@ var ActionManager = Widget.extend({
pager : (!popup || !form) && !inline,
display_title : !popup,
headless: (popup || inline) && form,
- search_disable_custom_filters: action.context && action.context.search_disable_custom_filters
+ search_disable_custom_filters: action.context && action.context.search_disable_custom_filters,
+ default_view: action.context && action.context.params && action.context.params.view_type,
});
}
diff --git a/addons/web/static/src/js/framework/crash_manager.js b/addons/web/static/src/js/framework/crash_manager.js
index 01fef03267b..303cd66a4a3 100644
--- a/addons/web/static/src/js/framework/crash_manager.js
+++ b/addons/web/static/src/js/framework/crash_manager.js
@@ -36,19 +36,24 @@ var CrashManager = core.Class.extend({
this.active = false;
},
rpc_error: function(error) {
+ var self = this;
if (!this.active) {
return;
}
+ if (this.$indicator){
+ return;
+ }
if (error.code == -32098) {
$.blockUI({ message: '' , overlayCSS: {'z-index': 9999, backgroundColor: '#FFFFFF', opacity: 0.0, cursor: 'wait'}});
- var $indicator = $('<div class="oe_indicator">' + _t("Trying to reconnect... ") + '<i class="fa fa-refresh"></i></div>');
- $indicator.prependTo("body");
+ this.$indicator = $('<div class="oe_indicator">' + _t("Trying to reconnect... ") + '<i class="fa fa-refresh"></i></div>');
+ this.$indicator.prependTo("body");
var timeinterval = setInterval(function(){
ajax.jsonRpc('/web/webclient/version_info').then(function() {
clearInterval(timeinterval);
- $indicator.html(_t("You are back online"));
- $indicator.delay(2000).fadeOut('slow',function(){
- $indicator.remove();
+ self.$indicator.html(_t("You are back online"));
+ self.$indicator.delay(2000).fadeOut('slow',function(){
+ $(this).remove();
+ self.$indicator.remove();
});
$.unblockUI();
});
diff --git a/addons/web/static/src/js/tour.js b/addons/web/static/src/js/tour.js
index ea64a55f22c..234b681f7d2 100644
--- a/addons/web/static/src/js/tour.js
+++ b/addons/web/static/src/js/tour.js
@@ -76,6 +76,7 @@ var localStorage = window.localStorage;
var Tour = {
tours: {},
defaultDelay: 50,
+ autoRunning: true,
retryRunningDelay: 1000,
errorDelay: 5000,
state: null,
@@ -378,6 +379,7 @@ var Tour = {
},
logError: function (step, message, all) {
var state = Tour.getState();
+ console.log(state.tour.steps.slice());
message += '\ntour: ' + state.id
+ (step ? '\nstep: ' + step.id + ": '" + (step._title || step.title) + "'" : '' )
+ (all ? '\nhref: ' + window.location.href : '' )
@@ -711,7 +713,11 @@ var Tour = {
/////////////////////////////////////////////////
-$(document).ready(Tour.running);
+$(document).ready(function () {
+ if (Tour.autoRunning) {
+ Tour.running();
+ };
+});
return Tour;
diff --git a/addons/web/static/src/js/views/form_view.js b/addons/web/static/src/js/views/form_view.js
index aa06074401f..df570967f94 100644
--- a/addons/web/static/src/js/views/form_view.js
+++ b/addons/web/static/src/js/views/form_view.js
@@ -637,7 +637,7 @@ var FormView = View.extend(common.FieldManagerMixin, {
// If field is not defined in the view, just ignore it
if (field) {
var value_ = values[f];
- if (field.get_value() != value_) {
+ if (field.get_value() !== value_) {
field._inhibit_on_change_flag = true;
field.set_value(value_);
field._inhibit_on_change_flag = false;
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index b23bff4cc84..ee04f8376b4 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -1230,9 +1230,11 @@ var FieldBinary = common.AbstractField.extend(common.ReinitializeFieldMixin, {
set_filename: function(value) {
var filename = this.node.attrs.filename;
if (filename) {
- var tmp = {};
- tmp[filename] = value;
- this.field_manager.set_values(tmp);
+ var field = this.field_manager.fields[filename];
+ if (field) {
+ field.set_value(value);
+ field._dirty_flag = true;
+ }
}
},
on_clear: function() {
@@ -1279,10 +1281,10 @@ var FieldBinaryFile = FieldBinary.extend({
},
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
this.binary_value = true;
+ this.set_filename(name);
this.internal_set_value(file_base64);
var show_value = name + " (" + utils.human_size(size) + ")";
this.$el.find('input').eq(0).val(show_value);
- this.set_filename(name);
},
on_clear: function() {
this._super.apply(this, arguments);
diff --git a/addons/web/static/src/js/views/graph_widget.js b/addons/web/static/src/js/views/graph_widget.js
index 1e712b5af79..3f8a7566d97 100644
--- a/addons/web/static/src/js/views/graph_widget.js
+++ b/addons/web/static/src/js/views/graph_widget.js
@@ -168,6 +168,7 @@ return Widget.extend({
// rotateLabels: 40,
showControls: (this.groupbys.length > 1)
});
+ chart.yAxis.tickFormat(function(d) { return openerp.web.format_value(d, { type : 'float' });});
chart(svg);
this.to_remove = chart.update;
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js
index 1b55895d847..22b74ecbf15 100644
--- a/addons/web/static/src/js/views/pivot_view.js
+++ b/addons/web/static/src/js/views/pivot_view.js
@@ -60,6 +60,8 @@ var PivotView = View.extend({
this.last_header_selected = null;
this.sorted_column = {};
+
+ this.numbering = {};
},
willStart: function () {
var self = this;
@@ -490,13 +492,22 @@ var PivotView = View.extend({
},
sanitize_value: function (value, field) {
if (value === false) return _t("Undefined");
- if (value instanceof Array) return value[1];
+ if (value instanceof Array) return this.get_numbered_value(value, field);
if (field && this.fields[field] && (this.fields[field].type === 'selection')) {
var selected = _.where(this.fields[field].selection, {0: value})[0];
return selected ? selected[1] : value;
}
return value;
},
+ get_numbered_value: function(value, field) {
+ var id= value[0];
+ var name= value[1]
+ this.numbering[field] = this.numbering[field] || {};
+ this.numbering[field][name] = this.numbering[field][name] || {};
+ var numbers = this.numbering[field][name];
+ numbers[id] = numbers[id] || _.size(numbers) + 1;
+ return name + (numbers[id] > 1 ? " (" + numbers[id] + ")" : "");
+ },
make_header: function (data_pt, root, i, j, parent_header) {
var attrs = data_pt.attributes,
value = attrs.value,
diff --git a/addons/web/static/src/js/views/search_filters.js b/addons/web/static/src/js/views/search_filters.js
index 0409fa90a0d..506ddecd805 100644
--- a/addons/web/static/src/js/views/search_filters.js
+++ b/addons/web/static/src/js/views/search_filters.js
@@ -244,6 +244,10 @@ ExtendedSearchProposition.Float = ExtendedSearchProposition.Field.extend({
{value: "∃", text: _lt("is set")},
{value: "∄", text: _lt("is not set")}
],
+ init: function (parent) {
+ this._super(parent);
+ this.decimal_point = _t.database.parameters.decimal_point;
+ },
toString: function () {
return this.$el.val();
},
diff --git a/addons/web/static/src/js/views/search_inputs.js b/addons/web/static/src/js/views/search_inputs.js
index 16f95340dd6..4127b020970 100644
--- a/addons/web/static/src/js/views/search_inputs.js
+++ b/addons/web/static/src/js/views/search_inputs.js
@@ -22,6 +22,7 @@ var Input = Widget.extend( /** @lends instance.web.search.Input# */{
*/
init: function (parent) {
this._super(parent);
+ this.searchview = parent;
this.load_attrs({});
},
/**
@@ -406,9 +407,17 @@ var ManyToOneField = CharField.extend({
// FIXME: "concurrent" searches (multiple requests, mis-ordered responses)
var context = pyeval.eval(
'contexts', [this.searchview.dataset.get_context()]);
+ var args = this.attrs.domain;
+ if (typeof args === 'string') {
+ try {
+ args = pyeval.eval('domain', args);
+ } catch(e) {
+ args = [];
+ }
+ }
return this.model.call('name_search', [], {
name: needle,
- args: (typeof this.attrs.domain === 'string') ? [] : this.attrs.domain,
+ args: args,
limit: 8,
context: context
}).then(function (results) {
@@ -433,7 +442,8 @@ var ManyToOneField = CharField.extend({
// to handle this as if it were a single value.
value = value[0];
}
- return this.model.call('name_get', [value]).then(function (names) {
+ var context = pyeval.eval('contexts', [this.searchview.dataset.get_context()]);
+ return this.model.call('name_get', [value], {context: context}).then(function (names) {
if (_(names).isEmpty()) { return null; }
return facet_from(self, names[0]);
});
diff --git a/addons/web/static/src/js/views/search_view.js b/addons/web/static/src/js/views/search_view.js
index 1dd1b217951..3511bbca01c 100644
--- a/addons/web/static/src/js/views/search_view.js
+++ b/addons/web/static/src/js/views/search_view.js
@@ -888,14 +888,15 @@ return Widget.extend({
},
expand: function () {
var self = this;
- this.current_result.expand(this.get_search_string()).then(function (results) {
+ var current_result = this.current_result;
+ current_result.expand(this.get_search_string()).then(function (results) {
(results || [{label: '(no result)'}]).reverse().forEach(function (result) {
result.indent = true;
var $li = self.make_list_item(result);
- self.current_result.$el.after($li);
+ current_result.$el.after($li);
});
- self.current_result.expanded = true;
- self.current_result.$el.find('span.oe-expand').html('▼');
+ current_result.expanded = true;
+ current_result.$el.find('span.oe-expand').html('▼');
});
},
fold: function () {
diff --git a/addons/web/static/src/js/widgets/sidebar.js b/addons/web/static/src/js/widgets/sidebar.js
index e0bdcd3f57c..5dc6c147f39 100644
--- a/addons/web/static/src/js/widgets/sidebar.js
+++ b/addons/web/static/src/js/widgets/sidebar.js
@@ -16,6 +16,7 @@ var Sidebar = Widget.extend({
init: function(parent) {
var self = this;
this._super(parent);
+ this.view = this.getParent();
this.sections = [
{ 'name' : 'print', 'label' : _t('Print'), },
{ 'name' : 'other', 'label' : _t('More'), }
diff --git a/addons/web/static/src/js/widgets/user_menu.js b/addons/web/static/src/js/widgets/user_menu.js
index fa5ea2bbdf7..dba1704c719 100644
--- a/addons/web/static/src/js/widgets/user_menu.js
+++ b/addons/web/static/src/js/widgets/user_menu.js
@@ -87,7 +87,7 @@ var SystrayMenu = Widget.extend({
framework.redirect('https://accounts.odoo.com/oauth2/auth?'+$.param(params));
}).fail(function(result, ev){
ev.preventDefault();
- framework.redirect('https://accounts.odoo.com/web');
+ framework.redirect('https://accounts.odoo.com/account');
});
}
},
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 7bc79aec9ea..f8f3c7191f3 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -609,12 +609,12 @@
</t>
<a class="oe_file_attachment" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url">
<t t-raw="item.label"/>
- <span t-if="section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">
+ <span t-if="widget.view.is_action_enabled('edit') &amp;&amp; section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">
<i class="fa fa-trash-o"/>
</span>
</a>
</li>
- <li t-if="section.name == 'files'" class="oe_sidebar_add_attachment">
+ <li t-if="widget.view.is_action_enabled('edit') &amp;&amp; section.name == 'files'" class="oe_sidebar_add_attachment">
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
@@ -1755,7 +1755,11 @@
<input type="number" class="field_integer form-control" value = "0" step="1"/>
</t>
<t t-name="SearchView.extended_search.proposition.float">
- <input type="number" class="field_float form-control" value = "0.0" step="0.01"/>
+ <input class="field_float form-control"
+ t-att-type="widget.decimal_point === '.' ? 'number' : 'text'"
+ t-attf-title="Number using #{widget.decimal_point || '.' } as decimal separator."
+ t-attf-pattern="[0-9]+([\\#{widget.decimal_point || '.' }][0-9]+)?"
+ t-attf-value="0#{widget.decimal_point || '.' }0" step="0.01"/>
</t>
<t t-name="SearchView.extended_search.proposition.selection">
<select class="form-control">
diff --git a/addons/web/static/test/search.js b/addons/web/static/test/search.js
index 84c6d0d3668..e1c6368aa09 100644
--- a/addons/web/static/test/search.js
+++ b/addons/web/static/test/search.js
@@ -339,7 +339,7 @@ odoo.define_section('search.defaults', ['web.search_inputs', 'web.SearchView', '
var ManyToOneField = core.search_widgets_registry.get('many2one');
var Facet = SearchView.Facet;
- var view = {inputs: []}, id = 4;
+ var view = {inputs: [], dataset: {get_context: function () {}}}, id = 4;
var f = new ManyToOneField(
{attrs: {name: 'dummy', string: 'Dummy'}},
{relation: 'dummy.model.name'},
@@ -375,7 +375,7 @@ odoo.define_section('search.defaults', ['web.search_inputs', 'web.SearchView', '
var ManyToOneField = core.search_widgets_registry.get('many2one');
var Facet = SearchView.Facet;
- var view = {inputs: []}, id = 5;
+ var view = {inputs: [], dataset: {get_context: function () {}}}, id = 5;
var f = new ManyToOneField(
{attrs: {name: 'dummy', string: 'Dummy'}},
{relation: 'dummy.model.name'},
@@ -402,7 +402,7 @@ odoo.define_section('search.defaults', ['web.search_inputs', 'web.SearchView', '
var ManyToOneField = core.search_widgets_registry.get('many2one');
- var view = {inputs: []}, id = 4;
+ var view = {inputs: [], dataset: {get_context: function () {}}}, id = 4;
var f = new ManyToOneField(
{attrs: {name: 'dummy', string: 'Dummy'}},
{relation: 'dummy.model.name'},