Odoo Help

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 759 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--
2912
| 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" />

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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