Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions mail_activity_partner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
=====================
Mail Activity Partner
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b8f1e18fc30525be3711f60f6ba298b30090661d6884ad6bee0809ccc47a7342
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/17.0/mail_activity_partner
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_partner
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a partner and commercial partner field to activities

**Table of contents**

.. contents::
:local:

Usage
=====



Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_activity_partner%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Adrià Gil Sorribes (adria.gil@forgeflow.com)
- Joan Mateu Jordi (joan.mateu@forgeflow.com)
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <alexey.pelykh@corphub.eu>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mail_activity_partner>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions mail_activity_partner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
15 changes: 15 additions & 0 deletions mail_activity_partner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Activity Partner",
"summary": "Add Partner to Activities",
"version": "17.0.1.0.0",
"development_status": "Beta",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"data": ["views/mail_activity_views.xml"],
"depends": ["mail_activity_board"],
}
32 changes: 32 additions & 0 deletions mail_activity_partner/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-12 16:22+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: mail_activity_partner
#: model:ir.model,name:mail_activity_partner.model_mail_activity
msgid "Activity"
msgstr "Actividad"

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__commercial_partner_id
msgid "Commercial Entity"
msgstr "Entidad Comercial"

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__partner_id
msgid "Partner"
msgstr "Proveedor"
32 changes: 32 additions & 0 deletions mail_activity_partner/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-01 10:12+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: mail_activity_partner
#: model:ir.model,name:mail_activity_partner.model_mail_activity
msgid "Activity"
msgstr "Attività"

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__commercial_partner_id
msgid "Commercial Entity"
msgstr "Entità commerciale"

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__partner_id
msgid "Partner"
msgstr "Partner"
29 changes: 29 additions & 0 deletions mail_activity_partner/i18n/mail_activity_partner.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_activity_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mail_activity_partner
#: model:ir.model,name:mail_activity_partner.model_mail_activity
msgid "Activity"
msgstr ""

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__commercial_partner_id
msgid "Commercial Entity"
msgstr ""

#. module: mail_activity_partner
#: model:ir.model.fields,field_description:mail_activity_partner.field_mail_activity__partner_id
msgid "Partner"
msgstr ""
3 changes: 3 additions & 0 deletions mail_activity_partner/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import mail_activity
38 changes: 38 additions & 0 deletions mail_activity_partner/models/mail_activity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models


class MailActivity(models.Model):
_inherit = "mail.activity"

partner_id = fields.Many2one(
comodel_name="res.partner",
index=True,
compute="_compute_res_partner_id",
store=True,
)

commercial_partner_id = fields.Many2one(
related="partner_id.commercial_partner_id",
string="Commercial Entity",
store=True,
related_sudo=True,
readonly=True,
)

@api.depends("res_model", "res_id")
def _compute_res_partner_id(self):
for activity in self:
res_model = activity.res_model
res_id = activity.res_id
activity.partner_id = False
if res_model:
if res_model == "res.partner":
activity.partner_id = res_id
else:
res_model_id = self.env[res_model].browse(res_id)
if "partner_id" in res_model_id._fields and res_model_id.partner_id:
activity.partner_id = res_model_id.partner_id
else:
activity.partner_id = False
3 changes: 3 additions & 0 deletions mail_activity_partner/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions mail_activity_partner/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Adrià Gil Sorribes (<adria.gil@forgeflow.com>)
- Joan Mateu Jordi (<joan.mateu@forgeflow.com>)
- [CorporateHub](https://corporatehub.eu/)
- Alexey Pelykh \<<alexey.pelykh@corphub.eu>\>
1 change: 1 addition & 0 deletions mail_activity_partner/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module adds a partner and commercial partner field to activities
1 change: 1 addition & 0 deletions mail_activity_partner/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added mail_activity_partner/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading