Odoo Help

0

Multiple attrs in form

By
Dr Obx
on 6/9/15, 9:50 AM 824 views

I would like to add more than one attrs into the field in xml, for example:

attrs="{'invisible': [('product_lines_id','!=','Computer'),('product_lines_id','!=','Server')],'require':[('product_lines_id','=','Computer')]}"

 How should I do this ?
Or what should i change ?

1
Dr Obx
On 6/10/15, 6:55 AM

There was only one thing i've done wrong  .... 'd' in require... :)

This form works perfect for me:

attrs="{'invisible': [('product_lines_id','!=','Computer'),('product_lines_id','!=','Server')],'required':['|',('product_lines_id','=','Computer'),('product_lines_id','=','Server')]}"

but thanx anyway :)

1

Zbik

--Zbik--
6253
| 6 4 7
Lodz, Poland
--Zbik--


Zbik
On 6/9/15, 1:35 PM

You replace 'require' to 'required'. Example:

 attrs="{'invisible': [('type','not in',['out_refund'])],'required':[('type','in',('out_refund','in_refund'))]}" 

I will replace it, thank you :)

Dr Obx
on 6/10/15, 4:15 AM

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: 6/9/15, 9:50 AM
Seen: 824 times
Last updated: 6/10/15, 6:56 AM