Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
5505 Prikazi

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
mar. 15
5059
0
mar. 15
3488
0
mar. 15
5793
1
avg. 15
7649
1
jun. 15
8523