Skip to Content
Menu
This question has been flagged

Ubuntu 16.04 - Odoo 12 - VirtualBox

I've created a custom module where customer service can add tags to their orders in Sales > Orders using a many2many_tags widget. 

The problem I'm running into are the Odoobot created tags that look like directories in the list. (web/content/637-6bb307d/stuff.js) These tags confuse customer service and I need to get rid of them. They are along in the list of tags with tags my company has made. (example tags: Customer Art, Production Art, etc..)

How do I hide or delete Odoobot created tags/attachments? Where are they coming from and why is odoobot creating them? There is also a long list of them that you can see when you click "Search more..." while adding the tags.​

     .py                  attachment = fields.Many2many('ir.attachment')
    .xml                field name="attachment" widget="many2many_tags"/>


Update:

I've found that the problem lies within having ir.attachment as my relation. Basically trying to have an attachment as a tag. That is where all the weird directory looking stuff comes from. I don't think I can hide the odoobot attachments but if anyone knows otherwise please let me know.

Avatar
Discard
Best Answer

This probably isn't the best approach for tags, you should really have a new model like sale.order.tag so they are separated from the attachments table. You could then add an attachment field on the tags to point to what you need, but the tags themselves are separate.

If you wanted to keep it as attachments you can add a domain to the many2many with user created by != 1, or add a new field on attachments for 'use as tag' and add that being true as the domain instead. 

Cheers 

Jake Robinson

Avatar
Discard
Related Posts Replies Views Activity
1
Sep 20
4189
0
Dec 15
3034
0
Mar 23
1275
2
Mar 15
3381
2
Nov 24
8364