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

The following code is designed to make something happen when I on the website view. It changes the prices of the products. 

The problem is that It worked fine until v16, where it still works when I go to the shop and click on the product, but it does not work when I just go to the shop (see all products on the website).

    def get_combination_info_website(self):
if self.env.context.get('website_id'):

Any ideas on how to properly tell Odoo to identify that I am inside the website shop page?

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Can you access request.website and see if it helps.

Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
نوفمبر 19
3761
0
نوفمبر 23
1307
1
ديسمبر 23
1578
1
يونيو 22
2757
1
نوفمبر 21
4527