Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
7726 Zobrazení

I defined a `Many2many` field for `ir.attachemnt`. The problem is i can' see the `Add an item` link to add the records.

*.py

        attachment_ids = fields.Many2many('ir.attachment', string='Attachments')

*.xml

     <notebook>

          <page string='Attachments'>

                <field name="attachment_ids"/>

             </page>

    </notebook>


I also tried this:

   <field name="attachment_ids" widget="many2many" />



Is it bug or did i miss anything? Any idea?

Avatar
Zrušit

check permission

Nejlepší odpověď

Hello Kabeer,

I don't know if you found a solution but I came across this issue as well. The only solution I found was to give CRUD rights on both tables the many2many field, not really satisfying...

I even tried to set the relation/column1/column2 parameters and create the relation model to be able to add access rights to the relation table but it is not enough...

many2many_tags and many2many_checkboxes widgets would let you select the attachment you want but it is far from the tree view list with searchbar you get with the standard many2many.

Avatar
Zrušit
Nejlepší odpověď

Hello Kabeer,

Try this in xml file

<field name="attachment_ids" widget="many2many_tags" />

Avatar
Zrušit
Nejlepší odpověď

Hello, Kabeer 

try this one in xml file <field name="attachment_ids" widget="many2many_binary" />

 


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
úno 21
3113
1
bře 20
6667
3
led 20
8401
1
lis 19
3551
2
čvc 22
2370