コンテンツへスキップ
メニュー
この質問にフラグが付けられました
11 返信
5581 ビュー

Hello, 

I have some trouble with Kanban view of project.
I added steps in project and I setted "default_group_by" with this field.
Now my Kanban columns are one on the other (not on a line) when the columns are too much. We need to scroll down to see the next column.
In others Kanban view (like task, crm, ...) the columns continues, and we need to scroll right to see them.

My xml code :

<record id="project_project_stage_kanban_view_inherit" model="ir.ui.view">
<field name="active" eval="True"/>
<field name="field_parent" eval="False"/>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="mode">extension</field>
<field name="model">project.project</field>
<field name="name">project.project.stage.kanban.view.inherit</field>
<field name="priority">99</field>
<field name="type">kanban</field>
<field name="arch" type="xml">
<data>
<xpath expr="//kanban[1]" position="attributes">
<attribute name="default_group_by">stage_id</attribute>
</xpath>
</data>
</field>
</record>


This is my kanban view project :  https://globalappsportal-my.sharepoint.com/:i:/g/personal/alexandre_turc_isobar_com/EbnrlV41mt5CmpK14MU6_J0BFE4L-JGB2Qilc8mImEG6dQ?e=sgmIvE

(I can't put a picture in this post) 

Update : 

I tried with a clean base with only project module and my custom module.  The result is the same. 

I tried with Studio to add stage.  The result is the same. 



アバター
破棄

can you provide a screenshot of kanban?

著作者

Hello Ravi,

I updated my post with a link to my screenshot.

Strange!

which versions of odoo are you using?

is there any custom module installed which affects kanban view?

It's layout issue (most probably CSS flex) so which browser are you using?

have to check behavior in other browsers?

著作者

I'm using Odoo 11 enterprise

Some of custom/third party are installed but no one touch the kanban view of project.

I have the problem on Firefox, Chrome, Edge and IE. I'didnt try on other browsers.

著作者

I tried on new clean base with only project module and my custom module The result is the same.

it seems your custom module modified project kanban view (as you can see in screenshot it added progress bar on top of each stage) and by default stage_id field not available in project.project

著作者

Hello Ravi,

I created the field "stage_id" in my custom module but it is a normal field Many2one linked to model with just a name and sequence.

when I create the stage_id field and group by default with Studio I have the same result ( column are one on the other)

If I use my code(or studio) on other kanban view (for example partner) the columns are on a line.

I think the kanban view project have not the same configuration(CSS,Flex, Js) of other kanban view. But I'didn't find where.

著作者

Thanks Ravi to found that. I deleted in my odoo the line in your second link and is working.

Do you know how to override this part of less ?

for override less part create new less file and register it in assets and copy the whole block of 'o_kanban_view.o_kanban_dashboard' named as `o_kanban_view.o_kanban_project_dashboard` remove the o-flex-flow part

https://github.com/odoo/odoo/blob/11.0/addons/web/static/src/less/kanban_dashboard.less#L31

and in xml replace class `o_kanban_dashboard` to `o_kanban_project_dashboard`

著作者

With all this I will succeed in doing what I want.

Thank you Ravi for your help

Great :)

最善の回答

I found the issue it's due to 'o_kanban_dashboard` CSS class on project kanban

https://github.com/odoo/odoo/blob/11.0/addons/project/views/project_views.xml#L273

https://github.com/odoo/odoo/blob/11.0/addons/web/static/src/less/kanban_dashboard.less#L33

but unfortunately, if you remove this class it will break the card layout because of dashboard card/kanban it's own layout/css

アバター
破棄
著作者 最善の回答

The poblem is solved by odoo in the next update. 

This commits apply the wrap only on non-grouped kanban dashboard

https://github.com/odoo/odoo/commit/c67f1419e1d830d72928812f5ddcaf6f6267c0dd


アバター
破棄
関連投稿 返信 ビュー 活動
0
5月 18
3189
1
1月 25
2089
1
11月 24
1768
1
7月 25
2683
2
10月 24
1848