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

When calling a function without parametter the context is preserved and can be used

@api.multi
def button_print(self):
_logger.info('Context : %s: ', self.env.context)

Calling this function from a button we get a filled context dictionnary.

But calling the same function with a  defined parametter we get an empty context {}

@api.multi
def button_print(self, demo=False):
_logger.info('Context : %s: ', self.env.context)
الصورة الرمزية
إهمال
أفضل إجابة

Hello, did you find a solution for this issue ?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 25
3138
3
أبريل 17
2651
0
أبريل 17
5222
2
مارس 19
3077
0
أكتوبر 15
9503