forked from OCA/partner-contact
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1159 from OCA/16.0
Syncing from upstream OCA/partner-contact (16.0)
- Loading branch information
Showing
107 changed files
with
5,595 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
==================== | ||
Partner Auto Archive | ||
==================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:ec56a733db897296bcdb58b59aa58515f9ea5f14aa20c0bd5c60765c37cf18a2 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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%2Fpartner--contact-lightgray.png?logo=github | ||
:target: https://github.com/OCA/partner-contact/tree/16.0/partner_auto_archive | ||
:alt: OCA/partner-contact | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_auto_archive | ||
: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/partner-contact&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds the possibility to mark contacts as auto-archive. | ||
Periodically an scheduled action will run and archive the auto-archive contacts. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
You can find the auto archive field on the partner form. | ||
The contacts that have checked the auto archive option will be archived periodically, every 15 days. | ||
The scheduled action can be modified in the Scheduled Actions view, the action name is "Contact: Archive Contacts". | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/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/partner-contact/issues/new?body=module:%20partner_auto_archive%0Aversion:%2016.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 | ||
~~~~~~~~~~~~ | ||
|
||
* Marina Alapont <[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/partner-contact <https://github.com/OCA/partner-contact/tree/16.0/partner_auto_archive>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Partner Auto Archive", | ||
"version": "16.0.1.0.0", | ||
"author": "ForgeFlow,Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/partner-contact", | ||
"category": "Customer Relationship Management", | ||
"summary": "Archive periodically all contacts marked as auto-archive.", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"base", | ||
], | ||
"data": ["views/res_partner_views.xml", "data/ir_cron.xml"], | ||
"installable": True, | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo noupdate="1"> | ||
<record id="ir_cron_archive_contacts" model="ir.cron"> | ||
<field name="name">Contact: Archive Contacts</field> | ||
<field name="model_id" ref="base.model_res_partner" /> | ||
<field name="state">code</field> | ||
<field name="code">model._auto_archive_contacts()</field> | ||
<field name="interval_number">15</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="active">1</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * partner_auto_archive | ||
# | ||
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: partner_auto_archive | ||
#: model:ir.model.fields,help:partner_auto_archive.field_res_partner__auto_archive | ||
#: model:ir.model.fields,help:partner_auto_archive.field_res_users__auto_archive | ||
msgid "Archive contact automatically after a period of time" | ||
msgstr "" | ||
|
||
#. module: partner_auto_archive | ||
#: model:ir.model.fields,field_description:partner_auto_archive.field_res_partner__auto_archive | ||
#: model:ir.model.fields,field_description:partner_auto_archive.field_res_users__auto_archive | ||
msgid "Auto Archive" | ||
msgstr "" | ||
|
||
#. module: partner_auto_archive | ||
#: model:ir.model,name:partner_auto_archive.model_res_partner | ||
msgid "Contact" | ||
msgstr "" | ||
|
||
#. module: partner_auto_archive | ||
#: model:ir.actions.server,name:partner_auto_archive.ir_cron_archive_contacts_ir_actions_server | ||
#: model:ir.cron,cron_name:partner_auto_archive.ir_cron_archive_contacts | ||
msgid "Contact: Archive Contacts" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import res_partner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class Partner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
auto_archive = fields.Boolean( | ||
help="Archive contact automatically after a period of time", tracking=True | ||
) | ||
|
||
@api.model | ||
def _auto_archive_contacts(self): | ||
contacts_to_archive = self.env["res.partner"].search( | ||
[("auto_archive", "=", True)] | ||
) | ||
contacts_to_archive.action_archive() | ||
contacts_to_archive.auto_archive = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Marina Alapont <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module adds the possibility to mark contacts as auto-archive. | ||
Periodically an scheduled action will run and archive the auto-archive contacts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You can find the auto archive field on the partner form. | ||
The contacts that have checked the auto archive option will be archived periodically, every 15 days. | ||
The scheduled action can be modified in the Scheduled Actions view, the action name is "Contact: Archive Contacts". |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.