Se rendre au contenu
Menu
Cette question a été signalée


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?
Avatar
Ignorer
Publications associées Réponses Vues Activité
2
oct. 18
6237
2
nov. 17
4607
2
déc. 17
12927
1
oct. 17
2771
0
févr. 25
1114