Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2004 Vizualizări

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.

Imagine profil
Abandonează
Autor

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 Răspunsuri Vizualizări Activitate
0
apr. 24
1361
0
mar. 24
1669
2
mar. 24
3342
1
mai 23
2453
1
iul. 24
1196