@@ -673,7 +673,7 @@ openerp.base.WebClient = openerp.base.Controller.extend({
|
||||
this.menu.start();
|
||||
},
|
||||
on_logged: function() {
|
||||
this.action = new openerp.base.ActionManager(this.session, "oe_application");
|
||||
this.action = new openerp.base.ActionManager(this.session, "oe_app");
|
||||
this.action.start();
|
||||
},
|
||||
on_menu_action: function(action) {
|
||||
|
||||
@@ -566,11 +566,22 @@ openerp.base.form.FieldOne2Many = openerp.base.form.Field.extend({
|
||||
this.template = "FieldOne2Many";
|
||||
this.viewmanager = null;
|
||||
this.operations = [];
|
||||
// thise.iewq.on
|
||||
|
||||
},
|
||||
start: function() {
|
||||
this._super.apply(this, arguments);
|
||||
this.log("o2m.start");
|
||||
this.viewmanager = new openerp.base.ViewManager(this.view.session, this.element_id);
|
||||
var action = {
|
||||
res_model: this.field.relation,
|
||||
views: [ [false,"list"], ],
|
||||
};
|
||||
this.viewmanager.do_action_window(action);
|
||||
|
||||
},
|
||||
set_value: function(value) {
|
||||
this.value = value;
|
||||
this.log("o2m.set_value",value);
|
||||
},
|
||||
get_value: function(value) {
|
||||
return this.operations;
|
||||
|
||||
@@ -111,15 +111,13 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
|
||||
if (this.searchview) {
|
||||
this.searchview.stop();
|
||||
}
|
||||
var view_id = action.search_view_id ? action.search_view_id[0] || false : false;
|
||||
|
||||
var searchview = this.searchview = new openerp.base.SearchView(
|
||||
this.session, this.element_id + "_search",
|
||||
this.dataset, action.search_view_id[0] || false,
|
||||
this.search_defaults());
|
||||
searchview.on_search.add(function() {
|
||||
this.searchview = new openerp.base.SearchView(this.session, this.element_id + "_search", this.dataset, view_id, this.search_defaults());
|
||||
this.searchview.on_search.add(function() {
|
||||
self.views[self.active_view].controller.do_search.apply(self, arguments);
|
||||
});
|
||||
return searchview.start();
|
||||
return this.searchview.start();
|
||||
},
|
||||
do_action_window: function(action) {
|
||||
var self = this;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</td>
|
||||
<td valign="top" width="100%" height="100%">
|
||||
<div id="oe_main" class="main">
|
||||
<div id="oe_application" class="application"></div>
|
||||
<div id="oe_app" class="application"></div>
|
||||
<div id="oe_sidebar"></div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -246,7 +246,7 @@
|
||||
<input type="text" t-att-name="widget.name" t-att-id="widget.element_id" t-att-class="'field_' + widget.type" style="width: 100%;"/>
|
||||
</t>
|
||||
<t t-name="FieldOne2Many">
|
||||
<div style="background: #ccc; padding: 20px">
|
||||
<div t-att-id="widget.element_id">
|
||||
One2Many widget
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user