Skip to Content
Menú
This question has been flagged
5511 Vistes

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
Descartar
Related Posts Respostes Vistes Activitat
0
de març 15
5066
0
de març 15
3490
0
de març 15
5798
1
d’ag. 15
7652
1
de juny 15
8524