Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
5540 Zobrazení

Hello Team,

I want to change the color for one2many field when end date is less than current date.

When i open the one2many field it will open the another form here also some one2many fields are there but here it will so the color as red, but in main form color is not reflecting.

here is code sample

                    <group col="6" colspan="2" string="SAMPLE" attrs="{'invisible': [('is_company','=', True)]}">
                    <field name="detail_lines" nolabel="1" widget="twotomany">  <!-- Here is not working, it is in the main form-->
                        <form string="Table" version="7.0">

                         <group>
                             <group>
                               <field name="name"/>
                              <field name="remote" placeholder="Put details here..."  colspan="4" />
                            </group>
                         </group>

                        <group col="6" colspan="2" string="Test" >
                        <field name="lines_data" widget="one2many"  nolabel="1">
                                <tree string="Details" editable="bottom" colors="red:deactive == True ;red:end_date &lt; x_current_date"><!--Here it is working but it is Inside the form -->
                                    <field name="name"/>
                                     <field name="start_date"/>
                                    <field name="end_date"/>

                                    <field name="x_current_date" invisible="1"/>

                                </tree>
                        </field>
                        </group>

Thanks in advance

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 15
5094
0
bře 15
3490
0
bře 15
5806
1
srp 15
7655
1
čvn 15
8549