Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2000 Visualizzazioni

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.

Avatar
Abbandona
Autore

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>

Post correlati Risposte Visualizzazioni Attività
0
apr 24
1358
0
mar 24
1669
2
mar 24
3342
1
mag 23
2453
1
lug 24
1196