Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2005 มุมมอง

I want to display the label in a black color but odoo overrides the class of the label because the field is a computed field.


What i tried




also tried this




which gives an error;

Label tag must contain a "for". To match label style without corresponding field or button, use 'class="o_form_label"'.

which does not make sense...


My current workaround





I don't want an extra field to be able to make the label black.

อวตาร
ละทิ้ง
ผู้เขียน

why is the code showing properly when writing the post, but when posted it just shows white...

what i tried
<xpath expr="//div[@name='pricing']" position="after">
<label for="price_including_vat" class="o_form_label" string="Prijs BTW Incl."/>
<field name="price_including_vat" widget="monetary" nolabel="1" readonly="1"/>
</xpath>

also tried
<xpath expr="//div[@name='pricing']" position="after">
<label class="o_form_label" string="Prijs BTW Incl."/>
<field name="price_including_vat" widget="monetary" nolabel="1" readonly="1"/>
</xpath>

workaround
<xpath expr="//div[@name='pricing']" position="after">
<label for="dr_placeholder" class="o_form_label" string="Prijs BTW Incl."/>
<field name="dr_placeholder" nolabel="1" invisible="1"/>
<field name="dr_price_including_vat" widget="monetary" string="Prijs BTW Incl." nolabel="1" readonly="1"/>
</xpath>

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 24
1362
0
มี.ค. 24
1669
2
มี.ค. 24
3343
1
พ.ค. 23
2454
1
ก.ค. 24
1196