تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
2418 أدوات العرض

Hey, so we are modifying the recurring contract module and have a slight snag.


We have the model for the header of the document which contains the customer.


Then we have a model for all the lines for that contract.


We want to be able to get data from the header model into the line model so we can use domain to filter what products can be seen based on the customer that is selected.


How can this be done? Thanks,


We have tried creating a field that relates to the parent document on the line model however this is unsuccessfull. Tried using context and domain  but got nowhere.

الصورة الرمزية
إهمال

You can use context: https://goo.gl/JmQRKw

أفضل إجابة

There is an OCA module "web_domain_field" that can help you to do this.

The problem is that the module is yet not published on v11 [PR #1019] and also not available in v12 but you can get the WIP module from the Maartincm's branch and use the v11 module in v12 which will work without any issue.

See how to use the module for domain.

I am also using this module of v11 in v12 without any issue.

الصورة الرمزية
إهمال
الكاتب

This is brilliant! Thank you

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
ديسمبر 23
14945
0
أكتوبر 23
33
3
أكتوبر 23
790
1
أكتوبر 23
569
1
أغسطس 23
2571