Tuesday, November 23, 2021

How to disable attachments in chatter module of odoo?



The reason to disable attachment may be anything like
 1. There is no actual need from client for attachment
 2. Server Space constraint/restriction
 3. Avoiding malicious file upload (security reson -  VAPT observation) etc.,

To remove add attachment option from chatter module
File : /<your_path_to_odoo>/addons/portal/static/src/xml/portal_chatter.xml
Comment the following line: (In odoo14 - to be precise at line no - 55 )
    <button class="o_portal_chatter_attachment_btn btn btn-secondary" type="button" title="Add attachment">
           <i class="fa fa-paperclip"/>
        </button>
        
       <!-- <button class="o_portal_chatter_attachment_btn btn btn-secondary" type="button" title="Add attachment">
           <i class="fa fa-paperclip"/>
        </button> -->


For your reference and perusal screenshots before and after the code block comment.

Before commenting attachment code block
 
chatter module after attachment comment

 

 

3 comments:

b2b online medicine delivery app said...

Wow!!! Super cool and very inspiring. Thanks for the collection!online pharmacy app development
pharmacy app development

Arunkumar V said...

Add code snippets as a github gist and embed here. That highlights the syntax and gives a better look.

Edwin said...

I appreciate how you explained the complex subject in such an easy-to-understand manner. free auto clicker ensure that clicks are executed with consistent timing and precision, minimizing errors caused by human variability.Visit this article.