Compare commits
6 Commits
16.0_pr_ma
...
14.0
Author | SHA1 | Date | |
---|---|---|---|
|
c0f1d40d67 | ||
|
3dec6478d7 | ||
|
b6b80516ba | ||
|
a0d1b6e854 | ||
8a3b55035d | |||
ba60a0be89 |
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "mail_activity_plan",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "14.0.1.1.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://github.com/elabore-coop/ux-tools",
|
||||
"maintainer": "Laetitia Da Costa",
|
||||
|
@@ -1 +1,2 @@
|
||||
from . import ir_actions, mail_activity_plan
|
||||
from . import mail_activity_plan
|
||||
from . import ir_actions
|
@@ -3,7 +3,6 @@
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class IrActionsServer(models.Model):
|
||||
""" Add activity plan option in server actions. """
|
||||
_inherit = 'ir.actions.server'
|
||||
|
@@ -1,8 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
class MailActivityTemplate(models.Model):
|
||||
'''
|
||||
@@ -10,8 +9,7 @@ class MailActivityTemplate(models.Model):
|
||||
'''
|
||||
_name = 'mail.activity.template'
|
||||
_description = 'Mail activity template'
|
||||
_order = 'sequence'
|
||||
_rec_name = 'summary'
|
||||
_order = 'sequence'
|
||||
|
||||
mail_activity_plan_id = fields.Many2one('mail.activity.plan', ondelete='restrict')
|
||||
|
||||
@@ -35,12 +33,6 @@ class MailActivityPlan(models.Model):
|
||||
_name = 'mail.activity.plan'
|
||||
_description = 'Mail activity plan'
|
||||
|
||||
@api.returns('self', lambda value: value.id)
|
||||
def copy(self, default=None):
|
||||
default = dict(default or {},
|
||||
name=_("%s (copy)", self.name))
|
||||
return super(MailActivityPlan, self).copy(default=default)
|
||||
|
||||
name = fields.Char('Name', required=True)
|
||||
mail_activity_template_ids = fields.One2many('mail.activity.template', 'mail_activity_plan_id', string='Template Activities', copy=True)
|
||||
mail_activity_template_ids = fields.One2many('mail.activity.template', 'mail_activity_plan_id', string='Template Activities')
|
||||
active = fields.Boolean(default=True)
|
||||
|
@@ -37,19 +37,17 @@
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="Activity Templates">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="mail_activity_template_ids">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="mail_activity_type_id"/>
|
||||
<field name="summary"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group string="Activity Templates">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="mail_activity_template_ids" nolabel="1" colspan="2">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="mail_activity_type_id"/>
|
||||
<field name="summary"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
@@ -1,52 +0,0 @@
|
||||
====================
|
||||
mail_message_copy_in_partner
|
||||
====================
|
||||
|
||||
Installation
|
||||
============
|
||||
Use Odoo normal module installation procedure to install ``mail_message_copy_in_partner``.
|
||||
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Nothing to do
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
If module is installed, notes will never send email to partners not linked to internal users.
|
||||
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/ux-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Clément Thomas
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
@@ -1,89 +0,0 @@
|
||||
# Copyright 2022 Laetitia Élabore (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "mail_message_copy_in_partner",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://github.com/elabore-coop/ux-tools",
|
||||
"maintainer": "Clément",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "If current model has partner_id field, all messages will be copied in partner's chatter",
|
||||
"description": """
|
||||
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
=================
|
||||
mail_message_copy_in_partner
|
||||
=================
|
||||
If current model has partner_id field, all messages will be copied in partner's chatter
|
||||
New message is a note without recipients
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Install ``mail_message_copy_in_partner``, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website
|
||||
<https://github.com/elabore-coop/ux-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Clément Thomas
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by Elabore.
|
||||
|
||||
""",
|
||||
# any module necessary for this one to work correctly
|
||||
'depends' : ['base_setup'],
|
||||
"qweb": [
|
||||
# "static/src/xml/*.xml",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
@@ -1 +0,0 @@
|
||||
from . import mail_thread
|
@@ -1,24 +0,0 @@
|
||||
from odoo import api, models, _
|
||||
|
||||
|
||||
class MailThread(models.AbstractModel):
|
||||
_inherit = 'mail.thread'
|
||||
|
||||
@api.returns('mail.message', lambda value: value.id)
|
||||
def message_post(self, body='', **kwargs):
|
||||
#send message to related partner
|
||||
if hasattr(self, 'partner_id') and self.partner_id:
|
||||
msg = _('<b>[%(object)s]</b> %(body)s',object=self._get_html_link(), body=body)
|
||||
|
||||
new_kwargs = kwargs.copy()
|
||||
|
||||
#new message is a note
|
||||
new_kwargs['subtype_xmlid'] = "mail.mt_note"
|
||||
|
||||
#do not send anything
|
||||
new_kwargs['partner_ids'] = []
|
||||
|
||||
self.partner_id.message_post(body=msg, **new_kwargs)
|
||||
|
||||
return super(MailThread, self).message_post(body=body, **kwargs)
|
||||
|
@@ -1,52 +0,0 @@
|
||||
====================
|
||||
mail_prevent_send_note_to_external
|
||||
====================
|
||||
|
||||
Installation
|
||||
============
|
||||
Use Odoo normal module installation procedure to install ``mail_prevent_send_note_to_external``.
|
||||
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Nothing to do
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
If module is installed, notes will never send email to partners not linked to internal users.
|
||||
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/ux-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Clément Thomas
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
@@ -1,4 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
@@ -1,88 +0,0 @@
|
||||
# Copyright 2022 Laetitia Élabore (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "mail_prevent_send_note_to_external",
|
||||
"version": "16.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://github.com/elabore-coop/ux-tools",
|
||||
"maintainer": "Clément",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Prevent chatter note to send email to external partner",
|
||||
"description": """
|
||||
:image: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
=================
|
||||
mail_prevent_send_note_to_external
|
||||
=================
|
||||
|
||||
Prevent chatter note to send email to external partner
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Install ``mail_prevent_send_note_to_external``, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website
|
||||
<https://github.com/elabore-coop/ux-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Clément Thomas
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by Elabore.
|
||||
|
||||
""",
|
||||
# any module necessary for this one to work correctly
|
||||
'depends' : ['base_setup'],
|
||||
"qweb": [
|
||||
# "static/src/xml/*.xml",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
@@ -1 +0,0 @@
|
||||
from . import mail_thread
|
@@ -1,19 +0,0 @@
|
||||
from odoo import api, models, _
|
||||
|
||||
|
||||
class MailThread(models.AbstractModel):
|
||||
_inherit = 'mail.thread'
|
||||
|
||||
@api.returns('mail.message', lambda value: value.id)
|
||||
def message_post(self, **kwargs):
|
||||
#check subtype_xmlid and partner_ids, and remove external partners if subtype is "note"
|
||||
if kwargs.get("subtype_xmlid") == 'mail.mt_note' and "partner_ids" in kwargs:
|
||||
new_partner_ids = []
|
||||
for partner_id in kwargs["partner_ids"]:
|
||||
user = self.env["res.users"].search([('partner_id','=',partner_id)])
|
||||
if user.active and user.has_group('base.group_user'):
|
||||
new_partner_ids.append(partner_id)
|
||||
kwargs["partner_ids"] = new_partner_ids
|
||||
|
||||
message = super(MailThread, self).message_post(**kwargs)
|
||||
return message
|
Reference in New Issue
Block a user