Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
448 Vistas

OE 18

When sharing an entire workspace with the Document module you can check/unchek a "Notify" box that will send a notification to all people sharing the workspace

I could not find anything to notify all people sharing the workspace when adding a new file


Any idea is welcome


Maurice

Avatar
Descartar
Mejor respuesta

This requires customization.

When uploading a file, the default sharing permissions match the Folder it is added to.

Using Developer Mode, you can create an Automation Rule that is triggered when a new Document is created to email all Users the Folder is already shared with.


Steps for Odoo 19.0:


First, Uncheck the Restrict Template Rendering option:


Next, create an Email Template you will use to notify people a new Document is available.

You can toggle to "code view" by entering text, selecting it, then expanding the toolbar that pops up:

Once you are in Code View, enter the following for the Body:

Copy/Paste version:

<div>
Click
  <a t-att-href="object.folder_id.access_url">
    HERE
  </a>
to access it now!
</div>


Settings for the Template:

Copy/Paste version:

{{ object.folder_id.access_ids.mapped('partner_id').ids }}


Next, create an Automation Rule like this, using the Email Template you just created:



Next, allow this Automated Action to run on each Folder you are sharing:


Result: Email before it leaves Odoo:


Email as received:

Avatar
Descartar