Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

[Solved] How do you get Intergers to align to the left like strings? - Odoo 8

By
Siobhan
on 6/3/15, 5:32 AM 657 views

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>


2

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 6/3/15, 7:52 AM

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.

Thank you...works well for me.

Siobhan
on 6/5/15, 1:43 AM
0
Lerner
On 6/5/15, 3:37 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/3/15, 5:32 AM
Seen: 657 times
Last updated: 6/13/15, 5:17 AM