Kanban in One2Many fields is not shown if it is not the initial mode

Bug #1126150 reported by Daniel Hammerschmidt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP R&D Web Team

Bug Description

In an one2many-form-field with mode set to "list,kanban" we get the list view displayed first as expected. When switching to kanban mode, the view does not appear. When we go to the next record in the top-level form the kanban is displayed correctly.

I located the problem in instance.web.form.FieldOne2Many::load_views() (web/addons/web/static/src/js/view_form.js) nearly the end where the event handler for "switch_mode" on the this.viewmanager is set.

The handler function checks if the new mode equals "list" and reloads the view if so. This should also be done in the case of "kanban".

- if (n_mode === "list") {
+ if (n_mode === "list" || n_mode === 'kanban') {
                     $.async_when().done(function() {
                         self.reload_current_view();
                     });
                 }

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Daniel,

First of all, Thanks for your contribution.
But this features is removed in 7.0 and trunk. So we will consider it to future road-maps.

Thanks for the reporting!

Changed in openerp-web:
status: New → Confirmed
importance: Undecided → Wishlist
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Revision history for this message
Daniel Hammerschmidt (redneck) wrote :

Hello Amit,

I do not understand, what you mean with "this feature is removed". We still have lists and kanbans for one2many fields and the combination of both is allowed.

I got this error while playing around with the field "child_ids" in the partner form view "base.view_partner_form". First I set the mode to "kanban,list" and everything was fine. Switching the order to "list,kanban" let the kanban be not displayed on first record. I think this is bug in 7.0 and trunk whit low priority. Probably nobody needs a simple list in front of a wonderfull kanban (which may be css-styled as table, too).

To reproduce (in 7.0):
- change the mode to 'list,kanban'
- go to 'Contacts' or 'Customers' and select the filter 'Companys'
- select one record (with children) => child-list is displayed
- switch to kanban => nothing
- switch back to list => good
- switch to next record with the top-level pager => child-list is displayed
- switch to kanban => nothing
- do NOT switch back to list
- switch to next record with the top-level pager => kanban is displayed
- from now (until the view_manager is reinitialized) both modes are shown correctly

It's confusion, but yet has low priority.

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Daniel,

I understand your sentiment...
But currently we can not use mode type like 'list,kanban' for one2many field. It's just use like a "kanaban".

Also I agree with that, our architecture is supported to the mode type for one2many field. but dew to the some Implementation we can not use multiple view for one2many field.

Moreover, we have removed the multiple "mode type" from addons. which is set to the one2many field. so no chance to produce this Issue at current stage. That's why I am set this Issue as "Wishlist".

So whenever reuse this features. definitely shall cover this Issue.

Thanks for understanding!

Revision history for this message
Daniel Hammerschmidt (redneck) wrote :

Hello Amit,

okay, I agree with you. I still had the old architecture (before-kanban-time) in my mind ("list,form").

Thanks for taking time to respond.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.