From 109ddd9d0ca7760806aef959f55ce649f2036df0 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 3 Nov 2011 16:21:41 +0530 Subject: [PATCH 01/55] [IMP] Gantt View.Still need to improve for group by. bzr revid: vda@tinyerp.com-20111103105141-dahiz09fvu0l45bu --- .../lib/dhtmlxGantt/sources/dhtmlxcommon.js | 31 +++ .../lib/dhtmlxGantt/sources/dhtmlxgantt.js | 19 +- addons/web_gantt/static/src/js/gantt.js | 202 ++++++++++++++---- addons/web_gantt/static/src/xml/web_gantt.xml | 2 +- 4 files changed, 197 insertions(+), 57 deletions(-) diff --git a/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxcommon.js b/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxcommon.js index bc7de14346d..7f68a0a702c 100644 --- a/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxcommon.js +++ b/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxcommon.js @@ -2,6 +2,37 @@ Copyright DHTMLX LTD. http://www.dhtmlx.com To use this component please contact sales@dhtmlx.com to obtain license */ + +dhtmlx=function(obj){ + for (var a in obj) dhtmlx[a]=obj[a]; + return dhtmlx; //simple singleton +}; +dhtmlx.extend_api=function(name,map,ext){ + var t = window[name]; + if (!t) return; //component not defined + window[name]=function(obj){ + if (obj && typeof obj == "object" && !obj.tagName){ + var that = t.apply(this,(map._init?map._init(obj):arguments)); + //global settings + for (var a in dhtmlx) + if (map[a]) this[map[a]](dhtmlx[a]); + //local settings + for (var a in obj){ + if (map[a]) this[map[a]](obj[a]); + else if (a.indexOf("on")==0){ + this.attachEvent(a,obj[a]); + } + } + } else + var that = t.apply(this,arguments); + if (map._patch) map._patch(this); + return that||this; + }; + window[name].prototype=t.prototype; + if (ext) + dhtmlXHeir(window[name].prototype,ext); +}; + dhtmlxAjax={ get:function(url,callback){ var t=new dtmlXMLLoaderObject(true); diff --git a/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxgantt.js b/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxgantt.js index 0d838fdd510..52b9b562e96 100644 --- a/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxgantt.js +++ b/addons/web_gantt/static/lib/dhtmlxGantt/sources/dhtmlxgantt.js @@ -173,9 +173,8 @@ GanttProjectInfo.prototype.getTaskByIdInTree = function(parentTask, id) * @type: public * @topic: 0 */ -function GanttTaskInfo(id, name, est, duration, percentCompleted, predecessorTaskId, color) +function GanttTaskInfo(id, name, est, duration, percentCompleted, predecessorTaskId) { - this.color = color || "white"; this.Id = id; this.Name = name; this.EST = est; @@ -349,7 +348,7 @@ GanttProject.prototype.create = function() * @type: public * @topic: 0 */ -function GanttChart(day_length) +function GanttChart() { this.Error = new GanttError(); this.dhtmlXMLSenderObject = new dhtmlXMLSenderObject(this); @@ -357,7 +356,7 @@ function GanttChart(day_length) //settings this.heightTaskItem = 12; this.dayInPixels = 24; - this.hoursInDay = day_length; + this.hoursInDay = 8; this._showTreePanel = true; this._showTooltip = true; this.isShowDescTask = false; @@ -1162,7 +1161,7 @@ GanttProject.prototype.deleteChildTask = function(task) * @type: public * @topic: 1 */ -GanttProject.prototype.insertTask = function(id, name, EST, Duration, PercentCompleted, predecessorTaskId, color, parentTaskId) +GanttProject.prototype.insertTask = function(id, name, EST, Duration, PercentCompleted, predecessorTaskId, parentTaskId) { var task = null; var _task = null; @@ -1205,7 +1204,7 @@ GanttProject.prototype.insertTask = function(id, name, EST, Duration, PercentCom return false; } - task = new GanttTaskInfo(id, name, EST, Duration, PercentCompleted, predecessorTaskId, color); + task = new GanttTaskInfo(id, name, EST, Duration, PercentCompleted, predecessorTaskId); if (!this.Chart.checkPosParentTask(parentTask, task)) { this.Chart.Error.throwError("DATA_INSERT_ERROR", 19, [parentTaskId,id]); @@ -4870,13 +4869,11 @@ GanttTask.prototype.createTaskItem = function() cellTblTask.height = this.Chart.heightTaskItem + "px"; cellTblTask.width = this.TaskInfo.PercentCompleted + "%"; cellTblTask.style.lineHeight = "1px"; - cellTblTask.style.backgroundColor = self.TaskInfo.color; - var imgPr = document.createElement("img"); imgPr.style.width = (this.TaskInfo.PercentCompleted * this.TaskInfo.Duration * this.Chart.hourInPixelsWork) / 100 + "px"; imgPr.style.height = this.Chart.heightTaskItem + "px"; cellTblTask.appendChild(imgPr); - //imgPr.src = this.Chart.imgs + "progress_filled.png"; + imgPr.src = this.Chart.imgs + "progress_filled.png"; } if (this.TaskInfo.PercentCompleted != 100) @@ -4946,9 +4943,9 @@ GanttTask.prototype.createTaskItem = function() } var taskClick = function() { - self.Chart.callEvent("onTaskDblClick", [self]); + self.Chart.callEvent("onTaskClick", [self]); }; - this.addEvent(divMove, 'dblclick', taskClick, false); + this.addEvent(divMove, 'click', taskClick, false); if (this.Chart.isEditable) { diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index bdd57b7bf0a..3ba19a67c98 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -2,7 +2,9 @@ * OpenERP web_gantt *---------------------------------------------------------*/ openerp.web_gantt = function (openerp) { +var _t = openerp.web._t; var QWeb = openerp.web.qweb; + QWeb.add_template('/web_gantt/static/src/xml/web_gantt.xml'); openerp.web.views.add('gantt', 'openerp.web_gantt.GanttView'); openerp.web_gantt.GanttView = openerp.web.View.extend({ @@ -13,68 +15,167 @@ init: function(parent, dataset, view_id) { this.dataset = dataset; this.model = dataset.model; this.view_id = view_id; - this.fields_views = {}; - this.widgets = {}; - this.widgets_counter = 0; - this.fields = this.dataset.fields ? this.dataset.fields: {}; - this.ids = this.dataset.ids; - this.name = ""; - this.date_start = ""; - this.date_delay = ""; - this.date_stop = ""; - this.color_field = ""; - this.colors = []; - this.color_values = []; - this.calendar_fields = {}; - this.info_fields = []; - this.domain = this.dataset._domain ? this.dataset._domain: []; + this.domain = this.dataset.domain || []; + this.groupby = []; this.context = this.dataset.context || {}; + this.has_been_loaded = $.Deferred(); +// this.ganttChartControl = new GanttChart(); + this.COLOR_PALETTE = ['#ccccff', '#cc99ff', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400', + '#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f', + '#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00', + '#905000', '#9b0000', '#840067', '#510090', '#0000c9', '#009b00', '#9abe00', '#ffc900']; }, start: function() { this._super(); - this.rpc("/web/view/load", {"model": this.model, "view_id": this.view_id, "view_type": "gantt"}, this.on_loaded); + return this.rpc("/web/view/load", {"model": this.model, "view_id": this.view_id, "view_type": "gantt"}, this.on_loaded); }, on_loaded: function(data) { - - var self = this; - this.fields_view = data; - - this.name = this.fields_view.arch.attrs.string; - this.view_id = this.fields_view.view_id; - - this.date_start = this.fields_view.arch.attrs.date_start; - this.date_delay = this.fields_view.arch.attrs.date_delay; - this.date_stop = this.fields_view.arch.attrs.date_stop; - - this.color_field = this.fields_view.arch.attrs.color; + this.fields_view = data, + this.name = this.fields_view.arch.attrs.string, + this.view_id = this.fields_view.view_id, + this.fields = this.fields_view.fields; + + this.date_start = this.fields_view.arch.attrs.date_start, + this.date_delay = this.fields_view.arch.attrs.date_delay, + this.date_stop = this.fields_view.arch.attrs.date_stop, this.day_length = this.fields_view.arch.attrs.day_length || 8; + + this.color_field = this.fields_view.arch.attrs.color, this.colors = this.fields_view.arch.attrs.colors; - var arch_children = this.fields_view.arch.children[0]; - this.text = arch_children.children[0] ? arch_children.children[0].attrs.name : arch_children.attrs.name; - this.parent = this.fields_view.arch.children[0].attrs.link; - - this.format = "yyyy-MM-dd"; - this.grp = []; - - self.create_gantt(); - self.get_events(); - - this.$element.html(QWeb.render("GanttView", {"view": this, "fields_view": this.fields_view})); - + + var level = this.fields_view.arch.children[0]; + this.parent = level.attrs.link, + this.text = level.children.length ? level.children[0].attrs.name : level.attrs.name; + + this.$element.html(QWeb.render("GanttView", {'height': $('.oe-application-container').height(), 'width': $('.oe-application-container').width()})); + this.has_been_loaded.resolve(); + }, + + on_project_loaded: function(projects) { + + if(!projects.length) return; + var self = this, + unstarted_project = _.detect(projects, function(res) { + return !res[self.date_start]; + }); + + if(unstarted_project) return self.do_warn(_t("Start date is not defined "), unstarted_project.id); + + $.when(this.project_starting_date(projects), this.project_duration(projects), this.calculate_difference()) + .done(function() { + var Project = new GanttProjectInfo(0, self.name, self.project_start_date), + Task = new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, ""); + $.when(self.add_tasks(projects, Task)) + .done(function() { + self.init_gantt_view(Project, Task); + }) + }); + }, + + project_duration: function(projects) { + + var self = this; + this.project_duration = []; + + _.each(projects, function(project, index) { + if (this.date_stop && project[this.date_stop]) { + //ToDO + console.log('TODO for date_stop'); + self.project_duration.push(0); + } else if(self.date_delay && project[self.date_delay]) { + self.project_duration.push(project[self.date_delay]); + } else { + self.project_duration.push(0); + } + }); + + this.max_project_duration = _.max(this.project_duration); + + return $.Deferred().resolve().promise(); + }, + + calculate_difference: function() { + + + var extend_end_date_day = Math.floor(this.max_project_duration / this.day_length), + extend_end_date_hours = this.max_project_duration % this.day_length; + + this.project_end_date = this.project_end_date.add({days: extend_end_date_day, hours: extend_end_date_hours}) + + var DAY = 1000 * 60 * 60 * 24, + difference = Math.abs(this.project_start_date.getTime() - this.project_end_date.getTime()), + day = Math.ceil(difference / DAY), + hour = (difference % DAY)/(1000 * 60 * 60), + DiffHour = (day * this.day_length) + hour; + + this.total_duration = parseFloat(DiffHour.toFixed(2)); + return $.Deferred().resolve().promise(); + }, + + add_tasks: function(tasks, parentTask) { + var self = this; + + _.each(tasks, function(task, index) { + parentTask.addChildTask(new GanttTaskInfo(task.id, task.name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); + }); + + return $.Deferred().resolve().promise(); + }, + + project_starting_date : function(projects) { + var self = this; + var min_date = _.min(projects, function(prj) { + return new Date(prj[self.date_start]); + }); + + var max_date = _.max(projects, function(prj) { + return self.format_date(prj[self.date_start]) + }); + this.project_end_date = this.format_date(max_date[self.date_start]); + if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); + else + this.project_start_date = Date.today(); + + return $.Deferred().resolve().promise(); }, - create_gantt: function() { + init_gantt_view: function(Project, Task) { + Project.addTask(Task); + ganttChartControl = new GanttChart(); - ganttChartControl = new GanttChart(this.day_length); + // Setup paths and behavior ganttChartControl.setImagePath("/web_gantt/static/lib/dhtmlxGantt/codebase/imgs/"); ganttChartControl.setEditable(true); ganttChartControl.showTreePanel(true); ganttChartControl.showContextMenu(false); ganttChartControl.showDescTask(true,'d,s-f'); ganttChartControl.showDescProject(true,'n,d'); - + // Load data structure + ganttChartControl.addProject(Project); + ganttChartControl.create('GanttView'); + // Create Gantt control + + }, + + add_project_info: function(smalldate, project, index) { + + }, + + format_date : function(date) { + var datetime_regex = /^(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)(?:\.\d+)?$/, + date_regex = /^\d\d\d\d-\d\d-\d\d$/, + time_regex = /^(\d\d:\d\d:\d\d)(?:\.\d+)?$/, + def = $.Deferred(); + if(date_regex.exec(date)) { + this.date_format = "yyyy-MM-dd"; + } else if(time_regex.exec(date)) { + this.date_format = "HH:mm:ss"; + } else { + this.date_format = "yyyy-MM-dd HH:mm:ss"; + } + return openerp.web.auto_str_to_date(date); }, get_events: function() { @@ -502,8 +603,19 @@ init: function(parent, dataset, view_id) { do_search: function (domains, contexts, groupbys) { var self = this; - this.grp = groupbys; - self.reload_gantt(); + this.group_by = groupbys; + $.when(this.has_been_loaded).then(function() { + self.dataset + .read_slice(_.keys(self.fields), { + domain: domains, + context: contexts, + group_by: groupbys + }) + .done(function(projects) { + self.on_project_loaded(projects); + }); + }) + } }); diff --git a/addons/web_gantt/static/src/xml/web_gantt.xml b/addons/web_gantt/static/src/xml/web_gantt.xml index d064d6e9ef2..48a1a1025dd 100644 --- a/addons/web_gantt/static/src/xml/web_gantt.xml +++ b/addons/web_gantt/static/src/xml/web_gantt.xml @@ -1,5 +1,5 @@ From 8224421647c6b40876c3b341c76c9b2c4587ea47 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 3 Nov 2011 17:32:52 +0530 Subject: [PATCH 02/55] [FIX] added events. bzr revid: vda@tinyerp.com-20111103120252-ius83ekv8dz54wgl --- addons/web_gantt/static/src/js/gantt.js | 440 +++--------------------- 1 file changed, 56 insertions(+), 384 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 3ba19a67c98..931579502f1 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -49,6 +49,10 @@ init: function(parent, dataset, view_id) { this.parent = level.attrs.link, this.text = level.children.length ? level.children[0].attrs.name : level.attrs.name; + if (!this.date_start) { + return self.do_warn(_t("date_start is not defined ")) + } + this.$element.html(QWeb.render("GanttView", {'height': $('.oe-application-container').height(), 'width': $('.oe-application-container').width()})); this.has_been_loaded.resolve(); }, @@ -57,20 +61,18 @@ init: function(parent, dataset, view_id) { if(!projects.length) return; var self = this, - unstarted_project = _.detect(projects, function(res) { - return !res[self.date_start]; + started_projects = _.filter(projects, function(res) { + return res[self.date_start]; }); - if(unstarted_project) return self.do_warn(_t("Start date is not defined "), unstarted_project.id); - - $.when(this.project_starting_date(projects), this.project_duration(projects), this.calculate_difference()) + $.when(this.project_starting_date(started_projects), this.project_duration(started_projects), this.calculate_difference()) .done(function() { var Project = new GanttProjectInfo(0, self.name, self.project_start_date), Task = new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, ""); - $.when(self.add_tasks(projects, Task)) + $.when(self.add_tasks(started_projects, Task)) .done(function() { self.init_gantt_view(Project, Task); - }) + }); }); }, @@ -142,8 +144,10 @@ init: function(parent, dataset, view_id) { }, init_gantt_view: function(Project, Task) { + Project.addTask(Task); - ganttChartControl = new GanttChart(); + var self = this, + ganttChartControl = new GanttChart(); // Setup paths and behavior ganttChartControl.setImagePath("/web_gantt/static/lib/dhtmlxGantt/codebase/imgs/"); @@ -157,9 +161,18 @@ init: function(parent, dataset, view_id) { ganttChartControl.create('GanttView'); // Create Gantt control - }, - - add_project_info: function(smalldate, project, index) { + + // Setup Events + ganttChartControl.attachEvent("onTaskStartDrag", function(task) { + var task_date = task.getEST(); + if(task_date.getHours()) { + task_date.set({hour: task_date.getHours(), minute : task_date.getMinutes(), second:0}); + } + }); + ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); + ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); + + ganttChartControl.attachEvent("onTaskDblClick", function(task) { return self.editTask(task);}); }, @@ -177,320 +190,38 @@ init: function(parent, dataset, view_id) { } return openerp.web.auto_str_to_date(date); }, - - get_events: function() { - - var self = this; - this.dataset.read_slice([],{}, function(result) { - self.load_event(result); - }); - - }, - - load_event: function(events) { - - var self = this; - var result = events; - var smalldate = ""; - - COLOR_PALETTE = ['#ccccff', '#cc99ff', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400', - '#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f', - '#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00', - '#905000', '#9b0000', '#840067', '#510090', '#0000c9', '#009b00', '#9abe00', '#ffc900']; - - if (result.length != 0){ - var show_event = []; - for (var i in result){ - var res = result[i]; - if (res[this.date_start] != false){ - - var start_date = this.convert_str_date(res[this.date_start]); - res[this.date_start] = start_date; - show_event.push(res); - if (smalldate == ""){ - smalldate = start_date; - } - else{ - if (start_date < smalldate){ - smalldate = start_date; - } - } - } - } - if (smalldate == ""){ - smalldate = Date.today(); - } - project = new GanttProjectInfo("_1", "", smalldate); - ganttChartControl.addProject(project); - } - - //create child - var k = 0; - var color_box = {}; - var parents = {}; - var all_events = {}; - var child_event = {}; - var temp_id = ""; - var final_events = []; - for (var i in show_event) { - - var res = show_event[i]; - - var id = res['id']; - var text = res[this.text]; - var start_date = res[this.date_start]; - - var color = res[this.color_field][0] || res[this.color_field]; - if (color_box[color] == undefined){ - color_box[color] = COLOR_PALETTE[k]; - k += 1; - } - - if (this.date_stop != undefined){ - if (res[this.date_stop] != false){ - var stop_date = this.convert_str_date(res[this.date_stop]); - var duration= self.hours_between(start_date, stop_date); - } - else{ - var duration = 0; - } - } - else{ - var duration = res[this.date_delay]; - } - if (!duration) - duration = 0; - - if (self.grp.length){ - for (var j in self.grp){ - var grp_key = res[self.grp[j]['group_by']]; - if (typeof(grp_key) == "object"){ - grp_key = res[self.grp[j]['group_by']][1]; - } - else{ - grp_key = res[self.grp[j]['group_by']]; - } - - if (!grp_key){ - grp_key = "Undefined"; - } - - if (j == 0){ - if (parents[grp_key] == undefined){ - var mod_id = i+ "_" +j; - parents[grp_key] = mod_id; - child_event[mod_id] = {}; - all_events[mod_id] = {'parent': "", 'evt':[mod_id , grp_key, start_date, start_date, 100, "", "white"]}; - } - else{ - mod_id = parents[grp_key]; - } - temp_id = mod_id; - }else{ - if (child_event[mod_id][grp_key] == undefined){ - var ch_mod_id = i+ "_" +j; - child_event[mod_id][grp_key] = ch_mod_id; - child_event[ch_mod_id] = {}; - temp_id = ch_mod_id; - all_events[ch_mod_id] = {'parent': mod_id, 'evt':[ch_mod_id , grp_key, start_date, start_date, 100, "","white"]}; - mod_id = ch_mod_id; - } - else{ - mod_id = child_event[mod_id][grp_key]; - temp_id = mod_id; - } - } - } - all_events[id] = {'parent': temp_id, 'evt':[id , text, start_date, duration, 100, "", color_box[color]]}; - final_events.push(id); - } - else { - if (i == 0) { - var mod_id = "_" + i; - all_events[mod_id] = {'parent': "", 'evt': [mod_id, this.name, start_date, start_date, 100, "", "white"]}; - } - all_events[id] = {'parent': mod_id, 'evt':[id , text, start_date, duration, 100, "", color_box[color]]}; - final_events.push(id); - } - } - - for (var i in final_events){ - var evt_id = final_events[i]; - var evt_date = all_events[evt_id]['evt'][2]; - while (all_events[evt_id]['parent'] != "") { - var parent_id =all_events[evt_id]['parent']; - if (all_events[parent_id]['evt'][2] > evt_date){ - all_events[parent_id]['evt'][2] = evt_date; - } - evt_id = parent_id; - } - } - var evt_id = []; - var evt_date = ""; - var evt_duration = ""; - var evt_end_date = ""; - var project_tree_field = []; - for (var i in final_events){ - evt_id = final_events[i]; - evt_date = all_events[evt_id]['evt'][2]; - evt_duration = all_events[evt_id]['evt'][3]; - - var evt_str_date = this.convert_date_str(evt_date); - evt_end_date = this.end_date(evt_str_date, evt_duration); - - while (all_events[evt_id]['parent'] != "") { - var parent_id =all_events[evt_id]['parent']; - if (all_events[parent_id]['evt'][3] < evt_end_date){ - all_events[parent_id]['evt'][3] = evt_end_date; - } - evt_id = parent_id; - } - } - - for (var j in self.grp) { - self.render_events(all_events, j); - } - - if (!self.grp.length) { - self.render_events(all_events, 0); - } - - for (var i in final_events) { - evt_id = final_events[i]; - res = all_events[evt_id]; - task=new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], "",res['evt'][6]); - prt = project.getTaskById(res['parent']); - prt.addChildTask(task); - } - - var oth_hgt = 264; - var min_hgt = 150; - var name_min_wdt = 150; - var gantt_hgt = jQuery(window).height() - oth_hgt; - var search_wdt = jQuery("#oe_app_search").width(); - - if (gantt_hgt > min_hgt){ - jQuery('#GanttDiv').height(gantt_hgt).width(search_wdt); - } else{ - jQuery('#GanttDiv').height(min_hgt).width(search_wdt); - } - - ganttChartControl.create("GanttDiv"); - ganttChartControl.attachEvent("onTaskStartDrag", function(task) {self.on_drag_start(task);}); - ganttChartControl.attachEvent("onTaskEndResize", function(task) {self.on_resize_drag_end(task, "resize");}); - ganttChartControl.attachEvent("onTaskEndDrag", function(task) {self.on_resize_drag_end(task, "drag");}); + + ResizeTask: function(task) { - ganttChartControl.attachEvent("onTaskDblClick", function(task) {self.open_popup(task);}); + var event_id = task.getId(); - var taskdiv = jQuery("div.taskPanel").parent(); - taskdiv.addClass('ganttTaskPanel'); - taskdiv.prev().addClass('ganttDayPanel'); - var $gantt_panel = jQuery(".ganttTaskPanel , .ganttDayPanel"); - - var ganttrow = jQuery('.taskPanel').closest('tr'); - var gtd = ganttrow.children(':first-child'); - gtd.children().addClass('task-name'); - - jQuery(".toggle-sidebar").click(function(e) { - self.set_width(); - }); - - jQuery(window).bind('resize',function() { - window.clearTimeout(ganttChartControl._resize_timer); - ganttChartControl._resize_timer = window.setTimeout(function(){ - self.reload_gantt(); - }, 200); - }); - - jQuery("div #_1, div #_1 + div").hide(); - }, - - set_width: function() { - - $gantt_panel.width(1); - jQuery(".ganttTaskPanel").parent().width(1); - - var search_wdt = jQuery("#oe_app_search").width(); - var day_wdt = jQuery(".ganttDayPanel").children().children().width(); - jQuery('#GanttDiv').css('width','100%'); - - if (search_wdt - day_wdt <= name_min_wdt){ - jQuery(".ganttTaskPanel").parent().width(search_wdt - name_min_wdt); - jQuery(".ganttTaskPanel").width(search_wdt - name_min_wdt); - jQuery(".ganttDayPanel").width(search_wdt - name_min_wdt - 14); - jQuery('.task-name').width(name_min_wdt); - jQuery('.task-name').children().width(name_min_wdt); - }else{ - jQuery(".ganttTaskPanel").parent().width(day_wdt); - jQuery(".ganttTaskPanel").width(day_wdt); - jQuery(".taskPanel").width(day_wdt - 16); - jQuery(".ganttDayPanel").width(day_wdt -16); - jQuery('.task-name').width(search_wdt - day_wdt); - jQuery('.task-name').children().width(search_wdt - day_wdt); + + if(!event_id) + return this.do_warn(_t("Project can not be resized")); + + var data = {}; + data[this.date_start] = task.getEST().toString(this.date_format); + + if(this.date_stop) { + var diff = task.getDuration() % this.day_length, + finished_date = task.getFinishDate().add({hours: diff}); + data[this.date_stop] = finished_date.toString(this.date_format); + } else { + data[this.date_delay] = task.getDuration(); } - + this.dataset + .write(event_id, data, {}) + .done(function() { + self.reloadView(); + }); }, - - end_date: function(dat, duration) { - - var self = this; - - var dat = this.convert_str_date(dat); - - var day = Math.floor(duration/self.day_length); - var hrs = duration % self.day_length; - - dat.add(day).days(); - dat.add(hrs).hour(); - - return dat; - }, - - hours_between: function(date1, date2, parent_task) { - - var ONE_DAY = 1000 * 60 * 60 * 24; - var date1_ms = date1.getTime(); - var date2_ms = date2.getTime(); - var difference_ms = Math.abs(date1_ms - date2_ms); - - var d = parent_task? Math.ceil(difference_ms / ONE_DAY) : Math.floor(difference_ms / ONE_DAY); - var h = (difference_ms % ONE_DAY)/(1000 * 60 * 60); - var num = (d * this.day_length) + h; - return parseFloat(num.toFixed(2)); - - }, - - render_events : function(all_events, j) { - - var self = this; - for (var i in all_events){ - var res = all_events[i]; - if ((typeof(res['evt'][3])) == "object"){ - res['evt'][3] = self.hours_between(res['evt'][2],res['evt'][3], true); - } - - k = res['evt'][0].toString().indexOf('_'); - - if (k != -1) { - if (res['evt'][0].substring(k) == "_"+j){ - if (j == 0){ - task = new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], "",res['evt'][6]); - project.addTask(task); - } else { - task = new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], "",res['evt'][6]); - prt = project.getTaskById(res['parent']); - prt.addChildTask(task); - } - } - } - } - }, - - open_popup : function(task) { + + editTask: function(task) { var self = this; var event_id = task.getId(); - if(event_id.toString().search("_") != -1) - return; + if(!event_id) + return false; + if(event_id) event_id = parseInt(event_id, 10); var action_manager = new openerp.web.ActionManager(this); @@ -506,7 +237,7 @@ init: function(parent, dataset, view_id) { var form_view = action_manager.inner_viewmanager.views.form.controller; form_view.do_save(function() { - self.get_events(); + self.reloadView(); }); $(this).dialog('destroy'); } @@ -528,35 +259,9 @@ init: function(parent, dataset, view_id) { } }); }, - - on_drag_start : function(task){ - var st_date = task.getEST(); - if(st_date.getHours()){ - self.hh = st_date.getHours(); - self.mm = st_date.getMinutes(); - } - }, - - on_resize_drag_end : function(task, evt){ - - var event_id = task.getId(); - var data = {}; - - if(event_id.toString().search("_") != -1) - return; - if (evt == "drag"){ - full_date = task.getEST().set({hour: self.hh, minute : self.mm, second:0}); - data[this.date_start] = this.convert_date_str(full_date); - } - if (this.date_stop != undefined){ - tm = (task.getDuration() % this.day_length); - stp = task.getFinishDate().add(tm).hour(); - data[this.date_stop] = this.convert_date_str(stp); - }else{ - data[this.date_delay] = task.getDuration(); - } - this.dataset.write(event_id, data, {}, function(result) {}); - + + reloadView: function() { + self.on_project_loaded(self.database_projects); }, do_show: function () { @@ -567,51 +272,18 @@ init: function(parent, dataset, view_id) { this.$element.hide(); }, - convert_str_date: function (str){ - if (str.length == 19){ - this.format = "yyyy-MM-dd HH:mm:ss"; - return openerp.web.str_to_datetime(str); - } else if (str.length == 10){ - this.format = "yyyy-MM-dd"; - return openerp.web.str_to_date(str); - } else if (str.length == 8){ - this.format = "HH:mm:ss"; - return openerp.web.str_to_time(str); - } - throw "Unrecognized date/time format"; - }, - - convert_date_str: function(full_date) { - if (this.format == "yyyy-MM-dd HH:mm:ss"){ - return openerp.web.datetime_to_str(full_date); - } else if (this.format == "yyyy-MM-dd"){ - return openerp.web.date_to_str(full_date); - } else if (this.format == "HH:mm:ss"){ - return openerp.web.time_to_str(full_date); - } - throw "Unrecognized date/time format"; - }, - - reload_gantt: function() { - var self = this; - this.dataset.read_slice([],{}, function(response) { - ganttChartControl.clearAll(); - jQuery("#GanttDiv").children().remove(); - self.load_event(response); - }); - }, - do_search: function (domains, contexts, groupbys) { var self = this; this.group_by = groupbys; $.when(this.has_been_loaded).then(function() { self.dataset - .read_slice(_.keys(self.fields), { + .read_slice([], { domain: domains, context: contexts, group_by: groupbys }) .done(function(projects) { + self.database_projects = projects; self.on_project_loaded(projects); }); }) From 11826b8e57bb854cb50bb4b4952f71dff3778b26 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 3 Nov 2011 17:56:35 +0530 Subject: [PATCH 03/55] [FIX] Clear GanttView. bzr revid: vda@tinyerp.com-20111103122635-k5fbv5dau3gizygb --- addons/web_gantt/static/src/js/gantt.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 931579502f1..ff2c072111f 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -65,8 +65,12 @@ init: function(parent, dataset, view_id) { return res[self.date_start]; }); - $.when(this.project_starting_date(started_projects), this.project_duration(started_projects), this.calculate_difference()) + $.when(this.project_starting_date(started_projects), this.get_project_duration(started_projects), this.calculate_difference()) .done(function() { + if(self.ganttChartControl) { + self.ganttChartControl.clearAll(); + self.$element.find('#GanttView').empty(); + } var Project = new GanttProjectInfo(0, self.name, self.project_start_date), Task = new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, ""); $.when(self.add_tasks(started_projects, Task)) @@ -76,13 +80,13 @@ init: function(parent, dataset, view_id) { }); }, - project_duration: function(projects) { + get_project_duration: function(projects) { var self = this; this.project_duration = []; _.each(projects, function(project, index) { - if (this.date_stop && project[this.date_stop]) { + if (self.date_stop && project[self.date_stop]) { //ToDO console.log('TODO for date_stop'); self.project_duration.push(0); @@ -94,13 +98,10 @@ init: function(parent, dataset, view_id) { }); this.max_project_duration = _.max(this.project_duration); - return $.Deferred().resolve().promise(); }, calculate_difference: function() { - - var extend_end_date_day = Math.floor(this.max_project_duration / this.day_length), extend_end_date_hours = this.max_project_duration % this.day_length; @@ -139,15 +140,15 @@ init: function(parent, dataset, view_id) { if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); else this.project_start_date = Date.today(); - return $.Deferred().resolve().promise(); }, init_gantt_view: function(Project, Task) { Project.addTask(Task); - var self = this, - ganttChartControl = new GanttChart(); + var self = this; + + var ganttChartControl = this.ganttChartControl = new GanttChart(); // Setup paths and behavior ganttChartControl.setImagePath("/web_gantt/static/lib/dhtmlxGantt/codebase/imgs/"); @@ -275,6 +276,7 @@ init: function(parent, dataset, view_id) { do_search: function (domains, contexts, groupbys) { var self = this; this.group_by = groupbys; + $.when(this.has_been_loaded).then(function() { self.dataset .read_slice([], { From 0fc1f948c49e9508996b4ec53285cef900ef1b96 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 3 Nov 2011 18:45:51 +0530 Subject: [PATCH 04/55] [FIX] Add parent field if name not defined. bzr revid: vda@tinyerp.com-20111103131551-3j8ofmslyfmxjhj2 --- addons/web_gantt/static/src/js/gantt.js | 30 ++++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index ff2c072111f..3ca05b7d24c 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -16,10 +16,8 @@ init: function(parent, dataset, view_id) { this.model = dataset.model; this.view_id = view_id; this.domain = this.dataset.domain || []; - this.groupby = []; this.context = this.dataset.context || {}; this.has_been_loaded = $.Deferred(); -// this.ganttChartControl = new GanttChart(); this.COLOR_PALETTE = ['#ccccff', '#cc99ff', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400', '#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f', '#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00', @@ -65,19 +63,34 @@ init: function(parent, dataset, view_id) { return res[self.date_start]; }); + if(!self.name) { + var name = started_projects[0][self.parent]; + self.name = name instanceof Array? name[name.length - 1] : name; + } + $.when(this.project_starting_date(started_projects), this.get_project_duration(started_projects), this.calculate_difference()) - .done(function() { + .then(function() { if(self.ganttChartControl) { self.ganttChartControl.clearAll(); self.$element.find('#GanttView').empty(); } + }).then(this.group_projects(started_projects)) + .done(function() { + var Project = new GanttProjectInfo(0, self.name, self.project_start_date), Task = new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, ""); $.when(self.add_tasks(started_projects, Task)) .done(function() { self.init_gantt_view(Project, Task); }); - }); + }) + }, + + group_projects: function(projects) { + var def = $.Deferred(), + self = this; + if (!this.group_by.length) return def.resolve().promise(); + return def.resolve().promise(); }, get_project_duration: function(projects) { @@ -121,7 +134,13 @@ init: function(parent, dataset, view_id) { var self = this; _.each(tasks, function(task, index) { - parentTask.addChildTask(new GanttTaskInfo(task.id, task.name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); + var name = task[self.text]; + if(task[self.text] instanceof Array) { + name = task[self.text][1]; + } + parentTask.addChildTask( + new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "") + ); }); return $.Deferred().resolve().promise(); @@ -276,7 +295,6 @@ init: function(parent, dataset, view_id) { do_search: function (domains, contexts, groupbys) { var self = this; this.group_by = groupbys; - $.when(this.has_been_loaded).then(function() { self.dataset .read_slice([], { From 119a277cd9b6863678a988c2e0e302443d03629a Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Fri, 4 Nov 2011 18:32:08 +0530 Subject: [PATCH 05/55] [FIX] Generate Groups. bzr revid: vda@tinyerp.com-20111104130208-i7xujd6mv2jm48fe --- addons/web_gantt/static/src/js/gantt.js | 105 +++++++++++++++--------- 1 file changed, 66 insertions(+), 39 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 3ca05b7d24c..12cd687b978 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -18,10 +18,6 @@ init: function(parent, dataset, view_id) { this.domain = this.dataset.domain || []; this.context = this.dataset.context || {}; this.has_been_loaded = $.Deferred(); - this.COLOR_PALETTE = ['#ccccff', '#cc99ff', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400', - '#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f', - '#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00', - '#905000', '#9b0000', '#840067', '#510090', '#0000c9', '#009b00', '#9abe00', '#ffc900']; }, start: function() { @@ -63,39 +59,70 @@ init: function(parent, dataset, view_id) { return res[self.date_start]; }); + this.database_projects = started_projects; + if(!self.name) { var name = started_projects[0][self.parent]; self.name = name instanceof Array? name[name.length - 1] : name; } - $.when(this.project_starting_date(started_projects), this.get_project_duration(started_projects), this.calculate_difference()) + $.when(this.project_starting_date(), this.get_project_duration(), this.calculate_difference()) .then(function() { if(self.ganttChartControl) { self.ganttChartControl.clearAll(); self.$element.find('#GanttView').empty(); } - }).then(this.group_projects(started_projects)) - .done(function() { - - var Project = new GanttProjectInfo(0, self.name, self.project_start_date), - Task = new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, ""); - $.when(self.add_tasks(started_projects, Task)) - .done(function() { - self.init_gantt_view(Project, Task); - }); }) + .then(this.group_projects()) + .then(this.generate_projects()) + .then(this.add_tasks()) + .done(this.init_gantt_view()); }, - group_projects: function(projects) { - var def = $.Deferred(), + generate_projects : function() { + var projects = this.database_projects, self = this; + + this.GanttProjects = [], + this.GanttTasks = []; + if(this.GroupProject) { + _.each(this.GroupProject, function(grp, index) { + self.GanttProjects.push(new GanttProjectInfo(index, grp, self.project_start_date)); + self.GanttTasks.push(new GanttTaskInfo(index, grp, self.project_start_date, self.total_duration, 100, "")); + }); + } else { + this.GanttProjects.push(new GanttProjectInfo(0, self.name, self.project_start_date)); + this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); + } + + return $.Deferred().resolve().promise(); + }, + + group_projects: function() { + var def = $.Deferred(), + self = this, + projects = this.database_projects; + if (!this.group_by.length) return def.resolve().promise(); + + var groups = _.pluck(projects, this.group_by[0]); + this.GroupProject = []; + _.each(groups, function(grp) { + if(grp instanceof Array) { + grp = grp[grp.length - 1]; + } + if(!_.include(self.GroupProject,grp)) + self.GroupProject.push(grp); + }); + return def.resolve().promise(); }, - get_project_duration: function(projects) { + get_project_duration: function() { - var self = this; + var self = this, + projects = this.database_projects; + this.project_duration = []; _.each(projects, function(project, index) { @@ -130,15 +157,16 @@ init: function(parent, dataset, view_id) { return $.Deferred().resolve().promise(); }, - add_tasks: function(tasks, parentTask) { - var self = this; + add_tasks: function() { + var self = this, + tasks = this.database_projects; _.each(tasks, function(task, index) { var name = task[self.text]; if(task[self.text] instanceof Array) { name = task[self.text][1]; } - parentTask.addChildTask( + self.GanttTasks[0].addChildTask( new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "") ); }); @@ -146,15 +174,16 @@ init: function(parent, dataset, view_id) { return $.Deferred().resolve().promise(); }, - project_starting_date : function(projects) { - var self = this; - var min_date = _.min(projects, function(prj) { - return new Date(prj[self.date_start]); - }); - - var max_date = _.max(projects, function(prj) { - return self.format_date(prj[self.date_start]) - }); + project_starting_date : function() { + var self = this, + projects = this.database_projects, + min_date = _.min(projects, function(prj) { + return new Date(prj[self.date_start]); + }), + max_date = _.max(projects, function(prj) { + return self.format_date(prj[self.date_start]); + }); + this.project_end_date = this.format_date(max_date[self.date_start]); if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); else @@ -162,9 +191,10 @@ init: function(parent, dataset, view_id) { return $.Deferred().resolve().promise(); }, - init_gantt_view: function(Project, Task) { + init_gantt_view: function() { - Project.addTask(Task); + + this.GanttProjects[0].addTask(this.GanttTasks[0]); var self = this; var ganttChartControl = this.ganttChartControl = new GanttChart(); @@ -176,11 +206,11 @@ init: function(parent, dataset, view_id) { ganttChartControl.showContextMenu(false); ganttChartControl.showDescTask(true,'d,s-f'); ganttChartControl.showDescProject(true,'n,d'); - // Load data structure - ganttChartControl.addProject(Project); - ganttChartControl.create('GanttView'); - // Create Gantt control + // Load data structure + ganttChartControl.addProject(this.GanttProjects[0]); + // Create Gantt control + ganttChartControl.create('GanttView'); // Setup Events ganttChartControl.attachEvent("onTaskStartDrag", function(task) { @@ -191,9 +221,7 @@ init: function(parent, dataset, view_id) { }); ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); - ganttChartControl.attachEvent("onTaskDblClick", function(task) { return self.editTask(task);}); - }, format_date : function(date) { @@ -303,7 +331,6 @@ init: function(parent, dataset, view_id) { group_by: groupbys }) .done(function(projects) { - self.database_projects = projects; self.on_project_loaded(projects); }); }) From e3f04a459f9e929c2090f4f2e2019ab34f5625d3 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Sat, 5 Nov 2011 10:12:51 +0530 Subject: [PATCH 06/55] [FIX] First level group_by. bzr revid: vda@tinyerp.com-20111105044251-2raq858ij8m21ha3 --- addons/web_gantt/static/src/js/gantt.js | 70 +++++++++++++++---------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 12cd687b978..46628babc2f 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -83,18 +83,19 @@ init: function(parent, dataset, view_id) { var projects = this.database_projects, self = this; - this.GanttProjects = [], this.GanttTasks = []; - if(this.GroupProject) { + if(this.group_by.length) { _.each(this.GroupProject, function(grp, index) { - self.GanttProjects.push(new GanttProjectInfo(index, grp, self.project_start_date)); - self.GanttTasks.push(new GanttTaskInfo(index, grp, self.project_start_date, self.total_duration, 100, "")); + self.GanttTasks.push([]); + _.each(grp, function(g, g_index) { + self.GanttTasks[index].push(new GanttTaskInfo(index + '_'+ g_index, g, self.project_start_date, self.total_duration, 100, "")); + }); +// self.GanttTasks.push(new GanttTaskInfo(index, grp, self.project_start_date, self.total_duration, 100, "")); }); } else { - this.GanttProjects.push(new GanttProjectInfo(0, self.name, self.project_start_date)); this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } - + this.GanttProjects = new GanttProjectInfo(0, self.name, self.project_start_date); return $.Deferred().resolve().promise(); }, @@ -105,16 +106,16 @@ init: function(parent, dataset, view_id) { if (!this.group_by.length) return def.resolve().promise(); - var groups = _.pluck(projects, this.group_by[0]); this.GroupProject = []; - _.each(groups, function(grp) { - if(grp instanceof Array) { - grp = grp[grp.length - 1]; - } - if(!_.include(self.GroupProject,grp)) - self.GroupProject.push(grp); - }); + _.each(this.group_by, function(group) { + self.GroupProject.push( + _.uniq( + _.map(_.pluck(projects, group), function(prj) { + return prj instanceof Array ? prj[1] : prj; + }) + )); + }); return def.resolve().promise(); }, @@ -160,17 +161,17 @@ init: function(parent, dataset, view_id) { add_tasks: function() { var self = this, tasks = this.database_projects; - - _.each(tasks, function(task, index) { - var name = task[self.text]; - if(task[self.text] instanceof Array) { - name = task[self.text][1]; - } - self.GanttTasks[0].addChildTask( - new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "") - ); - }); - + if (this.group_by.length) { + } + else { + _.each(tasks, function(task, index){ + var name = task[self.text]; + if (task[self.text] instanceof Array) { + name = task[self.text][1]; + } + self.GanttTasks[0].addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); + }); + } return $.Deferred().resolve().promise(); }, @@ -192,11 +193,21 @@ init: function(parent, dataset, view_id) { }, init_gantt_view: function() { - - - this.GanttProjects[0].addTask(this.GanttTasks[0]); var self = this; + if (this.group_by.length) { + _.each(this.GanttTasks, function(tasks) { + _.each(tasks, function(task, index) { + self.GanttProjects.addTask(task); + }) + }); + } + else { + _.each(this.GanttTasks, function(tsk, index){ + self.GanttProjects.addTask(tsk); + }); + } + var ganttChartControl = this.ganttChartControl = new GanttChart(); // Setup paths and behavior @@ -208,7 +219,8 @@ init: function(parent, dataset, view_id) { ganttChartControl.showDescProject(true,'n,d'); // Load data structure - ganttChartControl.addProject(this.GanttProjects[0]); + ganttChartControl.addProject(this.GanttProjects); + // Create Gantt control ganttChartControl.create('GanttView'); From 60bbf83479b5058eeabbf893435ee47d11ca66db Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Tue, 8 Nov 2011 12:44:15 +0530 Subject: [PATCH 07/55] [FIX] Add subtask for groupby. bzr revid: vda@tinyerp.com-20111108071415-ehui6wvm31xi6qqg --- addons/web_gantt/static/src/js/gantt.js | 116 +++++++++++++----------- 1 file changed, 64 insertions(+), 52 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 46628babc2f..abfb7e8c4fa 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -61,7 +61,7 @@ init: function(parent, dataset, view_id) { this.database_projects = started_projects; - if(!self.name) { + if(!self.name && started_projects.length) { var name = started_projects[0][self.parent]; self.name = name instanceof Array? name[name.length - 1] : name; } @@ -79,26 +79,6 @@ init: function(parent, dataset, view_id) { .done(this.init_gantt_view()); }, - generate_projects : function() { - var projects = this.database_projects, - self = this; - - this.GanttTasks = []; - if(this.group_by.length) { - _.each(this.GroupProject, function(grp, index) { - self.GanttTasks.push([]); - _.each(grp, function(g, g_index) { - self.GanttTasks[index].push(new GanttTaskInfo(index + '_'+ g_index, g, self.project_start_date, self.total_duration, 100, "")); - }); -// self.GanttTasks.push(new GanttTaskInfo(index, grp, self.project_start_date, self.total_duration, 100, "")); - }); - } else { - this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); - } - this.GanttProjects = new GanttProjectInfo(0, self.name, self.project_start_date); - return $.Deferred().resolve().promise(); - }, - group_projects: function() { var def = $.Deferred(), self = this, @@ -106,19 +86,68 @@ init: function(parent, dataset, view_id) { if (!this.group_by.length) return def.resolve().promise(); - this.GroupProject = []; - - _.each(this.group_by, function(group) { - self.GroupProject.push( - _.uniq( - _.map(_.pluck(projects, group), function(prj) { - return prj instanceof Array ? prj[1] : prj; - }) - )); - }); + this.GroupProject = _.map(this.group_by, function(grp) { + return _.groupBy(projects, function(prj) { + return prj[grp]; + }) + }); return def.resolve().promise(); }, + generate_projects : function() { + var projects = this.database_projects, + self = this; + + this.GanttTasks = []; + if(this.group_by.length) { + _.each(this.GroupProject, function(GrpProject, index) { + self.GanttTasks.push([]); + var counter = 0; + _.each(GrpProject, function(grp, grpindex) { + var name = grpindex.split(','); + self.GanttTasks[index] + .push(new GanttTaskInfo(index + '_' + counter , name[name.length - 1], self.project_start_date, self.total_duration, 100, "")); + counter += 1; + }); + }) + } else { + this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); + } + this.GanttProjects = new GanttProjectInfo(0, self.name, self.project_start_date); + return $.Deferred().resolve().promise(); + }, + + add_tasks: function() { + var self = this, + tasks = this.database_projects; + if (this.group_by.length) { + _.each(this.GroupProject, function(grpproject, index) { + var counter = 0; + _.each(grpproject, function(prj, gindex) { + _.each(prj, function(task, tindex) { + var name = task[self.text]; + if (task[self.text] instanceof Array) { + name = task[self.text][1]; + } + self.GanttTasks[index][counter] + .addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")) + }); + counter += 1; + }) + }); + } + else { + _.each(tasks, function(task, index){ + var name = task[self.text]; + if (task[self.text] instanceof Array) { + name = task[self.text][1]; + } + self.GanttTasks[0].addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); + }); + } + return $.Deferred().resolve().promise(); + }, + get_project_duration: function() { var self = this, @@ -158,23 +187,6 @@ init: function(parent, dataset, view_id) { return $.Deferred().resolve().promise(); }, - add_tasks: function() { - var self = this, - tasks = this.database_projects; - if (this.group_by.length) { - } - else { - _.each(tasks, function(task, index){ - var name = task[self.text]; - if (task[self.text] instanceof Array) { - name = task[self.text][1]; - } - self.GanttTasks[0].addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); - }); - } - return $.Deferred().resolve().promise(); - }, - project_starting_date : function() { var self = this, projects = this.database_projects, @@ -196,11 +208,11 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { - _.each(this.GanttTasks, function(tasks) { - _.each(tasks, function(task, index) { + _.each(self.GanttTasks, function(tasks, index) { + _.each(tasks, function(task, tindex) { self.GanttProjects.addTask(task); - }) - }); + }); + }) } else { _.each(this.GanttTasks, function(tsk, index){ From f1f7637d69e0691202779fa592cbcf20c0cd5f19 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Tue, 8 Nov 2011 13:05:28 +0530 Subject: [PATCH 08/55] [FIX] duration calculation for date_stop. bzr revid: vda@tinyerp.com-20111108073528-r4lrw0zxtsv1604a --- addons/web_gantt/static/src/js/gantt.js | 28 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index abfb7e8c4fa..8ee3fbfaca5 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -60,7 +60,9 @@ init: function(parent, dataset, view_id) { }); this.database_projects = started_projects; - + if(!started_projects.length) + return self.do_warn(_t("date_start is not defined")); + if(!self.name && started_projects.length) { var name = started_projects[0][self.parent]; self.name = name instanceof Array? name[name.length - 1] : name; @@ -157,9 +159,7 @@ init: function(parent, dataset, view_id) { _.each(projects, function(project, index) { if (self.date_stop && project[self.date_stop]) { - //ToDO - console.log('TODO for date_stop'); - self.project_duration.push(0); + self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); } else if(self.date_delay && project[self.date_delay]) { self.project_duration.push(project[self.date_delay]); } else { @@ -171,6 +171,20 @@ init: function(parent, dataset, view_id) { return $.Deferred().resolve().promise(); }, + duration_difference: function(start_date, end_date) { + + var DAY = 1000 * 60 * 60 * 24, + date1_ms = openerp.web.auto_str_to_date(start_date).getTime(), + date2_ms = openerp.web.auto_str_to_date(end_date).getTime(), + difference_ms = Math.abs(date1_ms - date2_ms); + + var d = Math.floor(difference_ms / DAY), + h = (difference_ms % DAY)/(1000 * 60 * 60), + num = (d * this.day_length) + h; + return parseFloat(num.toFixed(2)); + + }, + calculate_difference: function() { var extend_end_date_day = Math.floor(this.max_project_duration / this.day_length), extend_end_date_hours = this.max_project_duration % this.day_length; @@ -196,7 +210,6 @@ init: function(parent, dataset, view_id) { max_date = _.max(projects, function(prj) { return self.format_date(prj[self.date_start]); }); - this.project_end_date = this.format_date(max_date[self.date_start]); if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); else @@ -212,7 +225,7 @@ init: function(parent, dataset, view_id) { _.each(tasks, function(task, tindex) { self.GanttProjects.addTask(task); }); - }) + }); } else { _.each(this.GanttTasks, function(tsk, index){ @@ -351,8 +364,7 @@ init: function(parent, dataset, view_id) { self.dataset .read_slice([], { domain: domains, - context: contexts, - group_by: groupbys + context: contexts }) .done(function(projects) { self.on_project_loaded(projects); From 282f6756ad1da705d20bc81bd1c0f031aa47db97 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Tue, 8 Nov 2011 14:30:08 +0530 Subject: [PATCH 09/55] [FIX] Events attached only to child tasks. bzr revid: vda@tinyerp.com-20111108090008-f65kvdlplgzryarb --- addons/web_gantt/static/src/js/gantt.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 8ee3fbfaca5..bb19ecbbae6 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -251,14 +251,21 @@ init: function(parent, dataset, view_id) { // Setup Events ganttChartControl.attachEvent("onTaskStartDrag", function(task) { - var task_date = task.getEST(); - if(task_date.getHours()) { - task_date.set({hour: task_date.getHours(), minute : task_date.getMinutes(), second:0}); + if (task.parentTask) { + var task_date = task.getEST(); + if (task_date.getHours()) { + task_date.set({ + hour: task_date.getHours(), + minute: task_date.getMinutes(), + second: 0 + }); + } } }); + ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); - ganttChartControl.attachEvent("onTaskDblClick", function(task) { return self.editTask(task);}); + ganttChartControl.attachEvent("onTaskClick", function(task) { return self.editTask(task);}); }, format_date : function(date) { @@ -278,10 +285,10 @@ init: function(parent, dataset, view_id) { ResizeTask: function(task) { - var event_id = task.getId(); + var self = this, + event_id = task.getId(); - - if(!event_id) + if(!event_id || !task.parentTask) return this.do_warn(_t("Project can not be resized")); var data = {}; @@ -302,11 +309,11 @@ init: function(parent, dataset, view_id) { }, editTask: function(task) { + var self = this; var event_id = task.getId(); - if(!event_id) + if(!event_id || !task.parentTask) return false; - if(event_id) event_id = parseInt(event_id, 10); var action_manager = new openerp.web.ActionManager(this); From 4a7cc97197a77a441c0a94d50f8439af2b9841c6 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 10 Nov 2011 15:53:05 +0530 Subject: [PATCH 10/55] [FIX] follow multi level Group. bzr revid: vda@tinyerp.com-20111110102305-3h661p2va5unyo15 --- addons/web_gantt/static/src/js/gantt.js | 38 ++++++++----------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 2165bd7ce88..effaf17dfe3 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -88,6 +88,7 @@ init: function(parent, dataset, view_id) { this.GroupProject = _.map(this.group_by, function(grp) { return _.groupBy(projects, function(prj) { + if(!prj[grp]) prj[grp] = 'Undefined'; return prj[grp]; }) }); @@ -100,16 +101,12 @@ init: function(parent, dataset, view_id) { this.GanttTasks = []; if(this.group_by.length) { - _.each(this.GroupProject, function(GrpProject, index) { - self.GanttTasks.push([]); - var counter = 0; - _.each(GrpProject, function(grp, grpindex) { - var name = grpindex.split(','); - self.GanttTasks[index] - .push(new GanttTaskInfo(index + '_' + counter , name[name.length - 1], self.project_start_date, self.total_duration, 100, "")); - counter += 1; - }); - }) + _.each(this.GroupProject, function(grp, index) { + var name = _.keys(grp)[0]; + name = name.split(','); +// index > 0 ? "" + (index - 1) + self.GanttTasks.push(new GanttTaskInfo(index, name[name.length - 1], self.project_start_date, self.total_duration, 100, index > 0 ? (index - 1) : "")); + }); } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -121,19 +118,10 @@ init: function(parent, dataset, view_id) { var self = this, tasks = this.database_projects; if (this.group_by.length) { - _.each(this.GroupProject, function(grpproject, index) { - var counter = 0; - _.each(grpproject, function(prj, gindex) { - _.each(prj, function(task, tindex) { - var name = task[self.text]; - if (task[self.text] instanceof Array) { - name = task[self.text][1]; - } - self.GanttTasks[index][counter] - .addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")) - }); - counter += 1; - }) + _.each(_.values(_.last(this.GroupProject))[0], function(task, index) { + var name = task[self.text]; + _.last(self.GanttTasks) + .addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")) }); } else { @@ -220,9 +208,7 @@ init: function(parent, dataset, view_id) { if (this.group_by.length) { _.each(self.GanttTasks, function(tasks, index) { - _.each(tasks, function(task, tindex) { - self.GanttProjects.addTask(task); - }); + self.GanttProjects.addTask(tasks); }); } else { From a9cb7736c46987b4f7168408261e41a4ec45df09 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 16 Nov 2011 18:08:34 +0530 Subject: [PATCH 11/55] [IMP] Remove bottom bar (footer) from other pages to show only in main menu. bzr revid: jra@tinyerp.com-20111116123834-2vejdxbd7morztfv --- .../web_mobile/static/src/js/chrome_mobile.js | 32 ------------- .../web_mobile/static/src/js/form_mobile.js | 48 ------------------- .../web_mobile/static/src/js/list_mobile.js | 16 ------- .../web_mobile/static/src/xml/web_mobile.xml | 7 --- 4 files changed, 103 deletions(-) diff --git a/addons/web_mobile/static/src/js/chrome_mobile.js b/addons/web_mobile/static/src/js/chrome_mobile.js index 516de784adc..f86e0fec5f9 100644 --- a/addons/web_mobile/static/src/js/chrome_mobile.js +++ b/addons/web_mobile/static/src/js/chrome_mobile.js @@ -151,14 +151,6 @@ openerp.web_mobile.Shortcuts = openerp.web.Widget.extend({ $.mobile.changePage("#oe_menu", "slide", false, true); }); self.$element.find('#content').find("a").click(self.on_clicked); - self.$element.find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); $.mobile.changePage("#oe_shortcuts", "slide", false, true); }); }, @@ -261,22 +253,6 @@ openerp.web_mobile.Secondary = openerp.web.Widget.extend({ this.$element.html(this.render(v)); this.$element.find("[data-role=header]").find("h1").html(this.data.name); this.$element.add(this.$secondary_menu).find('#content').find("a").click(this.on_menu_click); - this.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){ - if(!$('#oe_shortcuts').html().length){ - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); - this.$element.find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); this.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); @@ -328,14 +304,6 @@ openerp.web_mobile.Options = openerp.web.Widget.extend({ var self = this; this.$element.html(this.render(this)); this.$element.find("[data-role=header]").find('h1').html('Preference'); - this.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){ - if(!$('#oe_shortcuts').html().length){ - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); this.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 598f3c29739..32d1c39f133 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -52,22 +52,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ self.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - self.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){ - if(!$('#oe_shortcuts').html().length){ - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); - self.$element.find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); self.$element.find('#formbutton').click(function(){ var head = $(this).prev().find('select').find("option:selected").text(); var selected_id = $(this).prev().find('select').val(); @@ -148,22 +132,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=footer]").find('#shrotcuts').click(function(){ - if(!$('#oe_shortcuts').html().length){ - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("a#list-id").click(function(ev){ ev.preventDefault(); ev.stopPropagation(); @@ -203,22 +171,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=footer]").find('#shrotcuts').click(function(){ - if(!$('#oe_shortcuts').html().length){ - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find('#formbutton').click(function(){ var head = $(this).prev().find('select').find("option:selected").text(); var selected_id = $(this).prev().find('select').val(); diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index 7e9fff16262..c7b77737e6d 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -46,22 +46,6 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({ self.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - self.$element.find("[data-role=footer]").find('#shrotcuts').click(function(){ - if (!$('#oe_shortcuts').html().length) { - this.shortcuts = new openerp.web_mobile.Shortcuts(self, "oe_shortcuts"); - this.shortcuts.start(); - }else{ - $.mobile.changePage("#oe_shortcuts", "slide", false, true); - } - }); - self.$element.find("[data-role=footer]").find('#preference').click(function(){ - if(!$('#oe_options').html().length){ - this.options = new openerp.web_mobile.Options(self, "oe_options"); - this.options.start(); - }else{ - $.mobile.changePage("#oe_options", "slide", false, true); - } - }); self.$element.find("a#list-id").click(self.on_list_click); $.mobile.changePage("#"+self.element_id, "slide", false, true); }); diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index d2af2e95573..898d86c1735 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -72,7 +72,6 @@ - @@ -114,7 +113,6 @@ - @@ -126,7 +124,6 @@ - @@ -159,7 +156,6 @@ - @@ -343,8 +339,5 @@ - - - \ No newline at end of file From b0ece86d7cf44cdccfd563ce9d547bd72c79dbba Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Wed, 16 Nov 2011 19:08:44 +0530 Subject: [PATCH 12/55] [FIX] Create node. bzr revid: vda@tinyerp.com-20111116133844-qp4fp3pkruqpgobr --- addons/web_gantt/static/src/js/gantt.js | 59 ++++++++----------- addons/web_gantt/static/src/xml/web_gantt.xml | 1 + 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index effaf17dfe3..ec212c7007d 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -65,7 +65,9 @@ init: function(parent, dataset, view_id) { var name = started_projects[0][self.parent]; self.name = name instanceof Array? name[name.length - 1] : name; } - + this.$element.find('#add_task').click(function(){ + self.editTask(); + }); $.when(this.project_starting_date(), this.get_project_duration(), this.calculate_difference()) .then(function() { if(self.ganttChartControl) { @@ -83,30 +85,23 @@ init: function(parent, dataset, view_id) { var def = $.Deferred(), self = this, projects = this.database_projects; - - if (!this.group_by.length) return def.resolve().promise(); - this.GroupProject = _.map(this.group_by, function(grp) { - return _.groupBy(projects, function(prj) { - if(!prj[grp]) prj[grp] = 'Undefined'; - return prj[grp]; - }) + if (!this.group_by.length) return def.resolve().promise(); + this.data_groups = _.groupBy(projects, function(project, index) { + return _.map(self.group_by, function(group, index) { + if(!project[group]) project[group] = 'Undefined'; + else if(project[group] instanceof Array) project[group] = project[group][1]; + return project[group]; }); + }); return def.resolve().promise(); }, - generate_projects : function() { var projects = this.database_projects, self = this; this.GanttTasks = []; if(this.group_by.length) { - _.each(this.GroupProject, function(grp, index) { - var name = _.keys(grp)[0]; - name = name.split(','); -// index > 0 ? "" + (index - 1) - self.GanttTasks.push(new GanttTaskInfo(index, name[name.length - 1], self.project_start_date, self.total_duration, 100, index > 0 ? (index - 1) : "")); - }); } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -118,11 +113,7 @@ init: function(parent, dataset, view_id) { var self = this, tasks = this.database_projects; if (this.group_by.length) { - _.each(_.values(_.last(this.GroupProject))[0], function(task, index) { - var name = task[self.text]; - _.last(self.GanttTasks) - .addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")) - }); + } else { _.each(tasks, function(task, index){ @@ -207,9 +198,7 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { - _.each(self.GanttTasks, function(tasks, index) { - self.GanttProjects.addTask(tasks); - }); + } else { _.each(this.GanttTasks, function(tsk, index){ @@ -293,13 +282,16 @@ init: function(parent, dataset, view_id) { }, editTask: function(task) { - - var self = this; - var event_id = task.getId(); - if(!event_id || !task.parentTask) - return false; + var self = this, + event_id; + if (!task) + event_id = null; + else { + event_id = task.getId(); + if(!event_id || !task.parentTask) + return false; + } if(event_id) event_id = parseInt(event_id, 10); - var action_manager = new openerp.web.ActionManager(this); var dialog = new openerp.web.Dialog(this, { @@ -337,7 +329,7 @@ init: function(parent, dataset, view_id) { }, reloadView: function() { - self.on_project_loaded(self.database_projects); + this.on_project_loaded(this.database_projects); }, do_show: function () { @@ -352,16 +344,13 @@ init: function(parent, dataset, view_id) { var self = this; this.group_by = groupbys; $.when(this.has_been_loaded).then(function() { - self.dataset - .read_slice([], { + self.dataset.read_slice([], { domain: domains, context: contexts - }) - .done(function(projects) { + }).done(function(projects){ self.on_project_loaded(projects); }); }) - } }); diff --git a/addons/web_gantt/static/src/xml/web_gantt.xml b/addons/web_gantt/static/src/xml/web_gantt.xml index 48a1a1025dd..35cab76b452 100644 --- a/addons/web_gantt/static/src/xml/web_gantt.xml +++ b/addons/web_gantt/static/src/xml/web_gantt.xml @@ -1,5 +1,6 @@ From ab599f36463c2d8cc58cc5bd3878979eb7466bb9 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Fri, 18 Nov 2011 12:11:38 +0530 Subject: [PATCH 13/55] [IMP] Some Changes to show Maximum 80 records in listview. bzr revid: jra@tinyerp.com-20111118064138-d9idrs8brq943r2r --- addons/web_mobile/static/src/js/form_mobile.js | 4 ++-- addons/web_mobile/static/src/js/list_mobile.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 32d1c39f133..6f50bb6760d 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -117,10 +117,10 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ var head = $.trim($(this).text()); var dataset = new openerp.web.DataSetSearch(self, result.fields[relational].relation, result.fields[relational].context); dataset.domain=[['id', 'in', self.datarecord[relational]]]; - dataset.read_slice([], {}, function(result1,ids){ + dataset.read_slice([], {limit:80}, function(result1,ids){ _.extend(self.action.context,{"html_name_get" : true}); var dataset1 = new openerp.web.DataSet(self, result.fields[relational].relation,result.fields[relational].context); - dataset1.name_get(dataset.ids,function(res){ + dataset1.name_get(result1,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display']; diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index c7b77737e6d..5813b9c216e 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -32,11 +32,10 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({ var self = this; var dataset = new openerp.web.DataSetSearch(this, this.action.res_model,this.action.context); dataset.domain = self.action.domain; - dataset.read_slice([], {}, function(result,ids){ + dataset.read_slice([], {limit:80}, function(result,ids){ _.extend(self.action.context,{"html_name_get" : true}); - var dataset1 = new openerp.web.DataSet(self, self.action.res_model,self.action.context); - dataset1.name_get(dataset.ids,function(res){ + dataset1.name_get(result,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display']; From c95adf2c8a8530ad433d0de27781b22af093cfa3 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Mon, 21 Nov 2011 14:45:12 +0530 Subject: [PATCH 14/55] [FIX] Reload and update record on Resize. bzr revid: vda@tinyerp.com-20111121091512-8o5wxtid0cky2on8 --- addons/web_gantt/static/src/js/gantt.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index ec212c7007d..77170d103ff 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -87,13 +87,17 @@ init: function(parent, dataset, view_id) { projects = this.database_projects; if (!this.group_by.length) return def.resolve().promise(); - this.data_groups = _.groupBy(projects, function(project, index) { - return _.map(self.group_by, function(group, index) { + this.data_groups = _.groupBy(projects, function(project) { + return _.map(self.group_by, function(group) { if(!project[group]) project[group] = 'Undefined'; else if(project[group] instanceof Array) project[group] = project[group][1]; return project[group]; }); }); + + this.group_keys = _.map(this.group_by, function(group, index) { + return _.map(projects, function(project){return project[group]}); + }); return def.resolve().promise(); }, generate_projects : function() { @@ -102,6 +106,7 @@ init: function(parent, dataset, view_id) { this.GanttTasks = []; if(this.group_by.length) { + } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -198,10 +203,9 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { - } else { - _.each(this.GanttTasks, function(tsk, index){ + _.each(this.GanttTasks, function(tsk, index) { self.GanttProjects.addTask(tsk); }); } @@ -238,7 +242,6 @@ init: function(parent, dataset, view_id) { ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); - ganttChartControl.attachEvent("onTaskClick", function(task) { return self.editTask(task);}); }, format_date : function(date) { @@ -257,7 +260,6 @@ init: function(parent, dataset, view_id) { }, ResizeTask: function(task) { - var self = this, event_id = task.getId(); @@ -277,6 +279,8 @@ init: function(parent, dataset, view_id) { this.dataset .write(event_id, data, {}) .done(function() { + var get_project = _.find(self.database_projects, function(project){ return project.id == event_id}); + _.extend(get_project,data); self.reloadView(); }); }, @@ -350,7 +354,7 @@ init: function(parent, dataset, view_id) { }).done(function(projects){ self.on_project_loaded(projects); }); - }) + }); } }); From ef3c7d9c3b51e4ae30de02c74517df3e7307a93d Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Mon, 21 Nov 2011 16:49:31 +0530 Subject: [PATCH 15/55] [FIX] Done for level 1 group. todo for multi level. bzr revid: vda@tinyerp.com-20111121111931-f149p9vau10vsx60 --- addons/web_gantt/static/src/js/gantt.js | 42 ++++++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 77170d103ff..63845361b7b 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -106,7 +106,13 @@ init: function(parent, dataset, view_id) { this.GanttTasks = []; if(this.group_by.length) { - + if(this.group_by.length > 1) { + + } else { + _.each(_.uniq(this.group_keys[0]), function(group, index) { + self.GanttTasks.push(new GanttTaskInfo(index, group, self.project_start_date, self.total_duration, 100,"")); + }); + } } else { this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); } @@ -118,7 +124,21 @@ init: function(parent, dataset, view_id) { var self = this, tasks = this.database_projects; if (this.group_by.length) { - + if (this.group_by.length > 1) { + } else { + _.each(_.values(this.data_groups), function(child_tasks, index) { + _.each(child_tasks, function(chld) { + var name = chld[self.text]; + if (chld[self.text] instanceof Array) { + name = chld[self.text][1]; + } + var duration = _.keys(self.group_project_duration).indexOf(""+chld.id); + duration = _.values(self.group_project_duration)[duration]; + self.GanttTasks[index].addChildTask(new GanttTaskInfo(chld.id, name, self.format_date(chld[self.date_start]), duration, 100, "")) + }); + + }); + } } else { _.each(tasks, function(task, index){ @@ -138,15 +158,19 @@ init: function(parent, dataset, view_id) { projects = this.database_projects; this.project_duration = []; - + this.group_project_duration = {}; _.each(projects, function(project, index) { + var duration = 0, + id = project.id; if (self.date_stop && project[self.date_stop]) { - self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); + duration = self.duration_difference(project[self.date_start], project[self.date_stop]); +// self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); } else if(self.date_delay && project[self.date_delay]) { - self.project_duration.push(project[self.date_delay]); - } else { - self.project_duration.push(0); + duration = project[self.date_delay]; +// self.project_duration.push(project[self.date_delay]); } + self.project_duration.push(duration); + self.group_project_duration[id] = duration; }); this.max_project_duration = _.max(this.project_duration); @@ -203,6 +227,9 @@ init: function(parent, dataset, view_id) { var self = this; if (this.group_by.length) { + _.each(this.GanttTasks, function(tsk, index) { + self.GanttProjects.addTask(tsk); + }); } else { _.each(this.GanttTasks, function(tsk, index) { @@ -239,7 +266,6 @@ init: function(parent, dataset, view_id) { } } }); - ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); }, From aad7d22763beb1774218bd7f041a918a56237964 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Mon, 21 Nov 2011 17:47:26 +0530 Subject: [PATCH 16/55] [IMP] Improve m2o field to remove image for open related form and make it as o2m. bzr revid: jra@tinyerp.com-20111121121726-pat4r2ypa3o93tr9 --- .../web_mobile/static/src/js/form_mobile.js | 69 ++++--------------- .../web_mobile/static/src/xml/web_mobile.xml | 26 ++----- 2 files changed, 22 insertions(+), 73 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 6f50bb6760d..cc816b75a21 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -52,20 +52,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ self.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - self.$element.find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').each(function(i){ for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == $(this).attr('id')) { @@ -83,21 +69,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).find('div#page_content').html(self.render({'get_fields': get_fields,'fields' : result.fields, 'values' : self.datarecord})); } self.formatdata(get_fields, fields, result, self.datarecord,'page_content','element'); - - $(this).find('div#page_content').find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); } }); self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').find('div#page_content').find('[data-role=content]').find('ul').find('li').click(function(ev){ @@ -146,7 +117,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ } if(!$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html()){ $('
').appendTo('#moe'); - for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == lastid) { get_fields = self.get_fields(notebooks.children[k].children); @@ -171,20 +141,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); }); - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find('#formbutton').click(function(){ - var head = $(this).prev().find('select').find("option:selected").text(); - var selected_id = $(this).prev().find('select').val(); - var select_model = $(this).prev().find('select').attr('for'); - if(selected_id!="false"){ - if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ - $('
').appendTo('#moe'); - this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); - this.formview.start(); - }else{ - $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); - } - } - }); if(notebook){ self.formatdata(get_fields_test, fields_test, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); }else{ @@ -205,9 +161,24 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ }); } }); + self.$element.find('#m2o_btn').click(this.open_m2o_form); $.mobile.changePage("#"+self.element_id, "slide", false, true); self.formatdata('', '', '', '',self.element_id,'slider'); }, + open_m2o_form : function(ev) { + var head = $(this).find('a').attr('name'); + var selected_id = $(this).find('a').attr('value'); + var select_model = $(this).attr('for'); + if(selected_id!="false"){ + if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ + $('
').appendTo('#moe'); + this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); + this.formview.start(); + }else{ + $.mobile.changePage('#oe_form_'+selected_id+select_model, "slide", false, true); + } + } + }, get_fields: function(view_fields, fields) { this.fields = fields || []; for (var i=0; i < view_fields.length; i++){ @@ -276,16 +247,6 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ $(this).css('left', '-9999px'); }); }); - // image displayed with m2o field - $('[id^="'+id+'"]').find('div[class=ui-select]').each(function(){ - $(this).next().each(function(){ - if($(this).attr('id')=="formbutton"){ - $(this).prev().css('display','inline-table'); - $(this).prev().find('a').find('.ui-btn-inner').removeClass('ui-btn-inner'); - $(this).prev().find('a').find('span:first').css('padding-right','150px'); - } - }); - }); } } }); diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 898d86c1735..1d6f81404d2 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -288,25 +288,13 @@ : - - - - +
    From 15b357cb79a7243a74515bd7596c385e9b8e0c6a Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Wed, 23 Nov 2011 15:56:14 +0530 Subject: [PATCH 17/55] [FIX] Used Old method for multiple group_by. bzr revid: vda@tinyerp.com-20111123102614-r4uvsuhrj0t7q9fm --- addons/web_gantt/static/src/js/gantt.js | 624 ++++++++++++++---------- 1 file changed, 372 insertions(+), 252 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 63845361b7b..07b754890b1 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -7,7 +7,7 @@ var QWeb = openerp.web.qweb; openerp.web.views.add('gantt', 'openerp.web_gantt.GanttView'); openerp.web_gantt.GanttView = openerp.web.View.extend({ -init: function(parent, dataset, view_id) { + init: function(parent, dataset, view_id) { this._super(parent); this.view_manager = parent || new openerp.web.NullViewManager(); this.dataset = dataset; @@ -24,6 +24,7 @@ init: function(parent, dataset, view_id) { }, on_loaded: function(data) { + this.fields_view = data, this.name = this.fields_view.arch.attrs.string, this.view_id = this.fields_view.view_id, @@ -48,226 +49,29 @@ init: function(parent, dataset, view_id) { this.$element.html(QWeb.render("GanttView", {'height': $('.oe-application-container').height(), 'width': $('.oe-application-container').width()})); this.has_been_loaded.resolve(); }, - - on_project_loaded: function(projects) { - - if(!projects.length) return; - var self = this, - started_projects = _.filter(projects, function(res) { - return res[self.date_start]; - }); - - this.database_projects = started_projects; - if(!started_projects.length) - return self.do_warn(_t("date_start is not defined")); - - if(!self.name && started_projects.length) { - var name = started_projects[0][self.parent]; - self.name = name instanceof Array? name[name.length - 1] : name; - } - this.$element.find('#add_task').click(function(){ - self.editTask(); - }); - $.when(this.project_starting_date(), this.get_project_duration(), this.calculate_difference()) - .then(function() { - if(self.ganttChartControl) { - self.ganttChartControl.clearAll(); - self.$element.find('#GanttView').empty(); - } - }) - .then(this.group_projects()) - .then(this.generate_projects()) - .then(this.add_tasks()) - .done(this.init_gantt_view()); - }, - - group_projects: function() { - var def = $.Deferred(), - self = this, - projects = this.database_projects; - - if (!this.group_by.length) return def.resolve().promise(); - this.data_groups = _.groupBy(projects, function(project) { - return _.map(self.group_by, function(group) { - if(!project[group]) project[group] = 'Undefined'; - else if(project[group] instanceof Array) project[group] = project[group][1]; - return project[group]; - }); - }); - - this.group_keys = _.map(this.group_by, function(group, index) { - return _.map(projects, function(project){return project[group]}); - }); - return def.resolve().promise(); - }, - generate_projects : function() { - var projects = this.database_projects, - self = this; - - this.GanttTasks = []; - if(this.group_by.length) { - if(this.group_by.length > 1) { - - } else { - _.each(_.uniq(this.group_keys[0]), function(group, index) { - self.GanttTasks.push(new GanttTaskInfo(index, group, self.project_start_date, self.total_duration, 100,"")); - }); - } - } else { - this.GanttTasks.push(new GanttTaskInfo(0, self.name, self.project_start_date, self.total_duration, 100, "")); - } - this.GanttProjects = new GanttProjectInfo(0, self.name, self.project_start_date); - return $.Deferred().resolve().promise(); - }, - - add_tasks: function() { - var self = this, - tasks = this.database_projects; - if (this.group_by.length) { - if (this.group_by.length > 1) { - } else { - _.each(_.values(this.data_groups), function(child_tasks, index) { - _.each(child_tasks, function(chld) { - var name = chld[self.text]; - if (chld[self.text] instanceof Array) { - name = chld[self.text][1]; - } - var duration = _.keys(self.group_project_duration).indexOf(""+chld.id); - duration = _.values(self.group_project_duration)[duration]; - self.GanttTasks[index].addChildTask(new GanttTaskInfo(chld.id, name, self.format_date(chld[self.date_start]), duration, 100, "")) - }); - - }); - } - } - else { - _.each(tasks, function(task, index){ - var name = task[self.text]; - if (task[self.text] instanceof Array) { - name = task[self.text][1]; - } - self.GanttTasks[0].addChildTask(new GanttTaskInfo(task.id, name, self.format_date(task[self.date_start]), self.project_duration[index], 100, "")); - }); - } - return $.Deferred().resolve().promise(); - }, - - get_project_duration: function() { - - var self = this, - projects = this.database_projects; - - this.project_duration = []; - this.group_project_duration = {}; - _.each(projects, function(project, index) { - var duration = 0, - id = project.id; - if (self.date_stop && project[self.date_stop]) { - duration = self.duration_difference(project[self.date_start], project[self.date_stop]); -// self.project_duration.push(self.duration_difference(project[self.date_start], project[self.date_stop])); - } else if(self.date_delay && project[self.date_delay]) { - duration = project[self.date_delay]; -// self.project_duration.push(project[self.date_delay]); - } - self.project_duration.push(duration); - self.group_project_duration[id] = duration; - }); - - this.max_project_duration = _.max(this.project_duration); - return $.Deferred().resolve().promise(); - }, - - duration_difference: function(start_date, end_date) { - - var DAY = 1000 * 60 * 60 * 24, - date1_ms = openerp.web.auto_str_to_date(start_date).getTime(), - date2_ms = openerp.web.auto_str_to_date(end_date).getTime(), - difference_ms = Math.abs(date1_ms - date2_ms); - - var d = Math.floor(difference_ms / DAY), - h = (difference_ms % DAY)/(1000 * 60 * 60), - num = (d * this.day_length) + h; - return parseFloat(num.toFixed(2)); - - }, - - calculate_difference: function() { - var extend_end_date_day = Math.floor(this.max_project_duration / this.day_length), - extend_end_date_hours = this.max_project_duration % this.day_length; - - this.project_end_date = this.project_end_date.add({days: extend_end_date_day, hours: extend_end_date_hours}) - - var DAY = 1000 * 60 * 60 * 24, - difference = Math.abs(this.project_start_date.getTime() - this.project_end_date.getTime()), - day = Math.ceil(difference / DAY), - hour = (difference % DAY)/(1000 * 60 * 60), - DiffHour = (day * this.day_length) + hour; - - this.total_duration = parseFloat(DiffHour.toFixed(2)); - return $.Deferred().resolve().promise(); - }, - - project_starting_date : function() { - var self = this, - projects = this.database_projects, - min_date = _.min(projects, function(prj) { - return new Date(prj[self.date_start]); - }), - max_date = _.max(projects, function(prj) { - return self.format_date(prj[self.date_start]); - }); - this.project_end_date = this.format_date(max_date[self.date_start]); - if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); - else - this.project_start_date = Date.today(); - return $.Deferred().resolve().promise(); - }, init_gantt_view: function() { - var self = this; - - if (this.group_by.length) { - _.each(this.GanttTasks, function(tsk, index) { - self.GanttProjects.addTask(tsk); - }); - } - else { - _.each(this.GanttTasks, function(tsk, index) { - self.GanttProjects.addTask(tsk); - }); - } - - var ganttChartControl = this.ganttChartControl = new GanttChart(); - // Setup paths and behavior + ganttChartControl = this.ganttChartControl = new GanttChart(this.day_length); ganttChartControl.setImagePath("/web_gantt/static/lib/dhtmlxGantt/codebase/imgs/"); ganttChartControl.setEditable(true); ganttChartControl.showTreePanel(true); ganttChartControl.showContextMenu(false); ganttChartControl.showDescTask(true,'d,s-f'); ganttChartControl.showDescProject(true,'n,d'); - - // Load data structure - ganttChartControl.addProject(this.GanttProjects); - - // Create Gantt control - ganttChartControl.create('GanttView'); - - // Setup Events - ganttChartControl.attachEvent("onTaskStartDrag", function(task) { - if (task.parentTask) { - var task_date = task.getEST(); - if (task_date.getHours()) { - task_date.set({ - hour: task_date.getHours(), - minute: task_date.getMinutes(), - second: 0 - }); - } - } - }); - ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); - ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); + + }, + + project_starting_date : function() { + var self = this, + projects = this.database_projects, + min_date = _.min(projects, function(prj) { + return self.format_date(prj[self.date_start]); + }); + if (min_date) this.project_start_date = this.format_date(min_date[self.date_start]); + else + this.project_start_date = Date.today(); + return $.Deferred().resolve().promise(); }, format_date : function(date) { @@ -282,16 +86,242 @@ init: function(parent, dataset, view_id) { } else { this.date_format = "yyyy-MM-dd HH:mm:ss"; } - return openerp.web.auto_str_to_date(date); + if(typeof date === 'string') + return openerp.web.auto_str_to_date(date); + return date; + }, + + on_project_loaded: function(events) { + + if(!events.length) return; + var self = this, + started_projects = _.filter(events, function(res) { + return res[self.date_start]; + }); + + this.database_projects = started_projects; + + if(!started_projects.length) + return self.do_warn(_t("date_start is not defined")); + + if(!self.name && started_projects.length) { + var name = started_projects[0][self.parent]; + self.name = name instanceof Array? name[name.length - 1] : name; + } + this.$element.find('#add_task').click(function(){ + self.editTask(); + }); + + $.when(this.project_starting_date()) + .then(function() { + if(self.ganttChartControl) { + self.ganttChartControl.clearAll(); + self.$element.find('#GanttView').empty(); + } + }) + .done(this.init_gantt_view()); + + var self = this; + var show_event = started_projects; + _.each(show_event, function(evt) {evt[self.date_start] = self.format_date(evt[self.date_start])}); + this.project = new GanttProjectInfo("_1", self.name, this.project_start_date); + self.ganttChartControl.addProject(this.project); + //create child + var k = 0; + var color_box = {}; + var parents = {}; + var all_events = {}; + var child_event = {}; + var temp_id = ""; + var final_events = []; + for (var i in show_event) { + + var res = show_event[i]; + + var id = res['id']; + var text = res[this.text]; + var start_date = res[this.date_start]; + + if (this.date_stop != undefined){ + if (res[this.date_stop] != false){ + var stop_date = this.convert_str_date(res[this.date_stop]); + var duration= self.hours_between(start_date, stop_date); + } + else{ + var duration = 0; + } + } + else{ + var duration = res[this.date_delay]; + } + if (!duration) + duration = 0; + + if (this.group_by.length){ + for (var j in self.group_by){ + var grp_key = res[self.group_by[j]]; + if (typeof(grp_key) == "object"){ + grp_key = res[self.group_by[j]][1]; + } + else{ + grp_key = res[self.group_by[j]]; + } + + if (!grp_key){ + grp_key = "Undefined"; + } + + if (j == 0){ + if (parents[grp_key] == undefined){ + var mod_id = i+ "_" +j; + parents[grp_key] = mod_id; + child_event[mod_id] = {}; + all_events[mod_id] = {'parent': "", 'evt':[mod_id , grp_key, start_date, start_date, 100, ""]}; + } + else{ + mod_id = parents[grp_key]; + } + temp_id = mod_id; + }else{ + if (child_event[mod_id][grp_key] == undefined){ + var ch_mod_id = i+ "_" +j; + child_event[mod_id][grp_key] = ch_mod_id; + child_event[ch_mod_id] = {}; + temp_id = ch_mod_id; + all_events[ch_mod_id] = {'parent': mod_id, 'evt':[ch_mod_id , grp_key, start_date, start_date, 100, ""]}; + mod_id = ch_mod_id; + } + else{ + mod_id = child_event[mod_id][grp_key]; + temp_id = mod_id; + } + } + } + all_events[id] = {'parent': temp_id, 'evt':[id , text, start_date, duration, 100, ""]}; + final_events.push(id); + } + else { + if (i == 0) { + var mod_id = "_" + i; + all_events[mod_id] = {'parent': "", 'evt': [mod_id, this.name, start_date, start_date, 100, ""]}; + } + all_events[id] = {'parent': mod_id, 'evt':[id , text, start_date, duration, 100, ""]}; + final_events.push(id); + } + } + + for (var i in final_events){ + var evt_id = final_events[i]; + var evt_date = all_events[evt_id]['evt'][2]; + while (all_events[evt_id]['parent'] != "") { + var parent_id =all_events[evt_id]['parent']; + if (all_events[parent_id]['evt'][2] > evt_date){ + all_events[parent_id]['evt'][2] = evt_date; + } + evt_id = parent_id; + } + } + var evt_id = []; + var evt_date = ""; + var evt_duration = ""; + var evt_end_date = ""; + var project_tree_field = []; + for (var i in final_events){ + evt_id = final_events[i]; + evt_date = all_events[evt_id]['evt'][2]; + evt_duration = all_events[evt_id]['evt'][3]; + + var evt_str_date = this.convert_date_str(evt_date); + evt_end_date = this.end_date(evt_str_date, evt_duration); + + while (all_events[evt_id]['parent'] != "") { + var parent_id =all_events[evt_id]['parent']; + if (all_events[parent_id]['evt'][3] < evt_end_date){ + all_events[parent_id]['evt'][3] = evt_end_date; + } + evt_id = parent_id; + } + } + + for (var j in self.group_by) { + self.render_events(all_events, j); + } + + if (!self.group_by.length) { + self.render_events(all_events, 0); + } + + for (var i in final_events) { + evt_id = final_events[i]; + res = all_events[evt_id]; + task=new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], ""); + prt = self.project.getTaskById(res['parent']); + prt.addChildTask(task); + } + + var oth_hgt = 264; + var min_hgt = 150; + var name_min_wdt = 150; + var gantt_hgt = $(window).height() - oth_hgt; + var search_wdt = $("#oe_app_search").width(); + + if (gantt_hgt > min_hgt) { + $('#GanttView').height(gantt_hgt).width(search_wdt); + } else{ + $('#GanttView').height(min_hgt).width(search_wdt); + } + + self.ganttChartControl.create("GanttView"); + + // Setup Events + self.ganttChartControl.attachEvent("onTaskStartDrag", function(task) { + if (task.parentTask) { + var task_date = task.getEST(); + if (task_date.getHours()) { + task_date.set({ + hour: task_date.getHours(), + minute: task_date.getMinutes(), + second: 0 + }); + } + } + }); + self.ganttChartControl.attachEvent("onTaskEndResize", function(task) {return self.ResizeTask(task);}); + self.ganttChartControl.attachEvent("onTaskEndDrag", function(task) {return self.ResizeTask(task);}); + + var taskdiv = $("div.taskPanel").parent(); + taskdiv.addClass('ganttTaskPanel'); + taskdiv.prev().addClass('ganttDayPanel'); + var $gantt_panel = $(".ganttTaskPanel , .ganttDayPanel"); + + var ganttrow = $('.taskPanel').closest('tr'); + var gtd = ganttrow.children(':first-child'); + gtd.children().addClass('task-name'); + + $(".toggle-sidebar").click(function(e) { + self.set_width(); + }); + + $(window).bind('resize',function() { + window.clearTimeout(self.ganttChartControl._resize_timer); + self.ganttChartControl._resize_timer = window.setTimeout(function(){ + self.reloadView(); + }, 200); + }); + $("div #_1, div #_1 + div").hide(); + _.each(final_events, function(id) { + self.$element.find('.taskNameItem[id="'+id+'"]').click(function() { + self.editTask(self.ganttChartControl.getProjectById("_1").getTaskById(id)); + }) + }); }, ResizeTask: function(task) { var self = this, event_id = task.getId(); + if(task.childTask.length) + return $.when(this.do_warn(_t("Project can not be resized"))).then(this.reloadView()); - if(!event_id || !task.parentTask) - return this.do_warn(_t("Project can not be resized")); - var data = {}; data[this.date_start] = task.getEST().toString(this.date_format); @@ -315,51 +345,101 @@ init: function(parent, dataset, view_id) { var self = this, event_id; if (!task) - event_id = null; + event_id = 0; else { event_id = task.getId(); if(!event_id || !task.parentTask) return false; } if(event_id) event_id = parseInt(event_id, 10); - var action_manager = new openerp.web.ActionManager(this); - var dialog = new openerp.web.Dialog(this, { - width: 800, - height: 600, - buttons : { - Cancel : function() { - $(this).dialog('destroy'); - }, - Save : function() { - var form_view = action_manager.inner_viewmanager.views.form.controller; - - form_view.do_save(function() { - self.reloadView(); - }); - $(this).dialog('destroy'); - } - } - }).start().open(); - action_manager.appendTo(dialog.$element); - action_manager.do_action({ - res_model : this.dataset.model, - res_id: event_id, - views : [[false, 'form']], - type : 'ir.actions.act_window', - auto_search : false, - flags : { - search_view: false, - sidebar : false, - views_switcher : false, - action_buttons : false, - pager: false - } + var pop = new openerp.web.form.FormOpenPopup(this); + + pop.show_element(this.model, event_id, this.context || this.dataset.context, {}); + + pop.on_write_completed.add_last(function() { + self.reloadView(); }); }, - - reloadView: function() { - this.on_project_loaded(this.database_projects); + + set_width: function() { + $gantt_panel.width(1); + jQuery(".ganttTaskPanel").parent().width(1); + + var search_wdt = jQuery("#oe_app_search").width(); + var day_wdt = jQuery(".ganttDayPanel").children().children().width(); + jQuery('#GanttView').css('width','100%'); + + if (search_wdt - day_wdt <= name_min_wdt){ + jQuery(".ganttTaskPanel").parent().width(search_wdt - name_min_wdt); + jQuery(".ganttTaskPanel").width(search_wdt - name_min_wdt); + jQuery(".ganttDayPanel").width(search_wdt - name_min_wdt - 14); + jQuery('.task-name').width(name_min_wdt); + jQuery('.task-name').children().width(name_min_wdt); + }else{ + jQuery(".ganttTaskPanel").parent().width(day_wdt); + jQuery(".ganttTaskPanel").width(day_wdt); + jQuery(".taskPanel").width(day_wdt - 16); + jQuery(".ganttDayPanel").width(day_wdt -16); + jQuery('.task-name').width(search_wdt - day_wdt); + jQuery('.task-name').children().width(search_wdt - day_wdt); + } + + }, + + end_date: function(dat, duration) { + + var self = this; + + var dat = this.convert_str_date(dat); + + var day = Math.floor(duration/self.day_length); + var hrs = duration % self.day_length; + + dat.add(day).days(); + dat.add(hrs).hour(); + + return dat; + }, + + hours_between: function(date1, date2, parent_task) { + + var ONE_DAY = 1000 * 60 * 60 * 24; + var date1_ms = date1.getTime(); + var date2_ms = date2.getTime(); + var difference_ms = Math.abs(date1_ms - date2_ms); + + var d = parent_task? Math.ceil(difference_ms / ONE_DAY) : Math.floor(difference_ms / ONE_DAY); + var h = (difference_ms % ONE_DAY)/(1000 * 60 * 60); + var num = (d * this.day_length) + h; + return parseFloat(num.toFixed(2)); + + }, + + render_events : function(all_events, j) { + + var self = this; + for (var i in all_events){ + var res = all_events[i]; + if ((typeof(res['evt'][3])) == "object"){ + res['evt'][3] = self.hours_between(res['evt'][2],res['evt'][3], true); + } + + k = res['evt'][0].toString().indexOf('_'); + + if (k != -1) { + if (res['evt'][0].substring(k) == "_"+j){ + if (j == 0){ + task = new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], ""); + self.project.addTask(task); + } else { + task = new GanttTaskInfo(res['evt'][0], res['evt'][1], res['evt'][2], res['evt'][3], res['evt'][4], ""); + prt = self.project.getTaskById(res['parent']); + prt.addChildTask(task); + } + } + } + } }, do_show: function () { @@ -370,9 +450,49 @@ init: function(parent, dataset, view_id) { this.$element.hide(); }, + convert_str_date: function (str) { + if (typeof str == 'string') { + if (str.length == 19) { + this.date_format = "yyyy-MM-dd HH:mm:ss"; + return openerp.web.str_to_datetime(str); + } + else + if (str.length == 10) { + this.date_format = "yyyy-MM-dd"; + return openerp.web.str_to_date(str); + } + else + if (str.length == 8) { + this.date_format = "HH:mm:ss"; + return openerp.web.str_to_time(str); + } + throw "Unrecognized date/time format"; + } else { + return str; + } + }, + + convert_date_str: function(full_date) { + if (this.date_format == "yyyy-MM-dd HH:mm:ss"){ + return openerp.web.datetime_to_str(full_date); + } else if (this.date_format == "yyyy-MM-dd"){ + return openerp.web.date_to_str(full_date); + } else if (this.date_format == "HH:mm:ss"){ + return openerp.web.time_to_str(full_date); + } + throw "Unrecognized date/time format"; + }, + + reloadView: function() { + return this.on_project_loaded(this.database_projects); + }, + do_search: function (domains, contexts, groupbys) { var self = this; this.group_by = groupbys; + if(this.fields_view.arch.attrs.default_group_by) { + this.group_by = _.uniq(this.group_by.concat(this.fields_view.arch.attrs.default_group_by.split(','))); + } $.when(this.has_been_loaded).then(function() { self.dataset.read_slice([], { domain: domains, From 79e2bcc6c9e5bf58dc026da0edebc84faff4a28f Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 24 Nov 2011 16:47:56 +0530 Subject: [PATCH 18/55] [FIX] Get Task from tree panel using Project info. bzr revid: vda@tinyerp.com-20111124111756-upaxyocg9b1v178u --- addons/web_gantt/static/src/js/gantt.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 07b754890b1..84b36a2f4dd 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -309,9 +309,11 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ }, 200); }); $("div #_1, div #_1 + div").hide(); + _.each(final_events, function(id) { - self.$element.find('.taskNameItem[id="'+id+'"]').click(function() { - self.editTask(self.ganttChartControl.getProjectById("_1").getTaskById(id)); + var Task = self.ganttChartControl.getProjectById("_1").getTaskById(id); + Task.cTaskNameItem[0].click(function() { + self.editTask(Task); }) }); }, From 321bc449c4bf486f0eca89449df9800c565c66f7 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 24 Nov 2011 16:51:38 +0530 Subject: [PATCH 19/55] [FIX] Oops! event binding on dom.jqueryfy dom. bzr revid: vda@tinyerp.com-20111124112138-w900u1bflff5e4zv --- addons/web_gantt/static/src/js/gantt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 84b36a2f4dd..29f6fc70b9d 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -312,7 +312,7 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ _.each(final_events, function(id) { var Task = self.ganttChartControl.getProjectById("_1").getTaskById(id); - Task.cTaskNameItem[0].click(function() { + $(Task.cTaskNameItem[0]).click(function() { self.editTask(Task); }) }); From e80e028dfe5df256a9ab79d4c2540ba6020ab650 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 24 Nov 2011 17:34:08 +0530 Subject: [PATCH 20/55] [FIX] display name if no fields defined. bzr revid: vda@tinyerp.com-20111124120408-fj2khgq8d4417ui7 --- addons/web_gantt/static/src/js/gantt.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 29f6fc70b9d..558224b4578 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -38,9 +38,12 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ this.color_field = this.fields_view.arch.attrs.color, this.colors = this.fields_view.arch.attrs.colors; - var level = this.fields_view.arch.children[0]; - this.parent = level.attrs.link, - this.text = level.children.length ? level.children[0].attrs.name : level.attrs.name; + if (this.fields_view.arch.children.length) { + var level = this.fields_view.arch.children[0]; + this.parent = level.attrs.link, this.text = level.children.length ? level.children[0].attrs.name : level.attrs.name; + } else { + this.text = 'name'; + } if (!this.date_start) { return self.do_warn(_t("date_start is not defined ")) @@ -308,7 +311,10 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ self.reloadView(); }, 200); }); - $("div #_1, div #_1 + div").hide(); + + $(self.ganttChartControl.getProjectById("_1").projectItem[0]).hide(); + $(self.ganttChartControl.getProjectById("_1").projectNameItem).hide(); + $(self.ganttChartControl.getProjectById("_1").descrProject).hide(); _.each(final_events, function(id) { var Task = self.ganttChartControl.getProjectById("_1").getTaskById(id); From 365c5d57fd7e1bf3f387e7c8ed815ba294360ec2 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Thu, 24 Nov 2011 18:19:44 +0530 Subject: [PATCH 21/55] [FIX] reset groupbys. bzr revid: vda@tinyerp.com-20111124124944-mywfq45lx5uypptm --- addons/web_gantt/static/src/js/gantt.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 558224b4578..70a34968775 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -497,10 +497,15 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ do_search: function (domains, contexts, groupbys) { var self = this; - this.group_by = groupbys; - if(this.fields_view.arch.attrs.default_group_by) { - this.group_by = _.uniq(this.group_by.concat(this.fields_view.arch.attrs.default_group_by.split(','))); + this.group_by = []; + if (this.fields_view.arch.attrs.default_group_by) { + this.group_by = this.fields_view.arch.attrs.default_group_by.split(','); } + + if (groupbys.length) { + this.group_by = groupbys; + } + $.when(this.has_been_loaded).then(function() { self.dataset.read_slice([], { domain: domains, From d1ea780e9d79418a594c1a16fd410e0bf26955f3 Mon Sep 17 00:00:00 2001 From: "Vaibhav (OpenERP)" Date: Fri, 25 Nov 2011 13:28:42 +0530 Subject: [PATCH 22/55] [FIX] can Add new task.reload. bzr revid: vda@tinyerp.com-20111125075842-pbhwo4tno13hz8go --- addons/web_gantt/static/src/js/gantt.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/addons/web_gantt/static/src/js/gantt.js b/addons/web_gantt/static/src/js/gantt.js index 70a34968775..77a2d7a22cb 100644 --- a/addons/web_gantt/static/src/js/gantt.js +++ b/addons/web_gantt/static/src/js/gantt.js @@ -312,12 +312,13 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ }, 200); }); - $(self.ganttChartControl.getProjectById("_1").projectItem[0]).hide(); - $(self.ganttChartControl.getProjectById("_1").projectNameItem).hide(); - $(self.ganttChartControl.getProjectById("_1").descrProject).hide(); + var Project = self.ganttChartControl.getProjectById("_1"); + $(Project.projectItem[0]).hide(); + $(Project.projectNameItem).hide(); + $(Project.descrProject).hide(); _.each(final_events, function(id) { - var Task = self.ganttChartControl.getProjectById("_1").getTaskById(id); + var Task = Project.getTaskById(id); $(Task.cTaskNameItem[0]).click(function() { self.editTask(Task); }) @@ -365,7 +366,13 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({ pop.show_element(this.model, event_id, this.context || this.dataset.context, {}); - pop.on_write_completed.add_last(function() { + pop.on_write.add(function(id, data) { + var get_project = _.find(self.database_projects, function(project){ return project.id == id}); + if (get_project) { + _.extend(get_project, data); + } else { + _.extend(self.database_projects, _.extend(data, {'id': id})); + } self.reloadView(); }); }, From 342b0a1ac8b37d6bfb2a0ff3cf7dfdd6cb37b504 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Tue, 29 Nov 2011 12:00:29 +0530 Subject: [PATCH 23/55] [IMP] To show many2many field on form view. bzr revid: jra@tinyerp.com-20111129063029-6pvqwh4uvts1pcft --- addons/web_mobile/static/src/xml/web_mobile.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 1d6f81404d2..1deb752cab6 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -298,13 +298,22 @@
      -
    • +
    • -
    -
    +
+
+ + + From 4cb6d48f1ff5fa21244396768ed82860f7ceb4a6 Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Wed, 30 Nov 2011 16:56:14 +0530 Subject: [PATCH 24/55] [IMP] Improve m2m and o2m to show selected record in formview. bzr revid: jra@tinyerp.com-20111130112614-qrkmra8rzok7nksn --- .../web_mobile/static/src/js/form_mobile.js | 136 ++++++------------ .../web_mobile/static/src/xml/web_mobile.xml | 19 +-- 2 files changed, 47 insertions(+), 108 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index cc816b75a21..13ff38bca5c 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -41,13 +41,13 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ var fields = result.fields; var view_fields = result.arch.children; var get_fields = this.get_fields(view_fields); + var values = self.datarecord; for (var j = 0; j < view_fields.length; j++) { if (view_fields[j].tag == 'notebook') { var notebooks = view_fields[j]; } } - self.$element.html(self.render({'get_fields': get_fields, 'notebooks': notebooks || false, 'fields' : fields, 'values' : self.datarecord ,'temp_flag':'1'})); - self.formatdata(get_fields, fields, result, self.datarecord,self.element_id,'element'); + self.$element.html(self.render({'get_fields': get_fields, 'notebooks': notebooks || false, 'fields' : fields, 'values' : values ,'temp_flag':'1'})); self.$element.find("[data-role=header]").find('h1').html(self.head_title); self.$element.find("[data-role=header]").find('#home').click(function(){ $.mobile.changePage("#oe_menu", "slide", false, true); @@ -55,110 +55,56 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').each(function(i){ for (var k = 0; k < notebooks.children.length; k++) { if (notebooks.children[k].attrs.string == $(this).attr('id')) { - get_fields = self.get_fields(notebooks.children[k].children); - for (var i = 0; i < get_fields.length; i++) { - if (fields[get_fields[i].attrs.name].type == 'one2many'){ - self.relational_fields = get_fields[i].attrs.name; - if(fields[get_fields[i].attrs.name].views.form){ - var get_fields_test = self.get_fields(fields[get_fields[i].attrs.name].views.form.arch.children); - var fields_test = fields[get_fields[i].attrs.name]['views'].form.fields; - var notebook=fields[get_fields[i].attrs.name].views.form.arch; - } - } - } - $(this).find('div#page_content').html(self.render({'get_fields': get_fields,'fields' : result.fields, 'values' : self.datarecord})); + get_fields_notebook = self.get_fields(notebooks.children[k].children); + $(this).find('div#page_content').html(self.render({'get_fields': get_fields_notebook,'fields' : fields, 'values' : values})); } - self.formatdata(get_fields, fields, result, self.datarecord,'page_content','element'); } }); - self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').find('div#page_content').find('[data-role=content]').find('ul').find('li').click(function(ev){ + self.$element.find('#o2m_m2m').click(function(ev) { ev.preventDefault(); ev.stopPropagation(); - var latid,lastid; - $(this).parents().each(function(){ - latid = $(this).attr('id'); - self.$element.find('[data-role=collapsible-set]').find('[data-role=collapsible]').each(function(){ - if(latid==$(this).attr('id')){ - lastid = $(this).attr('id'); - } - }); - }); var relational = $(this).attr('for'); - if(result.fields[relational]){ - var head = $.trim($(this).text()); - var dataset = new openerp.web.DataSetSearch(self, result.fields[relational].relation, result.fields[relational].context); - dataset.domain=[['id', 'in', self.datarecord[relational]]]; - dataset.read_slice([], {limit:80}, function(result1,ids){ + var rel_field = fields[relational]; + var head = rel_field.string; + var rel_model = rel_field.relation; + var rel_ids = values[relational]; + if (rel_ids) { + var datasearch = new openerp.web.DataSetSearch(self, rel_field.relation, rel_field.context); + datasearch.domain=[['id', 'in', rel_ids]]; + datasearch.read_slice([], {limit:80}, function(listrec){ _.extend(self.action.context,{"html_name_get" : true}); - var dataset1 = new openerp.web.DataSet(self, result.fields[relational].relation,result.fields[relational].context); - dataset1.name_get(result1,function(res){ - var additional = ""; - if(res['html_name_get']){ - additional = res['display']; - } - if(!$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html()){ - $('
').appendTo('#moe'); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html(openerp.web.qweb.render("ListView", {'records' : res,'data': additional})); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('h1').html(head); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('#home').click(function(){ - $.mobile.changePage("#oe_menu", "slide", false, true); - }); - $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("a#list-id").click(function(ev){ - ev.preventDefault(); - ev.stopPropagation(); - var head_title = $(this).text(); - var listid = $(ev.currentTarget).data('id'); - dataset = new openerp.web.DataSetSearch(self, dataset.model, null, null); - dataset.read_slice([],{}, function (result_relational) { - for (var i = 0; i < result_relational.length; i++) { - if (result_relational[i].id == listid) { - var data_relational = result_relational[i]; - } - } - if(!$('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html()){ - $('
').appendTo('#moe'); - for (var k = 0; k < notebooks.children.length; k++) { - if (notebooks.children[k].attrs.string == lastid) { - get_fields = self.get_fields(notebooks.children[k].children); - for (var i = 0; i < get_fields.length; i++) { - if (fields[get_fields[i].attrs.name].type == 'one2many'){ - self.relational_fields = get_fields[i].attrs.name; - if(fields[get_fields[i].attrs.name].views.form){ - var get_fields_test = self.get_fields(fields[get_fields[i].attrs.name].views.form.arch.children); - var fields_test = fields[get_fields[i].attrs.name]['views'].form.fields; - var notebook=fields[get_fields[i].attrs.name].views.form.arch; - } - } - } - } - } - if(notebook){ - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html(self.render({'get_fields': get_fields_test, 'notebooks': false, 'fields' : fields_test, 'values' : data_relational, 'temp_flag':'1' })); - }else{ - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').html(self.render({'get_fields': get_fields_test, 'notebooks': false, 'fields' : fields, 'values' : data_relational, 'temp_flag':'1' })); - } - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('h1').html(head_title); - $('[id^="oe_form_'+listid+result.fields[relational].relation+'"]').find("[data-role=header]").find('#home').click(function(){ - $.mobile.changePage("#oe_menu", "slide", false, true); - }); - if(notebook){ - self.formatdata(get_fields_test, fields_test, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); - }else{ - self.formatdata(get_fields_test, fields, result, data_relational,'oe_form_'+listid+result.fields[relational].relation,'element'); - } - $.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", false, true); - self.formatdata('', '', '', '','oe_form_'+listid+result.fields[relational].relation,'slider'); + var dataset = new openerp.web.DataSet(self, rel_field.relation,rel_field.context); + dataset.name_get(listrec,function(res){ + var additional = ""; + if(res['html_name_get']){ + additional = res['display']; + } + if(!$('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html()){ + $('
').appendTo('#moe'); + $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').html(openerp.web.qweb.render("ListView", {'records' : res,'data': additional})); + $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('h1').html(head); + $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("[data-role=header]").find('#home').click(function(){ + $.mobile.changePage("#oe_menu", "slide", false, true); + }); + $('[id^="oe_list_'+relational+'_'+self.element_id+'"]').find("a#list-id").click(function(ev){ + ev.preventDefault(); + ev.stopPropagation(); + var head_title = $(this).text(); + var listid = $(ev.currentTarget).data('id'); + if(!$('[id^="oe_form_'+listid+rel_field.relation+'"]').html()){ + $('
').appendTo('#moe'); + this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+listid+rel_field.relation, listid, '', head, rel_field.relation, false); + this.formview.start(); }else{ - $.mobile.changePage('#oe_form_'+listid+result.fields[relational].relation, "slide", false, true); + $.mobile.changePage('#oe_form_'+listid+rel_field.relation, "slide", false, true); } }); - }); - $.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true); - }else{ - $.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true); - } + $.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true); + }else{ + $.mobile.changePage("#oe_list_"+relational+"_"+self.element_id, "slide", false, true); + } }); - }); + }); } }); self.$element.find('#m2o_btn').click(this.open_m2o_form); diff --git a/addons/web_mobile/static/src/xml/web_mobile.xml b/addons/web_mobile/static/src/xml/web_mobile.xml index 1deb752cab6..f94117e6e0e 100644 --- a/addons/web_mobile/static/src/xml/web_mobile.xml +++ b/addons/web_mobile/static/src/xml/web_mobile.xml @@ -279,7 +279,9 @@
@@ -296,24 +298,15 @@ - + - - - From 4d9356f555aca96420f984dce65b7dc8d66e2078 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Thu, 1 Dec 2011 10:42:04 +0100 Subject: [PATCH 25/55] [IMP] Make wording consistent: Internal Picking List bzr revid: ls@numerigraphe.fr-20111201094204-a7xb1sxswch3itze --- addons/mrp/i18n/ar.po | 2 +- addons/mrp/i18n/bg.po | 2 +- addons/mrp/i18n/bs.po | 2 +- addons/mrp/i18n/ca.po | 4 ++-- addons/mrp/i18n/cs.po | 2 +- addons/mrp/i18n/da.po | 2 +- addons/mrp/i18n/de.po | 4 ++-- addons/mrp/i18n/el.po | 4 ++-- addons/mrp/i18n/es.po | 4 ++-- addons/mrp/i18n/es_AR.po | 2 +- addons/mrp/i18n/es_CL.po | 4 ++-- addons/mrp/i18n/es_EC.po | 4 ++-- addons/mrp/i18n/es_MX.po | 4 ++-- addons/mrp/i18n/es_VE.po | 4 ++-- addons/mrp/i18n/et.po | 2 +- addons/mrp/i18n/fi.po | 4 ++-- addons/mrp/i18n/fr.po | 4 ++-- addons/mrp/i18n/gl.po | 2 +- addons/mrp/i18n/hi.po | 2 +- addons/mrp/i18n/hr.po | 2 +- addons/mrp/i18n/hu.po | 2 +- addons/mrp/i18n/id.po | 2 +- addons/mrp/i18n/it.po | 4 ++-- addons/mrp/i18n/ko.po | 4 ++-- addons/mrp/i18n/lt.po | 4 ++-- addons/mrp/i18n/mrp.pot | 2 +- addons/mrp/i18n/nb.po | 2 +- addons/mrp/i18n/nl.po | 4 ++-- addons/mrp/i18n/nl_BE.po | 2 +- addons/mrp/i18n/pl.po | 4 ++-- addons/mrp/i18n/pt.po | 4 ++-- addons/mrp/i18n/pt_BR.po | 4 ++-- addons/mrp/i18n/ro.po | 2 +- addons/mrp/i18n/ru.po | 4 ++-- addons/mrp/i18n/sk.po | 2 +- addons/mrp/i18n/sl.po | 2 +- addons/mrp/i18n/sq.po | 2 +- addons/mrp/i18n/sr@latin.po | 2 +- addons/mrp/i18n/sv.po | 6 +++--- addons/mrp/i18n/tlh.po | 2 +- addons/mrp/i18n/tr.po | 2 +- addons/mrp/i18n/uk.po | 2 +- addons/mrp/i18n/vi.po | 2 +- addons/mrp/i18n/zh_CN.po | 4 ++-- addons/mrp/i18n/zh_HK.po | 4 ++-- addons/mrp/i18n/zh_TW.po | 4 ++-- addons/mrp/mrp.py | 2 +- addons/stock/i18n/ar.po | 2 +- addons/stock/i18n/bg.po | 2 +- addons/stock/i18n/bs.po | 2 +- addons/stock/i18n/ca.po | 2 +- addons/stock/i18n/cs.po | 2 +- addons/stock/i18n/da.po | 2 +- addons/stock/i18n/de.po | 2 +- addons/stock/i18n/el.po | 2 +- addons/stock/i18n/es.po | 2 +- addons/stock/i18n/es_AR.po | 2 +- addons/stock/i18n/es_CL.po | 2 +- addons/stock/i18n/es_EC.po | 2 +- addons/stock/i18n/es_MX.po | 2 +- addons/stock/i18n/es_MX.po.moved | 2 +- addons/stock/i18n/es_VE.po | 2 +- addons/stock/i18n/et.po | 2 +- addons/stock/i18n/fi.po | 2 +- addons/stock/i18n/fr.po | 2 +- addons/stock/i18n/gl.po | 2 +- addons/stock/i18n/hr.po | 2 +- addons/stock/i18n/hu.po | 2 +- addons/stock/i18n/id.po | 2 +- addons/stock/i18n/it.po | 2 +- addons/stock/i18n/ko.po | 2 +- addons/stock/i18n/lt.po | 2 +- addons/stock/i18n/lv.po | 2 +- addons/stock/i18n/mn.po | 2 +- addons/stock/i18n/nb.po | 2 +- addons/stock/i18n/nl.po | 2 +- addons/stock/i18n/nl_BE.po | 2 +- addons/stock/i18n/pl.po | 2 +- addons/stock/i18n/pt.po | 2 +- addons/stock/i18n/pt_BR.po | 2 +- addons/stock/i18n/ro.po | 2 +- addons/stock/i18n/ru.po | 2 +- addons/stock/i18n/sl.po | 2 +- addons/stock/i18n/sq.po | 2 +- addons/stock/i18n/sr.po | 2 +- addons/stock/i18n/sr@latin.po | 2 +- addons/stock/i18n/stock.pot | 2 +- addons/stock/i18n/sv.po | 2 +- addons/stock/i18n/th.po | 2 +- addons/stock/i18n/tlh.po | 2 +- addons/stock/i18n/tr.po | 2 +- addons/stock/i18n/uk.po | 2 +- addons/stock/i18n/vi.po | 2 +- addons/stock/i18n/zh_CN.po | 2 +- addons/stock/i18n/zh_TW.po | 2 +- addons/stock/stock_view.xml | 2 +- 96 files changed, 119 insertions(+), 119 deletions(-) diff --git a/addons/mrp/i18n/ar.po b/addons/mrp/i18n/ar.po index c8a56267090..94608cb0d13 100644 --- a/addons/mrp/i18n/ar.po +++ b/addons/mrp/i18n/ar.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/bg.po b/addons/mrp/i18n/bg.po index cc97c80360f..161a203a665 100644 --- a/addons/mrp/i18n/bg.po +++ b/addons/mrp/i18n/bg.po @@ -1273,7 +1273,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/bs.po b/addons/mrp/i18n/bs.po index f5106281e27..3fc14f8e4da 100644 --- a/addons/mrp/i18n/bs.po +++ b/addons/mrp/i18n/bs.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/ca.po b/addons/mrp/i18n/ca.po index c6d359150ec..3348b06a9d4 100644 --- a/addons/mrp/i18n/ca.po +++ b/addons/mrp/i18n/ca.po @@ -1320,7 +1320,7 @@ msgstr "Ubicació on el sistema emmagatzemarà els productes finalitzats." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Aquest és l'albarà intern que porta el producte acabat cap al pla de " @@ -2787,7 +2787,7 @@ msgstr "Any" #~ msgstr "Planificació ordres de producció" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Aquesta és la llista de empaquetat interna que porta les matèries primeres a " diff --git a/addons/mrp/i18n/cs.po b/addons/mrp/i18n/cs.po index 5244b3928c6..8063599609a 100644 --- a/addons/mrp/i18n/cs.po +++ b/addons/mrp/i18n/cs.po @@ -1257,7 +1257,7 @@ msgstr "Umístění kde systém naskladní hotové výrobky." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/da.po b/addons/mrp/i18n/da.po index 17a13380616..eb90494e0b2 100644 --- a/addons/mrp/i18n/da.po +++ b/addons/mrp/i18n/da.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/de.po b/addons/mrp/i18n/de.po index 73f62cd257d..10b3cf4f985 100644 --- a/addons/mrp/i18n/de.po +++ b/addons/mrp/i18n/de.po @@ -1323,7 +1323,7 @@ msgstr "Ort, an dem das System die Fertigprodukte einlagern wird." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Dies ist ein interner Lieferauftrag, der die gefertigten Produkte in den " @@ -2807,7 +2807,7 @@ msgstr "Jahr" #~ "Faktor der alle angefallenen Zeiten dieses Arbeitsplatzes multipliziert." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Diese interne Packliste liefert die Rohmaterialien zum Fertigungsort " diff --git a/addons/mrp/i18n/el.po b/addons/mrp/i18n/el.po index 8120ac8bb2f..ac7d9b79d21 100644 --- a/addons/mrp/i18n/el.po +++ b/addons/mrp/i18n/el.po @@ -1249,7 +1249,7 @@ msgstr "Τοποθεσία όπου το σύστημα θα αποθηκεύσ #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2670,7 +2670,7 @@ msgstr "" #~ "Παράγοντας που πολλαπλασιάζει όλους τους χρόνους ενός κέντρου εργασίας." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Αυτή είναι η εσωτερική λίστα επιλογής που φέρνει τις α' ύλες στο πλάνο " diff --git a/addons/mrp/i18n/es.po b/addons/mrp/i18n/es.po index bb45000dc25..6ace1a95a44 100644 --- a/addons/mrp/i18n/es.po +++ b/addons/mrp/i18n/es.po @@ -1321,7 +1321,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este es el albarán interno que trae el producto terminado hacia el plan de " @@ -2803,7 +2803,7 @@ msgstr "Año" #~ "producción." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ésta es la lista de empaquetado interna que lleva las materias primas a la " diff --git a/addons/mrp/i18n/es_AR.po b/addons/mrp/i18n/es_AR.po index f3c9ec67c23..6142eee483b 100644 --- a/addons/mrp/i18n/es_AR.po +++ b/addons/mrp/i18n/es_AR.po @@ -1295,7 +1295,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/es_CL.po b/addons/mrp/i18n/es_CL.po index 5b574d2578d..a99cc9a1be8 100644 --- a/addons/mrp/i18n/es_CL.po +++ b/addons/mrp/i18n/es_CL.po @@ -1320,7 +1320,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este es el albarán interno que trae el producto terminado hacia el plan de " @@ -2826,7 +2826,7 @@ msgstr "Año" #~ "producción." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ésta es la lista de empaquetado interna que lleva las materias primas a la " diff --git a/addons/mrp/i18n/es_EC.po b/addons/mrp/i18n/es_EC.po index a11178e0c8e..f971b583ff4 100644 --- a/addons/mrp/i18n/es_EC.po +++ b/addons/mrp/i18n/es_EC.po @@ -1320,7 +1320,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este es el albarán interno que trae el producto terminado hacia el plan de " @@ -2767,7 +2767,7 @@ msgstr "Año" #~ "producción." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ésta es la lista de empaquetado interna que lleva las materias primas a la " diff --git a/addons/mrp/i18n/es_MX.po b/addons/mrp/i18n/es_MX.po index 4504a8e2f95..82d584be219 100644 --- a/addons/mrp/i18n/es_MX.po +++ b/addons/mrp/i18n/es_MX.po @@ -1321,7 +1321,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este es el albarán interno que trae el producto terminado hacia el plan de " @@ -2803,7 +2803,7 @@ msgstr "Año" #~ "producción." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ésta es la lista de empaquetado interna que lleva las materias primas a la " diff --git a/addons/mrp/i18n/es_VE.po b/addons/mrp/i18n/es_VE.po index 4504a8e2f95..82d584be219 100644 --- a/addons/mrp/i18n/es_VE.po +++ b/addons/mrp/i18n/es_VE.po @@ -1321,7 +1321,7 @@ msgstr "Ubicación donde el sistema almacenará los productos finalizados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este es el albarán interno que trae el producto terminado hacia el plan de " @@ -2803,7 +2803,7 @@ msgstr "Año" #~ "producción." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ésta es la lista de empaquetado interna que lleva las materias primas a la " diff --git a/addons/mrp/i18n/et.po b/addons/mrp/i18n/et.po index 8e2648993cb..049331a2169 100644 --- a/addons/mrp/i18n/et.po +++ b/addons/mrp/i18n/et.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/fi.po b/addons/mrp/i18n/fi.po index 78a0b3583b9..0f59debbecd 100644 --- a/addons/mrp/i18n/fi.po +++ b/addons/mrp/i18n/fi.po @@ -1285,7 +1285,7 @@ msgstr "Paikka jonne järjestelmä varastoi valmiit tuotteet." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Tämä on sisäinen keräilyslista joka tuo lopputuotteen tuontatosuunnitelmaan" @@ -2760,7 +2760,7 @@ msgstr "Vuosi" #~ msgstr "Odottaa" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "Tämä sisäinen keräyslista tuo raaka-aineet tuotantosuunnitelmaan." diff --git a/addons/mrp/i18n/fr.po b/addons/mrp/i18n/fr.po index 884c885b019..191e378ab15 100644 --- a/addons/mrp/i18n/fr.po +++ b/addons/mrp/i18n/fr.po @@ -1374,7 +1374,7 @@ msgstr "Emplacement où le système stockera les produits finis." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "C'est le bon de transfert interne qui fournit les produits finis au plan de " @@ -3102,7 +3102,7 @@ msgstr "Année" #~ "production" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Ceci est la liste interne des matières premières pour le plan de production." diff --git a/addons/mrp/i18n/gl.po b/addons/mrp/i18n/gl.po index 3ba7c6c8c85..864a977ee3c 100644 --- a/addons/mrp/i18n/gl.po +++ b/addons/mrp/i18n/gl.po @@ -1314,7 +1314,7 @@ msgstr "Lugar onde almacenará o sistema os produtos rematados" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Este é o albará interno que trae o produto rematado ó plan de produción." diff --git a/addons/mrp/i18n/hi.po b/addons/mrp/i18n/hi.po index 40199555bbc..ff0b370038c 100644 --- a/addons/mrp/i18n/hi.po +++ b/addons/mrp/i18n/hi.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/hr.po b/addons/mrp/i18n/hr.po index 0f488328de2..45127592b63 100644 --- a/addons/mrp/i18n/hr.po +++ b/addons/mrp/i18n/hr.po @@ -1242,7 +1242,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/hu.po b/addons/mrp/i18n/hu.po index 85e7187ff40..3a66d74b098 100644 --- a/addons/mrp/i18n/hu.po +++ b/addons/mrp/i18n/hu.po @@ -1247,7 +1247,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/id.po b/addons/mrp/i18n/id.po index f59cf77019d..5d226463249 100644 --- a/addons/mrp/i18n/id.po +++ b/addons/mrp/i18n/id.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/it.po b/addons/mrp/i18n/it.po index 3b238fffc78..6dc1bce1ddf 100644 --- a/addons/mrp/i18n/it.po +++ b/addons/mrp/i18n/it.po @@ -1316,7 +1316,7 @@ msgstr "Ubicazione dove il sistema stoccherà i prodotti finiti" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Questa è la lista dei prelievi interni necessari per la pianificazione della " @@ -2814,7 +2814,7 @@ msgstr "Anno" #~ msgstr "Dallo stock: articoli assegnati." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "Questa è la lista di prelievo dei materiali" diff --git a/addons/mrp/i18n/ko.po b/addons/mrp/i18n/ko.po index 3fbc4c82d4c..b9ace6b27d1 100644 --- a/addons/mrp/i18n/ko.po +++ b/addons/mrp/i18n/ko.po @@ -1243,7 +1243,7 @@ msgstr "완제품을 보관할 시스템의 위치" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2550,7 +2550,7 @@ msgstr "" #~ msgstr "수량" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "원재료를 생산 플랜에 가져갈 내부 피킹 리스트" diff --git a/addons/mrp/i18n/lt.po b/addons/mrp/i18n/lt.po index 44665d98443..dfd903b351a 100644 --- a/addons/mrp/i18n/lt.po +++ b/addons/mrp/i18n/lt.po @@ -1247,7 +1247,7 @@ msgstr "Vieta, kurioje talpinami pabaigti produktai ." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2603,7 +2603,7 @@ msgstr "" #~ msgstr "Faktorius kuris dalina visus laikus nurodytus prie darbo centro." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "Tai yra vidinis važtaraštis, perduodantis žaliavas į gamybą." diff --git a/addons/mrp/i18n/mrp.pot b/addons/mrp/i18n/mrp.pot index 25a8bea531d..937fd9f45c4 100644 --- a/addons/mrp/i18n/mrp.pot +++ b/addons/mrp/i18n/mrp.pot @@ -1165,7 +1165,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 -msgid "This is the internal picking list that brings the finished product to the production plan" +msgid "This is the Internal Picking List that brings the finished product to the production plan" msgstr "" #. module: mrp diff --git a/addons/mrp/i18n/nb.po b/addons/mrp/i18n/nb.po index 2bd9cc375b1..8b0e1f6eb9d 100644 --- a/addons/mrp/i18n/nb.po +++ b/addons/mrp/i18n/nb.po @@ -1306,7 +1306,7 @@ msgstr "Lokasjon hvor systemet vil plassere de ferdige produktene." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Dette er den interne plukklisten som flytter det ferdige produktet til " diff --git a/addons/mrp/i18n/nl.po b/addons/mrp/i18n/nl.po index a54013b441c..178e1f4ed50 100644 --- a/addons/mrp/i18n/nl.po +++ b/addons/mrp/i18n/nl.po @@ -1245,7 +1245,7 @@ msgstr "Locatie waar de eindproducten opgeslagen worden" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2732,7 +2732,7 @@ msgstr "" #~ msgstr "uit voorraad en geen minimum bestelpunt regel gedefinieerd" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Dit is de interne pakbon om de grondstoffen naar de productie te brengen" diff --git a/addons/mrp/i18n/nl_BE.po b/addons/mrp/i18n/nl_BE.po index bf55c83626f..909ec5dff94 100644 --- a/addons/mrp/i18n/nl_BE.po +++ b/addons/mrp/i18n/nl_BE.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/pl.po b/addons/mrp/i18n/pl.po index fd8dd6e2272..100841c02e1 100644 --- a/addons/mrp/i18n/pl.po +++ b/addons/mrp/i18n/pl.po @@ -1280,7 +1280,7 @@ msgstr "Strefa, w której system umieści gotowe produkty." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "To jest wewnętrzne pobranie, które przenosi gotowe produkty do planu " @@ -3156,7 +3156,7 @@ msgstr "Rok" #~ msgstr "Pobranie" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "To jest pobranie (przesunięcie wewnętrzne), które dostarcza materiały do " diff --git a/addons/mrp/i18n/pt.po b/addons/mrp/i18n/pt.po index 9574e9dc573..eae6cf0eed4 100644 --- a/addons/mrp/i18n/pt.po +++ b/addons/mrp/i18n/pt.po @@ -1259,7 +1259,7 @@ msgstr "Locais onde o sistema vai armazenar os produtos acabados." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2878,7 +2878,7 @@ msgstr "Ano" #~ "Factor que multiplica todas as horas expressas no centro de trabalho." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Esta é a lista interna de recolha para trazer as matérias primas para o " diff --git a/addons/mrp/i18n/pt_BR.po b/addons/mrp/i18n/pt_BR.po index e55389cc1ec..9fb1e6286f9 100644 --- a/addons/mrp/i18n/pt_BR.po +++ b/addons/mrp/i18n/pt_BR.po @@ -1315,7 +1315,7 @@ msgstr "Local onde o sistema estocará os produtos acabados" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Esta é a Lista de Separação Interna que traz o produto acabado para o plano " @@ -3043,7 +3043,7 @@ msgstr "Ano" #~ msgstr "Uso do roteamento do centro de trabalho" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Esta é a lista de seleção interna que leva as matérias-primas para o plano " diff --git a/addons/mrp/i18n/ro.po b/addons/mrp/i18n/ro.po index e8e13f497d1..d3e019367b8 100644 --- a/addons/mrp/i18n/ro.po +++ b/addons/mrp/i18n/ro.po @@ -1308,7 +1308,7 @@ msgstr "Locația în care sistemul va stoca produsele finite." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/ru.po b/addons/mrp/i18n/ru.po index 0c804f401be..42c73582863 100644 --- a/addons/mrp/i18n/ru.po +++ b/addons/mrp/i18n/ru.po @@ -1293,7 +1293,7 @@ msgstr "Местоположение, в которое помещаются г #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" "Это внутренняя комплектовочная ведомость, которая соотносит готовую " @@ -2790,7 +2790,7 @@ msgstr "Год" #~ msgstr "Итого" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" #~ "Внутренне перемещение расходных материалов со склада на производственный " diff --git a/addons/mrp/i18n/sk.po b/addons/mrp/i18n/sk.po index c74a1d09c53..e0a6aad4868 100644 --- a/addons/mrp/i18n/sk.po +++ b/addons/mrp/i18n/sk.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/sl.po b/addons/mrp/i18n/sl.po index 29d4f7054ae..278edc77127 100644 --- a/addons/mrp/i18n/sl.po +++ b/addons/mrp/i18n/sl.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/sq.po b/addons/mrp/i18n/sq.po index b6dea6d1b6c..0257e781bac 100644 --- a/addons/mrp/i18n/sq.po +++ b/addons/mrp/i18n/sq.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/sr@latin.po b/addons/mrp/i18n/sr@latin.po index 3fac861858b..b86680ba1ef 100644 --- a/addons/mrp/i18n/sr@latin.po +++ b/addons/mrp/i18n/sr@latin.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/sv.po b/addons/mrp/i18n/sv.po index f9a8fa1318b..9ff627d73c7 100644 --- a/addons/mrp/i18n/sv.po +++ b/addons/mrp/i18n/sv.po @@ -1245,7 +1245,7 @@ msgstr "Location where the system will stock the finished products." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2720,10 +2720,10 @@ msgstr "" #~ msgstr "Factor that multiplies all times expressed in the workcenter." #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgid "Qty Multiple" diff --git a/addons/mrp/i18n/tlh.po b/addons/mrp/i18n/tlh.po index fd83fcb2f40..bae366ba4a5 100644 --- a/addons/mrp/i18n/tlh.po +++ b/addons/mrp/i18n/tlh.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/tr.po b/addons/mrp/i18n/tr.po index 21e0a1a9dfc..dbc634626c2 100644 --- a/addons/mrp/i18n/tr.po +++ b/addons/mrp/i18n/tr.po @@ -1311,7 +1311,7 @@ msgstr "Sistemin bitmiş ürünleri stokladığı lokasyon." #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "Bu, bitmiş ürünü üretim planına getiren dahili toplama listesidir" diff --git a/addons/mrp/i18n/uk.po b/addons/mrp/i18n/uk.po index 1d2995b8ad3..6f5bbd4617a 100644 --- a/addons/mrp/i18n/uk.po +++ b/addons/mrp/i18n/uk.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/vi.po b/addons/mrp/i18n/vi.po index 59662a9b576..73c103eb56a 100644 --- a/addons/mrp/i18n/vi.po +++ b/addons/mrp/i18n/vi.po @@ -1246,7 +1246,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" diff --git a/addons/mrp/i18n/zh_CN.po b/addons/mrp/i18n/zh_CN.po index ebad1e0e44c..965cee9da09 100644 --- a/addons/mrp/i18n/zh_CN.po +++ b/addons/mrp/i18n/zh_CN.po @@ -1245,7 +1245,7 @@ msgstr "系统存储成品的库位" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "这是一张移库单的编号,是把产成品从生产线上移动到库房里" @@ -2655,7 +2655,7 @@ msgstr "年" #~ msgstr "需求单转为采购订单草稿。" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "这是生产计划所需原料的内部分拣单" diff --git a/addons/mrp/i18n/zh_HK.po b/addons/mrp/i18n/zh_HK.po index 5c395b63b99..f855b98d6e5 100644 --- a/addons/mrp/i18n/zh_HK.po +++ b/addons/mrp/i18n/zh_HK.po @@ -1241,7 +1241,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2577,7 +2577,7 @@ msgstr "" #~ msgstr "數量倍數" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "這是生產計畫所需原材料的內部挑選列表" diff --git a/addons/mrp/i18n/zh_TW.po b/addons/mrp/i18n/zh_TW.po index 7afc22bac08..477acd795af 100644 --- a/addons/mrp/i18n/zh_TW.po +++ b/addons/mrp/i18n/zh_TW.po @@ -1240,7 +1240,7 @@ msgstr "" #. module: mrp #: help:mrp.production,picking_id:0 msgid "" -"This is the internal picking list that brings the finished product to the " +"This is the Internal Picking List that brings the finished product to the " "production plan" msgstr "" @@ -2576,7 +2576,7 @@ msgstr "" #~ msgstr "數量倍數" #~ msgid "" -#~ "This is the internal picking list take bring the raw materials to the " +#~ "This is the Internal Picking List take bring the raw materials to the " #~ "production plan." #~ msgstr "這是生產計畫所需原材料的內部挑選列表" diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 356a762c0c5..1bb93bef8a3 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -467,7 +467,7 @@ class mrp_production(osv.osv): 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}), 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]}, help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."), 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True, ondelete="restrict", - help="This is the internal picking list that brings the finished product to the production plan"), + help="This is the Internal Picking List that brings the finished product to the production plan"), 'move_prod_id': fields.many2one('stock.move', 'Move product', readonly=True), 'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), 'move_lines2': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Consumed Products', domain=[('state','in', ('done', 'cancel'))]), diff --git a/addons/stock/i18n/ar.po b/addons/stock/i18n/ar.po index fcc9d11f91c..867df8a22ca 100644 --- a/addons/stock/i18n/ar.po +++ b/addons/stock/i18n/ar.po @@ -2408,7 +2408,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/bg.po b/addons/stock/i18n/bg.po index 373159d3b9f..6224096db5e 100644 --- a/addons/stock/i18n/bg.po +++ b/addons/stock/i18n/bg.po @@ -2439,7 +2439,7 @@ msgstr "Преглед на склад с продукти" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/bs.po b/addons/stock/i18n/bs.po index 0dce966cc34..b9e465eb193 100644 --- a/addons/stock/i18n/bs.po +++ b/addons/stock/i18n/bs.po @@ -2408,7 +2408,7 @@ msgstr "Pregled zaliha proizvoda" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/ca.po b/addons/stock/i18n/ca.po index 55233026269..0e53e4eecb7 100644 --- a/addons/stock/i18n/ca.po +++ b/addons/stock/i18n/ca.po @@ -2621,7 +2621,7 @@ msgstr "Veure estoc de productes" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Albarà intern" #. module: stock diff --git a/addons/stock/i18n/cs.po b/addons/stock/i18n/cs.po index c74ce13948f..59d910a70ab 100644 --- a/addons/stock/i18n/cs.po +++ b/addons/stock/i18n/cs.po @@ -2439,7 +2439,7 @@ msgstr "Zobrazit zásoby výrobků" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Vnitřní naváděcí seznam" #. module: stock diff --git a/addons/stock/i18n/da.po b/addons/stock/i18n/da.po index 007c15baa00..5a4deba51cb 100644 --- a/addons/stock/i18n/da.po +++ b/addons/stock/i18n/da.po @@ -2409,7 +2409,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/de.po b/addons/stock/i18n/de.po index 9c60193d1f1..aaea5ee2691 100644 --- a/addons/stock/i18n/de.po +++ b/addons/stock/i18n/de.po @@ -2614,7 +2614,7 @@ msgstr "Zeige Lagerorte der Produkte" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Interne Lieferauftragsliste" #. module: stock diff --git a/addons/stock/i18n/el.po b/addons/stock/i18n/el.po index 2de9e65b1bc..a4266fad473 100644 --- a/addons/stock/i18n/el.po +++ b/addons/stock/i18n/el.po @@ -2428,7 +2428,7 @@ msgstr "Προβολή Αποθέματος Προϊόντων" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/es.po b/addons/stock/i18n/es.po index 3b030cfef80..b2e791189de 100644 --- a/addons/stock/i18n/es.po +++ b/addons/stock/i18n/es.po @@ -2631,7 +2631,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Albarán interno" #. module: stock diff --git a/addons/stock/i18n/es_AR.po b/addons/stock/i18n/es_AR.po index abe5da9e081..d2a6279f8b7 100644 --- a/addons/stock/i18n/es_AR.po +++ b/addons/stock/i18n/es_AR.po @@ -2412,7 +2412,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/es_CL.po b/addons/stock/i18n/es_CL.po index ea086475e65..d25cf3a883c 100644 --- a/addons/stock/i18n/es_CL.po +++ b/addons/stock/i18n/es_CL.po @@ -2629,7 +2629,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Albarán interno" #. module: stock diff --git a/addons/stock/i18n/es_EC.po b/addons/stock/i18n/es_EC.po index 89adf47cf6e..5275452160b 100644 --- a/addons/stock/i18n/es_EC.po +++ b/addons/stock/i18n/es_EC.po @@ -2583,7 +2583,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Lista movimiento internos" #. module: stock diff --git a/addons/stock/i18n/es_MX.po b/addons/stock/i18n/es_MX.po index 37a72b5d89f..0f3b4b96f30 100644 --- a/addons/stock/i18n/es_MX.po +++ b/addons/stock/i18n/es_MX.po @@ -2635,7 +2635,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Albarán interno" #. module: stock diff --git a/addons/stock/i18n/es_MX.po.moved b/addons/stock/i18n/es_MX.po.moved index ddb33a01138..696ebe8e9a7 100644 --- a/addons/stock/i18n/es_MX.po.moved +++ b/addons/stock/i18n/es_MX.po.moved @@ -2282,7 +2282,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Lista de empaque interna" #. module: stock diff --git a/addons/stock/i18n/es_VE.po b/addons/stock/i18n/es_VE.po index 37a72b5d89f..0f3b4b96f30 100644 --- a/addons/stock/i18n/es_VE.po +++ b/addons/stock/i18n/es_VE.po @@ -2635,7 +2635,7 @@ msgstr "Ver stock de productos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Albarán interno" #. module: stock diff --git a/addons/stock/i18n/et.po b/addons/stock/i18n/et.po index f6955029f12..3577e185b16 100644 --- a/addons/stock/i18n/et.po +++ b/addons/stock/i18n/et.po @@ -2396,7 +2396,7 @@ msgstr "Vaata toodete laoseisu" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/fi.po b/addons/stock/i18n/fi.po index 1d0d50b89a5..ecd82c8f78b 100644 --- a/addons/stock/i18n/fi.po +++ b/addons/stock/i18n/fi.po @@ -2490,7 +2490,7 @@ msgstr "Näytä tuotteiden varasto" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Sisäinen keräilylista" #. module: stock diff --git a/addons/stock/i18n/fr.po b/addons/stock/i18n/fr.po index 92d99777e8e..ccc3725170c 100644 --- a/addons/stock/i18n/fr.po +++ b/addons/stock/i18n/fr.po @@ -2649,7 +2649,7 @@ msgstr "Voir les stocks produits" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Bon de transfert interne" #. module: stock diff --git a/addons/stock/i18n/gl.po b/addons/stock/i18n/gl.po index a1341961104..c98825c2304 100644 --- a/addons/stock/i18n/gl.po +++ b/addons/stock/i18n/gl.po @@ -2409,7 +2409,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/hr.po b/addons/stock/i18n/hr.po index cb76c9fba0e..f0590e832b5 100644 --- a/addons/stock/i18n/hr.po +++ b/addons/stock/i18n/hr.po @@ -2411,7 +2411,7 @@ msgstr "Vidi zalihu proizvoda" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/hu.po b/addons/stock/i18n/hu.po index 4508ac3a2ea..b0b89b04192 100644 --- a/addons/stock/i18n/hu.po +++ b/addons/stock/i18n/hu.po @@ -2497,7 +2497,7 @@ msgstr "Termékek készletének megtekintése" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Belső kiszedési lista" #. module: stock diff --git a/addons/stock/i18n/id.po b/addons/stock/i18n/id.po index db9fec8893d..7d32743d21a 100644 --- a/addons/stock/i18n/id.po +++ b/addons/stock/i18n/id.po @@ -2506,7 +2506,7 @@ msgstr "Lihat Stok Produk" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Daftar pengambilan internal" #. module: stock diff --git a/addons/stock/i18n/it.po b/addons/stock/i18n/it.po index 0253e9048e3..919beb2ec4b 100644 --- a/addons/stock/i18n/it.po +++ b/addons/stock/i18n/it.po @@ -2495,7 +2495,7 @@ msgstr "Visualizza giacenza prodotti" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Picking list interna" #. module: stock diff --git a/addons/stock/i18n/ko.po b/addons/stock/i18n/ko.po index 5aa17a9f249..455d0393c0e 100644 --- a/addons/stock/i18n/ko.po +++ b/addons/stock/i18n/ko.po @@ -2409,7 +2409,7 @@ msgstr "재고 보기" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/lt.po b/addons/stock/i18n/lt.po index 5a7e42629cd..f18d4e7fac3 100644 --- a/addons/stock/i18n/lt.po +++ b/addons/stock/i18n/lt.po @@ -2412,7 +2412,7 @@ msgstr "Peržiūrėti produktų atsargas" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/lv.po b/addons/stock/i18n/lv.po index ccefa9e0789..53bb4860baf 100644 --- a/addons/stock/i18n/lv.po +++ b/addons/stock/i18n/lv.po @@ -2409,7 +2409,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/mn.po b/addons/stock/i18n/mn.po index efb2c61166f..bae4978d770 100644 --- a/addons/stock/i18n/mn.po +++ b/addons/stock/i18n/mn.po @@ -2423,7 +2423,7 @@ msgstr "Барааны агуулах харах" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/nb.po b/addons/stock/i18n/nb.po index 49de8775c60..58b3f1521d6 100644 --- a/addons/stock/i18n/nb.po +++ b/addons/stock/i18n/nb.po @@ -2412,7 +2412,7 @@ msgstr "Vis lager med produkter" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/nl.po b/addons/stock/i18n/nl.po index 8abcaba9620..acca46679e6 100644 --- a/addons/stock/i18n/nl.po +++ b/addons/stock/i18n/nl.po @@ -2412,7 +2412,7 @@ msgstr "Beeld productenvoorraad" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/nl_BE.po b/addons/stock/i18n/nl_BE.po index 931aab77bb4..53fe39b40d5 100644 --- a/addons/stock/i18n/nl_BE.po +++ b/addons/stock/i18n/nl_BE.po @@ -2408,7 +2408,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/pl.po b/addons/stock/i18n/pl.po index c775b418ffb..e40a191271d 100644 --- a/addons/stock/i18n/pl.po +++ b/addons/stock/i18n/pl.po @@ -2592,7 +2592,7 @@ msgstr "Podgląd zapasów" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Pobranie wewnętrzne (MM)" #. module: stock diff --git a/addons/stock/i18n/pt.po b/addons/stock/i18n/pt.po index 14080abf4e7..a8b20192939 100644 --- a/addons/stock/i18n/pt.po +++ b/addons/stock/i18n/pt.po @@ -2414,7 +2414,7 @@ msgstr "Ver Stock de Produtos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/pt_BR.po b/addons/stock/i18n/pt_BR.po index 8fc6f64629d..a77385b8d61 100644 --- a/addons/stock/i18n/pt_BR.po +++ b/addons/stock/i18n/pt_BR.po @@ -2561,7 +2561,7 @@ msgstr "Ver Estoque dos Produtos" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Lista de Separação Interna" #. module: stock diff --git a/addons/stock/i18n/ro.po b/addons/stock/i18n/ro.po index 2180abf6baa..910ad8a8014 100644 --- a/addons/stock/i18n/ro.po +++ b/addons/stock/i18n/ro.po @@ -2432,7 +2432,7 @@ msgstr "Afişare stoc după produse" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Liste interne de preluare" #. module: stock diff --git a/addons/stock/i18n/ru.po b/addons/stock/i18n/ru.po index 4b6157b6ce3..b8583613cc1 100644 --- a/addons/stock/i18n/ru.po +++ b/addons/stock/i18n/ru.po @@ -2564,7 +2564,7 @@ msgstr "Просмотр товаров на складах" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Внутренний комплектовочный лист" #. module: stock diff --git a/addons/stock/i18n/sl.po b/addons/stock/i18n/sl.po index 5c6a2d6897c..176b60e5011 100644 --- a/addons/stock/i18n/sl.po +++ b/addons/stock/i18n/sl.po @@ -2408,7 +2408,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/sq.po b/addons/stock/i18n/sq.po index 4578cf591c8..b1d48915c3d 100644 --- a/addons/stock/i18n/sq.po +++ b/addons/stock/i18n/sq.po @@ -2409,7 +2409,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/sr.po b/addons/stock/i18n/sr.po index 11aa6fa3c22..d67021e15a3 100644 --- a/addons/stock/i18n/sr.po +++ b/addons/stock/i18n/sr.po @@ -2424,7 +2424,7 @@ msgstr "Pregled zaliha proizvoda" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/sr@latin.po b/addons/stock/i18n/sr@latin.po index 304232c90c9..c2381578db1 100644 --- a/addons/stock/i18n/sr@latin.po +++ b/addons/stock/i18n/sr@latin.po @@ -2424,7 +2424,7 @@ msgstr "Pregled zaliha proizvoda" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index e926d7d863b..6b1c0e51833 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -2268,7 +2268,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/sv.po b/addons/stock/i18n/sv.po index 48175389c27..5a056336832 100644 --- a/addons/stock/i18n/sv.po +++ b/addons/stock/i18n/sv.po @@ -2410,7 +2410,7 @@ msgstr "View Stock of Products" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/th.po b/addons/stock/i18n/th.po index 07fec36da46..c6e2b3a3723 100644 --- a/addons/stock/i18n/th.po +++ b/addons/stock/i18n/th.po @@ -2409,7 +2409,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/tlh.po b/addons/stock/i18n/tlh.po index 64ff4690650..d2886f36ad9 100644 --- a/addons/stock/i18n/tlh.po +++ b/addons/stock/i18n/tlh.po @@ -2408,7 +2408,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/tr.po b/addons/stock/i18n/tr.po index b26cdf51fc6..63f840e7659 100644 --- a/addons/stock/i18n/tr.po +++ b/addons/stock/i18n/tr.po @@ -2599,7 +2599,7 @@ msgstr "Ürün Stoğunu Göster" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "Dahili Alım listesi" #. module: stock diff --git a/addons/stock/i18n/uk.po b/addons/stock/i18n/uk.po index 0a0d954763a..2fcce267038 100644 --- a/addons/stock/i18n/uk.po +++ b/addons/stock/i18n/uk.po @@ -2412,7 +2412,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/vi.po b/addons/stock/i18n/vi.po index 856da579eb3..071225bd727 100644 --- a/addons/stock/i18n/vi.po +++ b/addons/stock/i18n/vi.po @@ -2412,7 +2412,7 @@ msgstr "Xem tồn kho của các sản phẩm" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "" #. module: stock diff --git a/addons/stock/i18n/zh_CN.po b/addons/stock/i18n/zh_CN.po index 6eeb8827879..57d5dc7d802 100644 --- a/addons/stock/i18n/zh_CN.po +++ b/addons/stock/i18n/zh_CN.po @@ -2466,7 +2466,7 @@ msgstr "查看库存产品" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "内部装箱单" #. module: stock diff --git a/addons/stock/i18n/zh_TW.po b/addons/stock/i18n/zh_TW.po index 2663d8c7190..d2170ec09a6 100644 --- a/addons/stock/i18n/zh_TW.po +++ b/addons/stock/i18n/zh_TW.po @@ -2419,7 +2419,7 @@ msgstr "" #. module: stock #: view:stock.picking:0 -msgid "Internal Picking list" +msgid "Internal Picking List" msgstr "內部提貨清單" #. module: stock diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 6cd9d61f6c4..3256d20bde5 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -692,7 +692,7 @@ form -
+ From a6c6cc5e57836d7f238043a789fad35b12fae32a Mon Sep 17 00:00:00 2001 From: "Jiten (OpenERP)" Date: Thu, 1 Dec 2011 16:56:58 +0530 Subject: [PATCH 26/55] [IMP] Improve to find records for nested o2m and m2m. bzr revid: jra@tinyerp.com-20111201112658-mgq350vua4zfoj8b --- addons/web_mobile/static/src/js/form_mobile.js | 11 ++++++----- addons/web_mobile/static/src/js/list_mobile.js | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/addons/web_mobile/static/src/js/form_mobile.js b/addons/web_mobile/static/src/js/form_mobile.js index 13ff38bca5c..448bc11c5aa 100644 --- a/addons/web_mobile/static/src/js/form_mobile.js +++ b/addons/web_mobile/static/src/js/form_mobile.js @@ -65,14 +65,13 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ ev.stopPropagation(); var relational = $(this).attr('for'); var rel_field = fields[relational]; - var head = rel_field.string; - var rel_model = rel_field.relation; var rel_ids = values[relational]; + var head = rel_field.string; if (rel_ids) { var datasearch = new openerp.web.DataSetSearch(self, rel_field.relation, rel_field.context); datasearch.domain=[['id', 'in', rel_ids]]; - datasearch.read_slice([], {limit:80}, function(listrec){ - _.extend(self.action.context,{"html_name_get" : true}); + datasearch.read_slice(['name'], {context:rel_field.context, domain: datasearch.domain, limit:80}, function(listrec){ + _.extend(rel_field.context,{"html_name_get" : true}); var dataset = new openerp.web.DataSet(self, rel_field.relation,rel_field.context); dataset.name_get(listrec,function(res){ var additional = ""; @@ -112,10 +111,12 @@ openerp.web_mobile.FormView = openerp.web.Widget.extend({ self.formatdata('', '', '', '',self.element_id,'slider'); }, open_m2o_form : function(ev) { + ev.preventDefault(); + ev.stopPropagation(); var head = $(this).find('a').attr('name'); var selected_id = $(this).find('a').attr('value'); var select_model = $(this).attr('for'); - if(selected_id!="false"){ + if(selected_id){ if(!$('[id^="oe_form_'+selected_id+select_model+'"]').html()){ $('
').appendTo('#moe'); this.formview = new openerp.web_mobile.FormView(self, "oe_form_"+selected_id+select_model, selected_id, '', head, select_model, false); diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index 5813b9c216e..67058bf72f6 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -30,12 +30,12 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({ }, on_search_data: function(ev){ var self = this; - var dataset = new openerp.web.DataSetSearch(this, this.action.res_model,this.action.context); - dataset.domain = self.action.domain; - dataset.read_slice([], {limit:80}, function(result,ids){ + var datasearch = new openerp.web.DataSetSearch(self, self.action.res_model,self.action.context); + datasearch.domain = self.action.domain; + datasearch.read_slice(['name'], {context:datasearch.context, domain: datasearch.domain, limit:80}, function(listresult){ _.extend(self.action.context,{"html_name_get" : true}); - var dataset1 = new openerp.web.DataSet(self, self.action.res_model,self.action.context); - dataset1.name_get(result,function(res){ + var dataset = new openerp.web.DataSet(self, datasearch.model,datasearch.context); + dataset.name_get(listresult,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display']; From 8aadbe52880d54baae03f41c1f277c28119833d4 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 5 Dec 2011 10:48:38 +0100 Subject: [PATCH 27/55] [IMP] Disable dirty form check until page view and buttons refactoring is done bzr revid: fme@openerp.com-20111205094838-lddbf0tv64e8rxn1 --- addons/web/static/src/js/view_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index fecfbf8a58b..e24455917d9 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -445,6 +445,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# return def.promise(); }, can_be_discarded: function() { + return true; // Disabled until the page view and button refactoring is done return !this.is_dirty() || confirm(_t("Warning, the record has been modified, your changes will be discarded.")); }, /** From d7cab2845528e99e9cd4bf72ca2998b4116ba9cb Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 5 Dec 2011 10:58:43 +0100 Subject: [PATCH 28/55] [IMP] Calendar: No need to do default_get by hand The form will already do a default_get on do_show() when index is null bzr revid: fme@openerp.com-20111205095843-7ll9yna17dnltx6v --- addons/web_calendar/static/src/js/calendar.js | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/addons/web_calendar/static/src/js/calendar.js b/addons/web_calendar/static/src/js/calendar.js index ab81c16c586..75b168ccf5a 100644 --- a/addons/web_calendar/static/src/js/calendar.js +++ b/addons/web_calendar/static/src/js/calendar.js @@ -263,24 +263,21 @@ openerp.web_calendar.CalendarView = openerp.web.View.extend({ data = this.get_event_data(event_obj), form = self.form_dialog.form, fields_to_fetch = _(form.fields_view.fields).keys(); + this.dataset.index = null; self.creating_event_id = event_id; - self.dataset.default_get(fields_to_fetch, function(default_values) { - form.on_record_loaded(default_values).then(function() { - form.show_invalid = false; - _.each(['date_start', 'date_stop', 'date_delay'], function(field) { - var field_name = self[field]; - if (field_name) { - field = form.fields[field_name]; - field.set_value(data[field_name]); - field.dirty = true; - form.do_onchange(field); - } - }); - form.show_invalid = true; - form.do_show().then(function() { - self.form_dialog.open(); - }); + this.form_dialog.form.do_show().then(function() { + form.show_invalid = false; + _.each(['date_start', 'date_stop', 'date_delay'], function(field) { + var field_name = self[field]; + if (field_name) { + field = form.fields[field_name]; + field.set_value(data[field_name]); + field.dirty = true; + form.do_onchange(field); + } }); + form.show_invalid = true; + self.form_dialog.open(); }); }, do_save_event: function(event_id, event_obj) { From 8e6a398e206604537cb9fb8e7a2a4d15b79f60b9 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 5 Dec 2011 11:27:29 +0100 Subject: [PATCH 29/55] [FIX] select address on SO bzr revid: fp@tinyerp.com-20111205102729-30rk5kphl1it1xk2 --- addons/sale/sale.py | 10 ++++++++++ addons/sale/sale_view.xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 2188f6dee5f..48e51059cff 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -333,6 +333,16 @@ class sale_order(osv.osv): } return {'warning': warning} + def onchange_partner_order_id(self, cr, uid, ids, order_id, invoice_id=False, shipping_id=False, context={}): + if not order_id: + return {} + val = {} + if not invoice_id: + val['partner_invoice_id'] = order_id + if not shipping_id: + val['partner_shipping_id'] = order_id + return {'value': val} + def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'partner_order_id': False, 'payment_term': False, 'fiscal_position': False}} diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 72c231071ca..3610d2d5e9e 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -113,7 +113,7 @@ - + From 31098bc872f56bbd0c38240ff32bc7dffce09d2e Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 5 Dec 2011 11:50:28 +0100 Subject: [PATCH 30/55] [FIX] npybabel shebang line bzr revid: xmo@openerp.com-20111205105028-50o1m1lt2p3qvvkb --- npybabel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npybabel.py b/npybabel.py index 1b2e80a7a67..81cd6abf60a 100755 --- a/npybabel.py +++ b/npybabel.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # EASY-INSTALL-ENTRY-SCRIPT: 'Babel==0.9.6','console_scripts','pybabel' __requires__ = 'Babel==0.9.6' import sys From ab2d749dd6a0ed6a2bbc4c4569d939eb555a578b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 5 Dec 2011 11:51:01 +0100 Subject: [PATCH 31/55] [EXT] extract POT files bzr revid: xmo@openerp.com-20111205105101-ondavioyfv87xldl --- addons/web/po/web.pot | 402 ++++++++++++++++++---- addons/web_calendar/po/web_calendar.pot | 10 +- addons/web_chat/po/web_chat.pot | 2 +- addons/web_dashboard/po/web_dashboard.pot | 32 +- addons/web_diagram/po/web_diagram.pot | 10 +- addons/web_gantt/po/web_gantt.pot | 2 +- addons/web_graph/po/web_graph.pot | 2 +- addons/web_hello/po/web_hello.pot | 2 +- addons/web_mobile/po/web_mobile.pot | 26 +- addons/web_rpc/po/web_rpc.pot | 2 +- 10 files changed, 390 insertions(+), 100 deletions(-) diff --git a/addons/web/po/web.pot b/addons/web/po/web.pot index adfa15066fd..8ca40ae555e 100644 --- a/addons/web/po/web.pot +++ b/addons/web/po/web.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:38+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,43 +17,259 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" -#: addons/web/static/src/js/view_form.js:355 +#: addons/web/static/src/js/data_import.js:73 +#: addons/web/static/src/js/view_form.js:2799 +#: addons/web/static/src/js/views.js:743 +msgid "Close" +msgstr "" + +#: addons/web/static/src/js/data_import.js:74 +msgid "Import File" +msgstr "" + +#: addons/web/static/src/js/data_import.js:109 +msgid "External ID" +msgstr "" + +#: addons/web/static/src/js/search.js:231 +msgid "Filter Entry" +msgstr "" + +#: addons/web/static/src/js/search.js:233 +#: addons/web/static/src/js/search.js:274 addons/web/static/src/xml/base.xml:0 +msgid "Cancel" +msgstr "" + +#: addons/web/static/src/js/search.js:236 +#: addons/web/static/src/js/search.js:277 +msgid "OK" +msgstr "" + +#: addons/web/static/src/js/search.js:272 addons/web/static/src/xml/base.xml:0 +msgid "Add to Dashboard" +msgstr "" + +#: addons/web/static/src/js/search.js:401 +msgid "Invalid Search" +msgstr "" + +#: addons/web/static/src/js/search.js:401 +msgid "triggered from search view" +msgstr "" + +#: addons/web/static/src/js/search.js:483 +#, python-format +msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s" +msgstr "" + +#: addons/web/static/src/js/search.js:804 +msgid "not a valid integer" +msgstr "" + +#: addons/web/static/src/js/search.js:818 +msgid "not a valid number" +msgstr "" + +#: addons/web/static/src/js/search.js:1234 +msgid "contains" +msgstr "" + +#: addons/web/static/src/js/search.js:1235 +msgid "doesn't contain" +msgstr "" + +#: addons/web/static/src/js/search.js:1236 +#: addons/web/static/src/js/search.js:1251 +#: addons/web/static/src/js/search.js:1271 +#: addons/web/static/src/js/search.js:1291 +#: addons/web/static/src/js/search.js:1313 +msgid "is equal to" +msgstr "" + +#: addons/web/static/src/js/search.js:1237 +#: addons/web/static/src/js/search.js:1252 +#: addons/web/static/src/js/search.js:1272 +#: addons/web/static/src/js/search.js:1292 +#: addons/web/static/src/js/search.js:1314 +msgid "is not equal to" +msgstr "" + +#: addons/web/static/src/js/search.js:1238 +#: addons/web/static/src/js/search.js:1253 +#: addons/web/static/src/js/search.js:1273 +#: addons/web/static/src/js/search.js:1293 +#: addons/web/static/src/js/search.js:1315 +msgid "greater than" +msgstr "" + +#: addons/web/static/src/js/search.js:1239 +#: addons/web/static/src/js/search.js:1254 +#: addons/web/static/src/js/search.js:1274 +#: addons/web/static/src/js/search.js:1294 +#: addons/web/static/src/js/search.js:1316 +msgid "less than" +msgstr "" + +#: addons/web/static/src/js/search.js:1240 +#: addons/web/static/src/js/search.js:1255 +#: addons/web/static/src/js/search.js:1275 +#: addons/web/static/src/js/search.js:1295 +#: addons/web/static/src/js/search.js:1317 +msgid "greater or equal than" +msgstr "" + +#: addons/web/static/src/js/search.js:1241 +#: addons/web/static/src/js/search.js:1256 +#: addons/web/static/src/js/search.js:1276 +#: addons/web/static/src/js/search.js:1296 +#: addons/web/static/src/js/search.js:1318 +msgid "less or equal than" +msgstr "" + +#: addons/web/static/src/js/search.js:1307 +#: addons/web/static/src/js/search.js:1332 +msgid "is" +msgstr "" + +#: addons/web/static/src/js/search.js:1333 +msgid "is not" +msgstr "" + +#: addons/web/static/src/js/search.js:1346 +msgid "is true" +msgstr "" + +#: addons/web/static/src/js/search.js:1347 +msgid "is false" +msgstr "" + +#: addons/web/static/src/js/view_editor.js:182 +msgid "Do you really want to remove this view?" +msgstr "" + +#: addons/web/static/src/js/view_editor.js:454 +msgid "Do you really want to remove this node?" +msgstr "" + +#: addons/web/static/src/js/view_form.js:433 +msgid "Do you really want to delete this record?" +msgstr "" + +#: addons/web/static/src/js/view_form.js:448 msgid "Warning, the record has been modified, your changes will be discarded." msgstr "" -#: addons/web/static/src/js/view_form.js:1659 +#: addons/web/static/src/js/view_form.js:656 +msgid "Attachments" +msgstr "" + +#: addons/web/static/src/js/view_form.js:1880 msgid "   Search More..." msgstr "" -#: addons/web/static/src/js/view_form.js:1672 +#: addons/web/static/src/js/view_form.js:1893 #, python-format msgid "   Create \"%s\"" msgstr "" -#: addons/web/static/src/js/view_form.js:1678 +#: addons/web/static/src/js/view_form.js:1899 msgid "   Create and Edit..." msgstr "" -#: addons/web/static/src/js/views.js:568 +#: addons/web/static/src/js/view_list.js:14 +#: addons/web/static/src/xml/base.xml:0 +msgid "Create" +msgstr "" + +#: addons/web/static/src/js/view_list.js:263 +msgid "Unlimited" +msgstr "" + +#: addons/web/static/src/js/view_list.js:483 +msgid "Do you really want to remove these records?" +msgstr "" + +#: addons/web/static/src/js/view_list.js:1159 +msgid "Undefined" +msgstr "" + +#: addons/web/static/src/js/views.js:482 +msgid "Search: " +msgstr "" + +#: addons/web/static/src/js/views.js:581 +msgid "Customize" +msgstr "" + +#: addons/web/static/src/js/views.js:584 +msgid "Manage Views" +msgstr "" + +#: addons/web/static/src/js/views.js:586 addons/web/static/src/js/views.js:590 +#: addons/web/static/src/js/views.js:595 +msgid "Manage views of the current object" +msgstr "" + +#: addons/web/static/src/js/views.js:588 +msgid "Edit Workflow" +msgstr "" + +#: addons/web/static/src/js/views.js:593 +msgid "Customize Object" +msgstr "" + +#: addons/web/static/src/js/views.js:597 +msgid "Translate" +msgstr "" + +#: addons/web/static/src/js/views.js:599 +msgid "Technical translation" +msgstr "" + +#: addons/web/static/src/js/views.js:604 +msgid "Other Options" +msgstr "" + +#: addons/web/static/src/js/views.js:607 addons/web/static/src/xml/base.xml:0 +msgid "Import" +msgstr "" + +#: addons/web/static/src/js/views.js:610 addons/web/static/src/xml/base.xml:0 +msgid "Export" +msgstr "" + +#: addons/web/static/src/js/views.js:613 +msgid "View Log" +msgstr "" + +#: addons/web/static/src/js/views.js:622 +msgid "Reports" +msgstr "" + +#: addons/web/static/src/js/views.js:622 +msgid "Actions" +msgstr "" + +#: addons/web/static/src/js/views.js:622 +msgid "Links" +msgstr "" + +#: addons/web/static/src/js/views.js:702 msgid "You must choose at least one record." msgstr "" -#: addons/web/static/src/js/views.js:569 +#: addons/web/static/src/js/views.js:703 msgid "Warning" msgstr "" -#: addons/web/static/src/js/views.js:609 +#: addons/web/static/src/js/views.js:737 msgid "Translations" msgstr "" -#: addons/web/static/src/js/views.js:614 addons/web/static/src/xml/base.xml:0 +#: addons/web/static/src/js/views.js:742 addons/web/static/src/xml/base.xml:0 msgid "Save" msgstr "" -#: addons/web/static/src/js/views.js:615 -msgid "Close" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "x" msgstr "" @@ -82,10 +298,6 @@ msgstr "" msgid "Loading..." msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Create" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "Drop" msgstr "" @@ -269,15 +481,7 @@ msgid "View#" msgstr "" #: addons/web/static/src/xml/base.xml:0 -msgid "Fields" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "View labels" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "Sidebar Relates" +msgid "More…" msgstr "" #: addons/web/static/src/xml/base.xml:0 @@ -288,14 +492,6 @@ msgstr "" msgid ":" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Translate view" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "Translate sidebar" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "Delete" msgstr "" @@ -317,29 +513,13 @@ msgid "Last" msgstr "" #: addons/web/static/src/xml/base.xml:0 -msgid "♻" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "Save & Edit" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "Create & Edit" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "New" +msgid "Edit" msgstr "" #: addons/web/static/src/xml/base.xml:0 msgid "Duplicate" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Readonly/Editable" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "<<" msgstr "" @@ -364,16 +544,80 @@ msgstr "" msgid "Unhandled widget" msgstr "" +#: addons/web/static/src/xml/base.xml:0 +msgid "Notebook Page \"" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "\"" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Modifiers:" +msgstr "" + #: addons/web/static/src/xml/base.xml:0 msgid "?" msgstr "" #: addons/web/static/src/xml/base.xml:0 -msgid "#" +msgid "(nolabel)" msgstr "" #: addons/web/static/src/xml/base.xml:0 -msgid "Done" +msgid "Field:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Object:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Type:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Widget:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Size:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Context:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Domain:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "On change:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Relation:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Selection:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "[" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "]" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "-" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "#" msgstr "" #: addons/web/static/src/xml/base.xml:0 @@ -408,18 +652,34 @@ msgstr "" msgid "Clear" msgstr "" +#: addons/web/static/src/xml/base.xml:0 +msgid "Button" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "(no string)" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Special:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Button Type:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Method:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Action ID:" +msgstr "" + #: addons/web/static/src/xml/base.xml:0 msgid "Advanced Filter" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "-- Filters --" -msgstr "" - -#: addons/web/static/src/xml/base.xml:0 -msgid "-- Actions --" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "Save Filter" msgstr "" @@ -436,6 +696,14 @@ msgstr "" msgid "(Any existing filter with the same name will be replaced)" msgstr "" +#: addons/web/static/src/xml/base.xml:0 +msgid "Select Dashboard to add this filter to:" +msgstr "" + +#: addons/web/static/src/xml/base.xml:0 +msgid "Title of new Dashboard item:" +msgstr "" + #: addons/web/static/src/xml/base.xml:0 msgid "Any of the following conditions must match" msgstr "" @@ -456,10 +724,6 @@ msgstr "" msgid "and" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Cancel" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "Save & New" msgstr "" @@ -468,10 +732,6 @@ msgstr "" msgid "Save & Close" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Export" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "" "This wizard will export all data that matches the current search criteria" @@ -548,10 +808,6 @@ msgstr "" msgid "Confirm Password:" msgstr "" -#: addons/web/static/src/xml/base.xml:0 -msgid "Import" -msgstr "" - #: addons/web/static/src/xml/base.xml:0 msgid "1. Import a .CSV file" msgstr "" diff --git a/addons/web_calendar/po/web_calendar.pot b/addons/web_calendar/po/web_calendar.pot index 9974931bcd3..1e431ffe6e9 100644 --- a/addons/web_calendar/po/web_calendar.pot +++ b/addons/web_calendar/po/web_calendar.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:38+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,6 +17,14 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" +#: addons/web_calendar/static/src/js/calendar.js:409 +msgid "Responsible" +msgstr "" + +#: addons/web_calendar/static/src/js/calendar.js:438 +msgid "Navigator" +msgstr "" + #: addons/web_calendar/static/src/xml/web_calendar.xml:0 msgid " " msgstr "" diff --git a/addons/web_chat/po/web_chat.pot b/addons/web_chat/po/web_chat.pot index 48ad2bfed89..b5b0239b506 100644 --- a/addons/web_chat/po/web_chat.pot +++ b/addons/web_chat/po/web_chat.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/addons/web_dashboard/po/web_dashboard.pot b/addons/web_dashboard/po/web_dashboard.pot index 1c6f145c71c..7b02d91af36 100644 --- a/addons/web_dashboard/po/web_dashboard.pot +++ b/addons/web_dashboard/po/web_dashboard.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,11 +26,11 @@ msgid "Undo" msgstr "" #: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 -msgid "Add Widget" +msgid "Change layout" msgstr "" #: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 -msgid "Change layout" +msgid " " msgstr "" #: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 @@ -45,3 +45,29 @@ msgstr "" msgid "%" msgstr "" +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "" +"Click on the functionalites listed below to launch them and configure " +"your system" +msgstr "" + +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "Welcome to your new OpenERP instance." +msgstr "" + +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "Remember to bookmark this page." +msgstr "" + +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "Remember your login:" +msgstr "" + +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "Choose the first OpenERP Application you want to install.." +msgstr "" + +#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0 +msgid "Install" +msgstr "" + diff --git a/addons/web_diagram/po/web_diagram.pot b/addons/web_diagram/po/web_diagram.pot index 29ffd195f30..e6e33177d21 100644 --- a/addons/web_diagram/po/web_diagram.pot +++ b/addons/web_diagram/po/web_diagram.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,14 +21,6 @@ msgstr "" msgid "New Node" msgstr "" -#: addons/web_diagram/static/src/xml/base_diagram.xml:0 -msgid "New Edge" -msgstr "" - -#: addons/web_diagram/static/src/xml/base_diagram.xml:0 -msgid "Show Grid:" -msgstr "" - #: addons/web_diagram/static/src/xml/base_diagram.xml:0 msgid "First" msgstr "" diff --git a/addons/web_gantt/po/web_gantt.pot b/addons/web_gantt/po/web_gantt.pot index 48ad2bfed89..b5b0239b506 100644 --- a/addons/web_gantt/po/web_gantt.pot +++ b/addons/web_gantt/po/web_gantt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/addons/web_graph/po/web_graph.pot b/addons/web_graph/po/web_graph.pot index 48ad2bfed89..b5b0239b506 100644 --- a/addons/web_graph/po/web_graph.pot +++ b/addons/web_graph/po/web_graph.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/addons/web_hello/po/web_hello.pot b/addons/web_hello/po/web_hello.pot index 48ad2bfed89..b5b0239b506 100644 --- a/addons/web_hello/po/web_hello.pot +++ b/addons/web_hello/po/web_hello.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/addons/web_mobile/po/web_mobile.pot b/addons/web_mobile/po/web_mobile.pot index 9380d0a2911..5f4ed88d94e 100644 --- a/addons/web_mobile/po/web_mobile.pot +++ b/addons/web_mobile/po/web_mobile.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,10 @@ msgstr "" msgid "Bad username or password" msgstr "" +#: addons/web_mobile/static/src/xml/web_mobile.xml:0 +msgid "Powered by openerp.com" +msgstr "" + #: addons/web_mobile/static/src/xml/web_mobile.xml:0 msgid "Favourite" msgstr "" @@ -49,19 +53,23 @@ msgstr "" msgid "Preference" msgstr "" -#: addons/web_mobile/static/src/xml/web_mobile.xml:0 -msgid "Applications" -msgstr "" - -#: addons/web_mobile/static/src/xml/web_mobile.xml:0 -msgid "Options" -msgstr "" - #: addons/web_mobile/static/src/xml/web_mobile.xml:0 msgid "Logout" msgstr "" +#: addons/web_mobile/static/src/xml/web_mobile.xml:0 +msgid "There is no records to show." +msgstr "" + #: addons/web_mobile/static/src/xml/web_mobile.xml:0 msgid ":" msgstr "" +#: addons/web_mobile/static/src/xml/web_mobile.xml:0 +msgid "On" +msgstr "" + +#: addons/web_mobile/static/src/xml/web_mobile.xml:0 +msgid "Off" +msgstr "" + diff --git a/addons/web_rpc/po/web_rpc.pot b/addons/web_rpc/po/web_rpc.pot index 48ad2bfed89..b5b0239b506 100644 --- a/addons/web_rpc/po/web_rpc.pot +++ b/addons/web_rpc/po/web_rpc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2011-10-07 10:39+0200\n" +"POT-Creation-Date: 2011-12-05 11:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From dc5f0401152498653056c11b558d13fefe163f20 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 5 Dec 2011 11:53:28 +0100 Subject: [PATCH 32/55] [IMP] Point of Sale - Split of menu bzr revid: fp@tinyerp.com-20111205105328-bftjmsom7z3y1tga --- addons/point_of_sale/point_of_sale_view.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 1c3dceedc68..bb885000301 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -1,9 +1,9 @@ - @@ -797,12 +797,12 @@ Start Point of Sale pos.ui + - - Start Point of Sale - - - - From 34b8c8f4a60555a6a49c6b26ac0f2ccc8f3db994 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 5 Dec 2011 12:06:47 +0100 Subject: [PATCH 33/55] [FIX] right-align number columns in group headers lp bug: https://launchpad.net/bugs/900204 fixed bzr revid: xmo@openerp.com-20111205110647-jnzk2hppavgbhpa0 --- addons/web/static/src/js/view_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 8f8215d0768..a9b4f1014b1 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -1192,7 +1192,7 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L } else if (column.type === 'float') { format = "%.2f"; } - $('') + $('') .text(_.str.sprintf(format, value)) .appendTo($row); } else { From 1f1fa7fe81034b21911a20863a06de8fc1680253 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 5 Dec 2011 12:10:09 +0100 Subject: [PATCH 34/55] [FIX] pos bzr revid: fp@tinyerp.com-20111205111009-u7xwifu0ozktimq7 --- addons/point_of_sale/point_of_sale_view.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index bb885000301..b1e3e6a6d00 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -797,12 +797,14 @@ Start Point of Sale pos.ui - + + Point of Sale + + images/pos.png + images/pos-hover.png + + + From 199e42c673cd3c0c886ac50752f00d3e234d93b8 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 5 Dec 2011 12:20:03 +0100 Subject: [PATCH 35/55] [FIX] by popular demand, warnings are not sticky anymore bzr revid: chs@openerp.com-20111205112003-3j6fbtvgcuhhf7jg --- addons/web/static/src/js/chrome.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index f10ee9376f6..a74de46b7c4 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -30,8 +30,6 @@ openerp.web.Notification = openerp.web.Widget.extend(/** @lends openerp.web.Not this.$element.notify('create', 'oe_notification_alert', { title: title, text: text - }, { - expires: false }); } From aa0a6afcb5a79e3a563db7ad4c85998baff2e0ac Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 5 Dec 2011 12:57:46 +0100 Subject: [PATCH 36/55] [IMP] Do not display title on dashboards Process view should be fixed in order to honor flags.display_title bzr revid: fme@openerp.com-20111205115746-mnqteouxby3ig827 --- addons/web/static/src/js/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index e8af1290e48..244ec4f5df6 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -380,7 +380,7 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner if (action.res_model == 'board.board' && action.views.length == 1 && action.views) { // Not elegant but allows to avoid form chrome (pager, save/new // buttons, sidebar, ...) displaying - this.flags.search_view = this.flags.pager = this.flags.sidebar = this.flags.action_buttons = false; + this.flags.display_title = this.flags.search_view = this.flags.pager = this.flags.sidebar = this.flags.action_buttons = false; } // setup storage for session-wise menu hiding From 7f1e33e16f3df390c4b8deb7c61cd715bf0066ca Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 5 Dec 2011 13:00:21 +0100 Subject: [PATCH 37/55] [REM] Removed 'Undo' feature from dashboards Requested by fp bzr revid: fme@openerp.com-20111205120021-9qh22ppya3tewz8f --- addons/web_dashboard/static/src/js/dashboard.js | 8 +------- addons/web_dashboard/static/src/xml/web_dashboard.xml | 4 ---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 5d9c82af027..ff2783cdcaf 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -24,7 +24,6 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({ }).disableSelection().bind('sortstop', self.do_save_dashboard); // Events - this.$element.find('.oe-dashboard-link-undo').click(this.on_undo); this.$element.find('.oe-dashboard-link-reset').click(this.on_reset); this.$element.find('.oe-dashboard-link-change_layout').click(this.on_change_layout); @@ -47,11 +46,6 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({ }); }); }, - on_undo: function() { - this.rpc('/web/view/undo_custom', { - view_id: this.view.fields_view.view_id - }, this.do_reload); - }, on_reset: function() { this.rpc('/web/view/undo_custom', { view_id: this.view.fields_view.view_id, @@ -145,7 +139,7 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({ view_id: this.view.fields_view.view_id, arch: arch }, function() { - self.$element.find('.oe-dashboard-link-undo, .oe-dashboard-link-reset').show(); + self.$element.find('.oe-dashboard-link-reset').show(); }); }, on_load_action: function(result, index) { diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml index 085c331b4fc..462334d2b83 100644 --- a/addons/web_dashboard/static/src/xml/web_dashboard.xml +++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml @@ -5,10 +5,6 @@ Reset -