Odoo Help


1 إجابة
Petar Najman صربيا
12‏/1‏/2014 7:25 م

Hi Khalid,

If you want to apply that kind of filtering you should use domains on fields instead of using related fields

class sna_aor_super(orm.Model): 
    _name = "sna.aor.super" 
    _description = "Area of Registration Super"
    _columns = { 
        'district_id' : fields.many2one('sna.district','District', select=True, required=True, ondelete="restrict"), 
        'sub_district_id' : fields.many2one('sna.sub.district', 'Sub District', domain="[('sub_district_id', '=', district_id)]", select=True, required=True),
        'area_id' : fields.many2one('sna.area', 'Area', domain="[('sub_district_id', '=', sub_district_id)]", select=True, required=True),

Regards, Petar

2 التعليقات
Khalid Masood جنوب إفريقيا
14‏/1‏/2014 4:10 م

Thank you for the help. Much appreciated.

Petar Najman صربيا
16‏/1‏/2014 11:19 ص

You are very welcome Khalid :)

اطرح سؤالاً
Keep Informed
1 متابعين
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.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now