[MERGE] Merge trunk.
bzr revid: jra@tinyerp.com-20120731123532-id7botmens4tvwlh
This commit is contained in:
commit
97554eef3b
|
@ -3,8 +3,10 @@
|
|||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web core module.
|
||||
This module provides the core of the OpenERP Web Client.
|
||||
OpenERP Web core module.
|
||||
========================
|
||||
|
||||
This module provides the core of the OpenERP Web Client.
|
||||
""",
|
||||
"depends" : [],
|
||||
'auto_install': True,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -302,7 +302,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
this._super();
|
||||
},
|
||||
on_record_loaded: function(record) {
|
||||
var self = this, set_values = [];
|
||||
var self = this, defs = [];
|
||||
if (!record) {
|
||||
this.set({ 'title' : undefined });
|
||||
this.do_warn("Form", "The record could not be found in the database.", true);
|
||||
|
@ -310,7 +310,19 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
}
|
||||
this.datarecord = record;
|
||||
this._actualize_mode();
|
||||
this.set({ 'title' : record.id ? record.name : "New record" });
|
||||
|
||||
var titleDef = $.Deferred();
|
||||
if (record.id) {
|
||||
this.dataset.name_get([record.id]).then(function(names) {
|
||||
self.set({ 'title' : names[0][1] });
|
||||
}).always(function() {
|
||||
titleDef.resolve();
|
||||
});
|
||||
} else {
|
||||
this.set({ 'title' : "New record" });
|
||||
titleDef.resolve();
|
||||
}
|
||||
defs.push(titleDef);
|
||||
|
||||
if (this.qweb) {
|
||||
this.kill_current_form();
|
||||
|
@ -322,9 +334,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
_(this.fields).each(function (field, f) {
|
||||
field._dirty_flag = false;
|
||||
var result = field.set_value(self.datarecord[f] || false);
|
||||
set_values.push(result);
|
||||
defs.push(result);
|
||||
});
|
||||
return $.when.apply(null, set_values).pipe(function() {
|
||||
return $.when.apply(null, defs).pipe(function() {
|
||||
if (!record.id) {
|
||||
// New record: Second pass in order to trigger the onchanges
|
||||
// respecting the fields order defined in the view
|
||||
|
|
|
@ -505,6 +505,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
});
|
||||
this.getParent().push_breadcrumb({
|
||||
widget: this,
|
||||
action: this.action,
|
||||
show: function(index, $e) {
|
||||
var view_to_select = views[index];
|
||||
self.$element.show();
|
||||
|
@ -513,9 +514,27 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
}
|
||||
},
|
||||
get_title: function() {
|
||||
return _.map(views, function(v) {
|
||||
return self.views[v].controller.get('title');
|
||||
var id;
|
||||
var currentIndex;
|
||||
_.each(self.getParent().breadcrumbs, function(bc, i) {
|
||||
if (bc.widget === self) {
|
||||
currentIndex = i;
|
||||
}
|
||||
});
|
||||
var next = self.getParent().breadcrumbs.slice(currentIndex + 1)[0];
|
||||
var titles = _.map(views, function(v) {
|
||||
var controller = self.views[v].controller;
|
||||
if (v === 'form') {
|
||||
id = controller.datarecord.id;
|
||||
}
|
||||
return controller.get('title');
|
||||
});
|
||||
if (next && next.action.res_id && self.active_view === 'form' && self.model === next.action.res_model && id === next.action.res_id) {
|
||||
// If the current active view is a formview and the next item in the breadcrumbs
|
||||
// is an action on same object (model / res_id), then we omit the current formview's title
|
||||
titles.pop();
|
||||
}
|
||||
return titles;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name": "Web Calendar",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web Calendar view.
|
||||
""",
|
||||
"description":"""OpenERP Web Calendar view.""",
|
||||
"version": "2.0",
|
||||
"depends": ['web'],
|
||||
"js": [
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name": "Web Dashboard",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web Dashboard view.
|
||||
""",
|
||||
"description":"""OpenERP Web Dashboard view.""",
|
||||
"version": "2.0",
|
||||
"depends": ['web'],
|
||||
"js": [
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name" : "OpenERP Web Diagram",
|
||||
"category" : "Hidden",
|
||||
"description":'Openerp Web Diagram view',
|
||||
"description":"""Openerp Web Diagram view.""",
|
||||
"version" : "2.0",
|
||||
"depends" : ["web"],
|
||||
"js": [
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name": "Web Gantt",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web Gantt chart view.
|
||||
""",
|
||||
"description":"""OpenERP Web Gantt chart view.""",
|
||||
"version": "2.0",
|
||||
"depends": ['web'],
|
||||
"js": [
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
{
|
||||
"name": "Graph Views",
|
||||
"category" : "Hidden",
|
||||
"description":"""Graph Views for Web Client
|
||||
"description":"""
|
||||
Graph Views for Web Client.
|
||||
===========================
|
||||
|
||||
* Parse a <graph> view but allows changing dynamically the presentation
|
||||
* Graph Types: pie, lines, areas, bars, radar
|
||||
* Stacked/Not Stacked for areas and bars
|
||||
* Legends: top, inside (top/left), hidden
|
||||
* Features: download as PNG or CSV, browse data grid, switch orientation
|
||||
* Unlimited "Group By" levels (not stacked), two cross level analysis (stacked)
|
||||
* Parse a <graph> view but allows changing dynamically the presentation
|
||||
* Graph Types: pie, lines, areas, bars, radar
|
||||
* Stacked/Not Stacked for areas and bars
|
||||
* Legends: top, inside (top/left), hidden
|
||||
* Features: download as PNG or CSV, browse data grid, switch orientation
|
||||
* Unlimited "Group By" levels (not stacked), two cross level analysis (stacked)
|
||||
""",
|
||||
"version": "3.0",
|
||||
"depends": ['web'],
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name": "Hello",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web example module.
|
||||
""",
|
||||
"description":"""OpenERP Web example module.""",
|
||||
"version": "2.0",
|
||||
"depends": [],
|
||||
"js": ["static/*/*.js", "static/*/js/*.js"],
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name" : "Base Kanban",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web kanban view.
|
||||
""",
|
||||
"description":"""OpenERP Web kanban view.""",
|
||||
"version" : "2.0",
|
||||
"depends" : ["web"],
|
||||
"js": [
|
||||
|
|
|
@ -295,10 +295,10 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
if (!group.state.folded) {
|
||||
if (182*unfolded>=self.$element.width()) {
|
||||
group.$element.css('width', "170px");
|
||||
} else if (262*unfolded>self.$element.width()) {
|
||||
group.$element.css('width', Math.round(100/unfolded) + '%');
|
||||
} else {
|
||||
} else if (262*unfolded<self.$element.width()) {
|
||||
group.$element.css('width', "250px");
|
||||
} else {
|
||||
group.$element.css('width', Math.floor(self.$element.width()/unfolded) + 'px');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name" : "OpenERP Web Mobile",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web Mobile.
|
||||
""",
|
||||
"description":"""OpenERP Web Mobile.""",
|
||||
"version" : "2.0",
|
||||
"depends" : [],
|
||||
'auto_install': True,
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name" : "Process",
|
||||
"version": "2.0",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web process view.
|
||||
""",
|
||||
"description":"""OpenERP Web process view.""",
|
||||
"depends" : ["web_diagram"],
|
||||
"js": [
|
||||
'static/lib/dracula/*.js',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name" : "OpenERP Web Web",
|
||||
"category" : "Hidden",
|
||||
"description":'Openerp Web Web',
|
||||
"description":"""Openerp Web Web.""",
|
||||
"version" : "2.0",
|
||||
"depends" : [],
|
||||
"installable" : False,
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"name": "Tests",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
OpenERP Web test suite.
|
||||
""",
|
||||
"description":"""OpenERP Web test suite.""",
|
||||
"version": "2.0",
|
||||
"depends": [],
|
||||
"js": ["static/src/js/*.js"],
|
||||
|
|
Loading…
Reference in New Issue