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

Hello,

For a project i need to implement variable inside the XML view files of an inline form.

Those variable are stored inside .py files as either constant inside an array or inside a configuration field. I was wondering how i should do that.

Also some of those variable are part of a text i need to concatanate so i can't just throw them inside the XML file.

Thanks

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

I'm creating an inline_form ( inside the data folder and  inside the view folder)​, and the variable i'm passing are strings that i get from different .py file inside the plugin such as the payment_provider.py files or a constant.py.


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

Hello Hippolyte,

Could you elaborate on which variable and inline forms you are discussing?

You may want to do something like in payment_stripe​ where a serialized dict is set as attribute of a div​ node in Stripe's inline form.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 24
1768
1
أبريل 24
2296
1
يوليو 25
1493
0
أبريل 24
1099
3
مارس 24
2102