Hello, I want to add an Iframe in OpenERP so that I can show a different website in OpenERP , but I want to pass dynamic values along with the url so that I can collect values with GET method on other end. now since this will be in xml view file I cant imagine how to do this. any pointers ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi Hussain,
I extended de product class to include a youtube URL field. The way I made it dynamic in the extended view was to use the t-att directive in QWeb:
<iframe allowfullscreen="allowfullscreen" frameborder="0" t-att-src="product.url_youtube"></iframe>
Hope this helps. Please vote my answer if it was useful to you.
t-att-src="product.url_youtube" not work for me, could you please explain more or write a com plate example code .
Part of the answer here : https://www.odoo.com/fr_FR/forum/help-1/question/adding-i-frame-in-openerp-34242
**`Image Url wise Set Dynamic Iframe In Odoo`** # v11 odoo community you need to create fields like this : image_url = fields.Char('Image Url') img_attach = fields.Html('Image Html') # set image_url in iframe @api.onchange('image_url') def onchange_image_url(self): if self.image_url: self.img_attach = '<img id="img" src="%s"/>' % self.image_url
# set image_url in form view
<field name="image_url" />
# after added script <script> if(document.getElementById("img")){ var value= document.getElementById("img").src; document.getElementById("custom_src").src=value; } </script> # also set iframe in form view <iframe id="custom_src" src="" width="200" height="200" /> #output show the image :
https://i.stack.imgur.com/0x7et.png
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 6 24
|
30499 | ||
|
3
thg 5 24
|
2910 | ||
Adding I frame in OpenERP
Đã xử lý
|
|
2
thg 11 23
|
36605 | |
|
0
thg 12 22
|
2009 | ||
can't call odoo from iframe
Đã xử lý
|
|
2
thg 12 22
|
3812 |
Did you succeed in doing this?
Related but not answered question : https://www.odoo.com/forum/help-1/question/how-to-insert-properties-of-the-data-model-in-the-xml-view-10529