Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0] [MIG] mail_activity_partner: Migration to 17.0 #1448

Open
wants to merge 25 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1a76573
[12.0][ADD] Add module mail_activity_partner
AdriaGForgeFlow Dec 21, 2018
d1ffeaa
[UPD] README.rst
OCA-git-bot Jan 15, 2019
ea63485
[UPD] Update mail_activity_partner.pot
oca-travis Jan 15, 2019
42f1840
[ADD] icon.png
OCA-git-bot Apr 3, 2019
ec2b5f3
[UPD] README.rst
OCA-git-bot Jul 29, 2019
dbe773e
[IMP] mail_activity_partner: black, isort
AdriaGForgeFlow Dec 24, 2019
325abc1
[MIG] mail_activity_partner: Migration to 13.0
AdriaGForgeFlow Dec 24, 2019
4c14aa2
[UPD] Update mail_activity_partner.pot
oca-travis Jan 7, 2021
4201400
[IMP] pre-commit run -a
Jan 26, 2021
9f8c417
[MIG] mail_activity_partner: Migration to 14.0
Rad0van Nov 10, 2021
4eb5d7d
[UPD] Update mail_activity_partner.pot
oca-travis Nov 27, 2021
21e9bd1
[UPD] README.rst
OCA-git-bot Nov 27, 2021
cffec1e
[15.0][MIG] mail_activity_partner: Migration to 15.0
JoanMForgeFlow Nov 30, 2021
333a7e3
[UPD] Update mail_activity_partner.pot
Dec 6, 2021
9b15ba4
[UPD] README.rst
OCA-git-bot Dec 6, 2021
d754fb7
[FIX] mail_activity_partner: Remove test folder from __init__
victoralmau Nov 3, 2022
59298ef
[MIG] mail_activity_partner: Migration to 16.0
polqubiq Jun 6, 2023
b41f22a
[UPD] Update mail_activity_partner.pot
Nov 17, 2023
caa29b7
[BOT] post-merge updates
OCA-git-bot Nov 17, 2023
fb80b10
Added translation using Weblate (Italian)
mymage Nov 30, 2023
a35a29e
Translated using Weblate (Italian)
mymage Dec 1, 2023
c08ee8a
Added translation using Weblate (Spanish)
Ivorra78 Dec 12, 2023
f4bef5d
Translated using Weblate (Spanish)
Ivorra78 Dec 12, 2023
7aebf03
[IMP] mail_activity_partner: pre-commit auto fixes
bizzappdev Sep 25, 2024
b95e4e5
[MIG] mail_activity_partner: Migration to 17.0
bizzappdev Sep 25, 2024
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
82 changes: 82 additions & 0 deletions mail_activity_partner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
=====================
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 ([email protected])
- Joan Mateu Jordi ([email protected])

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 <[email protected]>\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 <[email protected]>\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"
2 changes: 2 additions & 0 deletions mail_activity_partner/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Adrià Gil Sorribes (<[email protected]>)
- Joan Mateu Jordi (<[email protected]>)
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
Loading