Odoo Help

Welcome!

This community 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.

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 485 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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