Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3603 Visualizzazioni


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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
ott 18
6230
2
nov 17
4603
2
dic 17
12922
1
ott 17
2771
0
feb 25
1110