Skip to Content
Menu
This question has been flagged
1 Reply
6281 Views

.py

description = self.fields(string = "Description")

.xml

<name field="description" style="height:40%%"/>

style="width:40%%" - work, but style="height:40%%" - dose not work 

Avatar
Discard
Best Answer

Hi, 
can you try this: 

<name field="description"  class="apply_dimension"/>

Create a css file (edit_dimension.css), and put the following code : 

.apply_dimension {
width: 40%;
height: 40% !important;
}
Then create xml file template.xml to declare your css file. Like this :
<?xml version="1.0" encoding="utf-8"?> <odoo> <data>      <template id="assets_common" name="web assets" inherit_id="web.assets_common"> <t t-call="web.less_helpers"/> <xpath expr="//link[last()]" position="after"> <link rel="stylesheet" type="text/css" href="PATH TO YOUR CSS FILE"/>  </xpath> </template> </data> </odoo>
Finally, Add the xml file to your Manifest. Try it and let me know if it works.
Regards.
Avatar
Discard