Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3647 มุมมอง


I want to show multiple images with many2many_binary widget but after saving the selected images, only links of the images are displayed not images. Why? What should I do to show images? Here is my code:-

py code:-

    class image_multi(models.Model):
    _inherit = "product.template"

    image_med = fields.Many2many('ir.attachment', attachment=True, string="Add images")

xml code:-

   <?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="product_image_multi_form" model="ir.ui.view">
            <field name="name">product.imagemulti.form</field>
            <field name="model">product.template</field>
            <field name="inherit_id" ref="product.product_template_form_view"/>
            <field name="arch" type="xml">




                <notebook position="inside">
                    <page string="Images" >
                        <group>
                            <field name="image_med" widget="many2many_binary"/>
                        </group>
                    </page>
                </notebook>
            </field>
        </record>
    </data>
</openerp>
   Can anyone help me on this?
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 18
6262
2
พ.ย. 17
4664
multiple images with preview in products แก้ไขแล้ว
2
ธ.ค. 17
12959
1
ต.ค. 17
2790
0
ก.พ. 25
1202