Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
What is the right way to change the text-align property for a column in a tree view.
I have a custom css file in the static/src/css directory.
I also have it registered in the __openerp__.py file in the 'css': [ 'static/src/css/custom_style.css' ].
I also made sure the field in the xml file had the right class name set like class="change_text_align"
For some reason though, it will not change the text-align for the column for the field in the tree view. Is there anything that I am missing? I just want to align the text on the left side of the column instead of the right.
I also tried adding a style attribute to the field like this, but it still didnt work:
<field name="my_field" style="text-align: left" />
quote from question:
I just want to align the text on the left side of the column instead of the right.
NOTE: text is aligned at the left side anyway (fields of type char or text), so question is not correctly describes the problem and requires further clarification.
Perhaps, if question is about numeric (integer or float) fields (as numeric fields are aligned at the right side), then it's possible to align them to the left side like text fields, using type="char" attribute in xml record:
<field name="my_numeric_field" type="char" />
The css and js resource file load have changed since Odoo 8, you need to load using a view extension of the asset_backend, like:
<template id="assets_backend" name="module assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/module/static/src/css/custom_style.css"/>
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
|Asked: 10/26/15, 6:20 PM|
|Seen: 1070 times|
|Last updated: 10/27/15, 11:23 AM|