跳至內容
選單
此問題已被標幟
2 回覆
2461 瀏覽次數

Hi, i need to send images to an external app and they only accept well formed img urls, /web/example.jpg for example, how can i achieve this with my binary product images?

頭像
捨棄
最佳答案

Hi Yasim Mirabal,

Please refer the following code. Hope this will help you.

base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
image_url_1920 = base_url + '/web/image?' + 'model=product_product&id=' + str(rec.id) + '&field=image_1920'

頭像
捨棄