Odoo Help

0

How to change the field values as Red color when end date is less than current date on one2many field ?

By
babu
on 2/27/15, 5:29 AM 713 views

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/27/15, 5:29 AM
Seen: 713 times
Last updated: 3/16/15, 8:10 AM