summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorOdoo's Mergebot <xmo+roboto@odoo.com>2020-02-28 11:24:49 +0100
committerGitHub <noreply@github.com>2020-02-28 11:24:49 +0100
commit35e66df3e266695bcd2645cfbda7e8bd94e5a583 (patch)
tree674df9bbcf207b7d69119f97a3af3997330aa7c6 /addons/web/static/src
parentad5038ac74081d2dc31c3b777481402bbb2af682 (diff)
parent901f5bbd82304f1305b0190b9817666a901bed32 (diff)
[IMP] * : generic improvements
[IMP] sale_timesheet: add domain on sales order field ========================================== A domain has been added to the Sales Order field on project task so that the task and the so have the same commercial_partner_id. [IMP] sale: add kanban view for sale.order.line for better display on mobile ========================================================= For a SO line on mobile it was displaying only the name of the line without the SO number. It wasn't very practical for the users so we added this view to display the display_name instead. [IMP] web: change the default name of a column in kanban view ================================================= This changes the name of the column in kanban view when the records are grouped by date. The column name of the records with no date went from false to Undefined. Task-2188831 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#45646 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_column.js4
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_renderer.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_column.js b/addons/web/static/src/js/views/kanban/kanban_column.js
index 229046479f4..ab994628c8c 100644
--- a/addons/web/static/src/js/views/kanban/kanban_column.js
+++ b/addons/web/static/src/js/views/kanban/kanban_column.js
@@ -74,8 +74,8 @@ var KanbanColumn = Widget.extend({
this.record_options = _.clone(recordOptions);
- if (options.grouped_by_m2o) {
- // For many2one, a false value means that the field is not set.
+ if (options.grouped_by_m2o || options.grouped_by_date ) {
+ // For many2one and datetime, a false value means that the field is not set.
this.title = value ? value : _t('Undefined');
} else {
// False and 0 might be valid values for these fields.
diff --git a/addons/web/static/src/js/views/kanban/kanban_renderer.js b/addons/web/static/src/js/views/kanban/kanban_renderer.js
index b207f7f63d3..acf3fc7d7cd 100644
--- a/addons/web/static/src/js/views/kanban/kanban_renderer.js
+++ b/addons/web/static/src/js/views/kanban/kanban_renderer.js
@@ -503,9 +503,11 @@ var KanbanRenderer = BasicRenderer.extend({
// - is a date or datetime since we group by month or
// - is readonly (on the field attrs or in the view)
var draggable = true;
+ var grouped_by_date = false;
if (groupByFieldAttrs) {
if (groupByFieldAttrs.type === "date" || groupByFieldAttrs.type === "datetime") {
draggable = false;
+ grouped_by_date = true;
} else if (groupByFieldAttrs.readonly !== undefined) {
draggable = !(groupByFieldAttrs.readonly);
}
@@ -523,6 +525,7 @@ var KanbanRenderer = BasicRenderer.extend({
group_by_tooltip: groupByTooltip,
groupedBy: groupByField,
grouped_by_m2o: this.groupedByM2O,
+ grouped_by_date: grouped_by_date,
relation: relation,
quick_create: this.quickCreateEnabled && viewUtils.isQuickCreateEnabled(state),
});