Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
4 Respostas
8592 Visualizações

I have created a list view in Odoo and the interger always goes to the right while strings are to the left. Is there a keyword I should be using to enable all fields in list view to go to the left? I have tried align, position, gravity, layout but none of these work.

Code:


<record id="helpdesk_ticket_tree_view" model="ir.ui.view">

<field name="name">helpdesk.ticket.tree.view</field>

<field name="view_type">tree</field>

<field name="model">helpdesk.ticket</field>

<field name="arch" type="xml">

<tree string="Helpdesk">

<field name="ticketnumber" position="left" />

<field name="name" />

<field name="res_partner_id" />

<field name="res_users_id" />

<field name="responsible_id" />

<field name="claimdate" />

<field name="groups_id" />

<field name="priority_id" />

</tree>

</field>

</record>


Avatar
Cancelar
Melhor resposta

I don't know any supported way to do so, but you can try to use a small hack:

 

<record id="helpdesk_ticket_tree_view" model="ir.ui.view">
<field name="name">helpdesk.ticket.tree.view</field>
<field name="view_type">tree</field>
<field name="model">helpdesk.ticket</field>
<field name="arch" type="xml">
<tree string="Helpdesk">
<field name="ticketnumber"  type="char" />
<field name="name" />
<field name="res_partner_id" />
<field name="res_users_id" />
<field name="responsible_id" />
<field name="claimdate" />
<field name="groups_id" />
<field name="priority_id" />
</tree>
</field>
</record>

this way field will be interpreted as normal char field instead of number field by an odoo client side and will not be aligned to the right.

Avatar
Cancelar
Autor

Thank you...works well for me.

Melhor resposta

<field name="ticketnumber" type="char" />

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
mar. 25
1622
0
jan. 25
3795
1
ago. 23
15250
1
ago. 23
13857
1
jul. 23
10907