Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hello community, i'm trying to change the default color in a sale order line in my custom module.
i'm trying with this approach but this didn't work :(
<record id="view_order_form_inherit" model="ir.ui.view"> <field name="name">sale.form.inherit</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_form"/> <field name="arch" type="xml"> <data> <tree position="attributes"> <attribute name="colors">red:state='draft'</attribute> </tree> </data> </field> </record>
take this code :
<openerp> <data> <record id="view_order_tree_inherit" model="ir.ui.view"> <field name="name">sale.tree.inherit</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_quotation_tree" /> <field name="arch" type="xml"> <tree position="attributes"> <attribute name="colors">red:state=='draft'</attribute> </tree> </field> </record> </data> </openerp>
This code mark color line in red if state='draft'
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 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
|Asked: 5/26/13, 5:11 PM|
|Seen: 1650 times|
|Last updated: 3/16/15, 8:10 AM|