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

Readonly column in one2many tree in custome module in 7.0 ?

By
Farid Ghanchi
on 6/13/13, 4:40 AM 1,625 views

Hi everyone,

I have a field elist_price in my cham module, I have inherit the crm.lead view and i want to readonly field upon state field. when we set attr like this:

<field name="elist_price" attrs="{'readonly':[('state','not in','['draft']') ] }"/>

so error in terminal

Cannot eval "{'readonly':[('state','not in','['draft']') ] }".

And state field is in 'crm.lead',

elist_price is in 'my_object1'

How we set read only this thing.please give a proper solution. thank's

1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 6/13/13, 7:47 AM

Hi,

systax error ['draft'] and not '['draft']':

<field name="elist_price" attrs="{'readonly':[('state','not in',['draft']) ] }"/>

and not

<field name="elist_price" attrs="{'readonly':[('state','not in','['draft']') ] }"/>

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

0 follower(s)

Stats

Asked: 6/13/13, 4:40 AM
Seen: 1625 times
Last updated: 3/16/15, 8:10 AM