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 text colour as red in widget="twotomany" in openerp?

By
divya
on 6/24/14, 6:38 AM 834 views

 <record id="res_partner_endo_sys_info" model="ir.ui.view">
        <field name="name">res.partner.sys.info</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="crm_sys_info.res_partner_sys_info" />
        <field name="priority" eval="20"/>
    <field name="view_type">tree</field>
        <field name="arch" type="xml">     
    <xpath expr="//field[@name='room_lines']" position="replace">
                <field name="room_lines" nolabel="1" editable="bottom" widget="twotomany" position ="replace" > 
                        <form string="Room" version="7.0" position ="replace">

                         <group>
                             <group>
                               <field name="name" position ="replace"/>
                              <field name="remote_conn_room" placeholder="Put Remote connection details here..."  colspan="4" position ="replace" />
                            </group>
                         </group>

                        <group col="6" colspan="2" string="Speciality" position ="replace" >
                        <field name="licensce_lines" widget="one2many"  nolabel="1" position ="replace">
                                <tree string="License" editable="bottom"  colors="red:deactive == True ;red:support_end &lt; current_date" position ="replace">
                                    <field name="name" position ="replace"/>
                                    <field name="exe_version" position ="replace"/>
                                    <field name="comp_name" position ="replace"/>
                                    <field name="lic_name" invisible="1" position ="replace"/>
                                    <field name="installed_date" position ="replace"/>
                                     <field name="support_start" position ="replace"/>
                                    <field name="support_end" position ="replace"/>
                                    <field name="comments" position ="replace"/>
                                    <field name="deactive" position ="replace"/>
                                </tree>
                        </field>
                        </group>
                        <group col="6" colspan="2" string="Cables" position ="replace" >
                            <field name="cableing_lines" widget="one2many" position ="replace" nolabel="1">
                            <tree string="Cables" editable="bottom" position ="replace">
                                <field name="name" position ="replace"/>
                                <field name="serial_num" position ="replace"/>
                                <field name="cable_length" position ="replace"/>
                                <field name="installed_date" position ="replace"/>
                                <field name="comments" position ="replace"/>
                            </tree>
                            </field>
                        </group>
                        <group col="6" colspan="2" string="Custom Cabling" position ="replace" >
                            <field name="cust_cable_lines" widget="one2many" nolabel="1" position ="replace">
                            <tree string="Custom Cables" editable="bottom" position ="replace">
                                <field name="name" position ="replace"/>
                                <field name="length" position ="replace"/>
                                <field name="communication" position ="replace"/>
                                <field name="comments" position ="replace"/>
                            </tree>
                            </field>
                        </group>


                          <group col="6" colspan="2" string="Video Processors"  position ="replace">
                            <field name="video_process_lines" widget="one2many" nolabel="1" position ="replace">
                            <tree string="Video Processors" editable="bottom" position ="replace">
                                <field name="name" position ="replace"/>
                                <field name="type_id" position ="replace"/>
                                <field name="comm_id" position ="replace"/>
                                <field name="comments" position ="replace"/>
                            </tree>
                            </field>
                        </group>
                        <group col="6" colspan="2" string="Other Equipment" position ="replace" >
                            <field name="other_equp_lines" widget="one2many" nolabel="1" position ="replace">
                            <tree string="Other Equipment" editable="bottom" position ="replace">
                                <field name="name" position ="replace"/>
                                <field name="type_id" position ="replace"/>
                                <field name="comm_id" position ="replace"/>
                                <field name="comments" position ="replace"/>
                            </tree>
                            </field>
                        </group>
                       <group col="6" colspan="2" string="Additional Notes" position ="replace">
                         <field name="notes" placeholder="Put additional notes on the room.." position ="replace"/>
                       </group>

                        </form>                      
                  </field>                 
      </xpath>
    </field>
 </record>
   

No need to write position='replace' in all fields, in xpath only its enough

Rajkumar
on 6/24/14, 7:08 AM
ok 
then, how to change its colour.  It should become based on its support_start and support_end  dates
          <field name="room_lines" nolabel="1" editable="bottom" widget="twotomany" position ="replace" > 


On Tue, Jun 24, 2014 at 4:38 PM, Rajkumar <ksrajkumar87@openerp.my.openerp.com> wrote:

No need to write position='replace' in all fields, in xpath only its enough

--
Rajkumar Sent by OpenERP S.A. using OpenERP. Access your messages and documents in Odoo

divya
on 6/24/14, 7:21 AM

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

2 follower(s)

Stats

Asked: 6/24/14, 6:38 AM
Seen: 834 times
Last updated: 3/16/15, 8:10 AM