diff --git a/addons/board/static/src/less/dashboard.less b/addons/board/static/src/less/dashboard.less index b0b41e65e34..f12cadf75fa 100644 --- a/addons/board/static/src/less/dashboard.less +++ b/addons/board/static/src/less/dashboard.less @@ -114,6 +114,11 @@ .o_kanban_view .o_kanban_record .oe_kanban_list_many2many .o_form_field_many2manytags { border: none; } + + // Override height of graph. min-height doesn't do the trick + .o_graph { + height: 500px; + } } } } diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 84f033b0483..9b222f12922 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1428,6 +1428,9 @@ exports.Orderline = Backbone.Model.extend({ if (!no_map_tax){ tax = self._map_tax_fiscal_position(tax); } + if (!tax){ + return; + } if (tax.amount_type === 'group'){ var ret = self.compute_all(tax.children_tax_ids, price_unit, quantity, currency_rounding); total_excluded = ret.total_excluded; diff --git a/addons/stock/models/procurement.py b/addons/stock/models/procurement.py index 2ad0b3812ab..3c548ebd984 100644 --- a/addons/stock/models/procurement.py +++ b/addons/stock/models/procurement.py @@ -153,7 +153,7 @@ class ProcurementOrder(models.Model): qty_done = sum(self.move_ids.filtered(lambda move: move.state == 'done').mapped('product_uom_qty')) qty_left = max(self.product_qty - qty_done, 0) return { - 'name': self.name, + 'name': self.name[:2000], 'company_id': self.rule_id.company_id.id or self.rule_id.location_src_id.company_id.id or self.rule_id.location_id.company_id.id or self.company_id.id, 'product_id': self.product_id.id, 'product_uom': self.product_uom.id, diff --git a/addons/web/static/src/js/views/form_common.js b/addons/web/static/src/js/views/form_common.js index 65e94e671eb..2ac0e0a024f 100644 --- a/addons/web/static/src/js/views/form_common.js +++ b/addons/web/static/src/js/views/form_common.js @@ -716,7 +716,7 @@ var AbstractField = FormWidget.extend(FieldInterface, { } }, _toggle_label: function() { - var empty = this.get('effective_readonly') && this.is_false(); + var empty = this.get('effective_readonly') && !this.is_set(); this.$label.toggleClass('o_form_label_empty', empty).toggleClass('o_form_label_false', this.get('effective_readonly') && this.get('value') === false); this.$el.toggleClass('o_form_field_empty', empty); }, @@ -755,10 +755,21 @@ var AbstractField = FormWidget.extend(FieldInterface, { /** * Method useful to implement to ease validity testing. Must return true if the current * value is similar to false in OpenERP. + * Used at write time, in particular when the field is required */ is_false: function() { return this.get('value') === false; }, + + /** + * Method called at rendering time to determine if the field should be + * displayed (non-empty) or not (empty) + * We test the same thing as is_false but with different semantics + */ + is_set: function() { + return !this.is_false(); + }, + _check_css_flags: function() { var show_translate = (!this.get('effective_readonly') && this.field_manager.get('actual_mode') !== "create"); this.$translate.toggleClass('o_translate_active', !!show_translate); diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 2517b3c57b8..e8e9c450c3c 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -346,8 +346,8 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com if (!this.get("effective_readonly")) { this.$input.val(noValue ? "" : (str.split("\n")[0].trim() || $(data.noDisplayContent).text())); this.current_display = this.$input.val(); - this.$follow_button.toggle(!this.is_false()); - this.$el.toggleClass('o_with_button', !!this.$follow_button && this.$follow_button.length > 0 && !this.is_false()); + this.$follow_button.toggle(this.is_set()); + this.$el.toggleClass('o_with_button', !!this.$follow_button && this.$follow_button.length > 0 && this.is_set()); } else { this.$el.html(noValue ? "" : (_.escape(str.trim()).split("\n").join("
") || data.noDisplayContent)); // Define callback to perform when clicking on the field @@ -872,6 +872,10 @@ var FieldX2Many = AbstractManyField.extend({ is_false: function() { return _(this.dataset.ids).isEmpty(); }, + is_set: function() { + // always consider that field is "set" hence displayed + return true; + }, }); var X2ManyDataSet = data.BufferedDataSet.extend({ @@ -1718,6 +1722,10 @@ var FieldMany2ManyCheckBoxes = AbstractManyField.extend(common.ReinitializeField is_false: function() { return false; }, + is_set: function() { + // always consider that field is "set" hence displayed + return true; + }, }); core.form_widget_registry diff --git a/addons/web_kanban/static/src/js/kanban_column.js b/addons/web_kanban/static/src/js/kanban_column.js index 35ae2ae75c2..9007a5f4b82 100644 --- a/addons/web_kanban/static/src/js/kanban_column.js +++ b/addons/web_kanban/static/src/js/kanban_column.js @@ -65,9 +65,10 @@ var KanbanColumn = Widget.extend({ }); var self = this; - if (group_data.options && group_data.options.group_by_tooltip) { - this.tooltip_info = _.map(group_data.options.group_by_tooltip, function (key, value, list) { - return (self.values && self.values[value] && "
" +key + "
" + self.values[value] + "
") || ''; + if (group_data.options && group_data.options.group_by_tooltip && this.values) { + this.tooltip_info = _.map(group_data.options.group_by_tooltip, function (key, value) { + if (!self.values[value]) { return ''; } + return $('
').text(key + '
' + self.values[value]).text(); }).join(''); } else { this.tooltip_info = ""; diff --git a/doc/cla/individual/vuongtien2411.md b/doc/cla/individual/vuongtien2411.md new file mode 100644 index 00000000000..821a9881a43 --- /dev/null +++ b/doc/cla/individual/vuongtien2411.md @@ -0,0 +1,11 @@ +Vietnam, 2017-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, + +Do Vuong Tien tiendv@trobz.com https://github.com/vuongtien2411