Odoo Help

0

How to put a domain on context XML ? Odoo 8

By
Mostafa Abd El Fattah
on 8/31/16, 8:22 AM 1,016 views

I have a context which get its value from the parent view but sometimes the parent view doesn't has this value so i got error while evaluating the value as it's not find in the context how to figure out if the value defined or not in the context. on XML

context="{'default_opportunity_id': default_opportunity_id}"
2
Hilar
On 12/14/16, 10:53 PM

if opportunity_id is your field name try context="{'default_opportunity_id': opportunity_id}"


to fetch from the parent form use context="{'default_opportunity_id': parent.opportunity_id}"

or context="{'default_opportunity_id': parent.opportunity_id and parent.opportunity_id}"


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: 8/31/16, 8:22 AM
Seen: 1016 times
Last updated: 12/14/16, 10:53 PM