Skip to content

Commit

Permalink
Merge pull request #1159 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/partner-contact (16.0)
  • Loading branch information
bt-admin authored Feb 23, 2024
2 parents 4afe461 + c47c4b9 commit 4837537
Show file tree
Hide file tree
Showing 107 changed files with 5,595 additions and 32 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ addon | version | maintainers | summary
[partner_address_street3](partner_address_street3/) | 16.0.1.0.0 | | Add a third address line on partners
[partner_address_two_lines](partner_address_two_lines/) | 16.0.1.0.0 | | The company and the partner name are on two different lines
[partner_affiliate](partner_affiliate/) | 16.0.1.0.0 | | Partner Affiliates
[partner_auto_archive](partner_auto_archive/) | 16.0.1.0.0 | | Archive periodically all contacts marked as auto-archive.
[partner_bank_acc_type_constraint](partner_bank_acc_type_constraint/) | 16.0.1.0.1 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Adds constraint on bank account type
[partner_bank_code](partner_bank_code/) | 16.0.1.0.1 | | Add fields information in banks
[partner_capital](partner_capital/) | 16.0.0.1.1 | [![EmilioPascual](https://github.com/EmilioPascual.png?size=30px)](https://github.com/EmilioPascual) | Partners Capital
Expand All @@ -44,7 +45,7 @@ addon | version | maintainers | summary
[partner_contact_address_default](partner_contact_address_default/) | 16.0.1.0.0 | | Set a default delivery and invoice address for contacts
[partner_contact_age_range](partner_contact_age_range/) | 16.0.1.0.0 | | Age Range for Contact's
[partner_contact_birthdate](partner_contact_birthdate/) | 16.0.1.0.0 | | Contact's birthdate
[partner_contact_department](partner_contact_department/) | 16.0.1.0.1 | | Assign contacts to departments
[partner_contact_department](partner_contact_department/) | 16.0.1.0.2 | | Assign contacts to departments
[partner_contact_gender](partner_contact_gender/) | 16.0.1.0.0 | | Add gender field to contacts
[partner_contact_job_position](partner_contact_job_position/) | 16.0.1.0.0 | | Categorize job positions for contacts
[partner_contact_lang](partner_contact_lang/) | 16.0.1.0.0 | | Manage language in contacts
Expand All @@ -64,20 +65,21 @@ addon | version | maintainers | summary
[partner_identification](partner_identification/) | 16.0.1.0.3 | | Partner Identification Numbers
[partner_identification_eori](partner_identification_eori/) | 16.0.1.0.0 | | This addon extends "Partner Identification Numbers" to provide a number category for EORI Number
[partner_identification_gln](partner_identification_gln/) | 16.0.1.0.1 | | This addon extends "Partner Identification Numbers" to provide a number category for GLN registration
[partner_industry_secondary](partner_industry_secondary/) | 16.0.1.0.0 | | Add secondary partner industries
[partner_industry_secondary](partner_industry_secondary/) | 16.0.1.0.1 | | Add secondary partner industries
[partner_interest_group](partner_interest_group/) | 16.0.1.1.0 | [![victor-champonnois](https://github.com/victor-champonnois.png?size=30px)](https://github.com/victor-champonnois) | Add Interest Group to Partners
[partner_label](partner_label/) | 16.0.1.0.0 | | Print partner labels
[partner_manual_rank](partner_manual_rank/) | 16.0.1.1.2 | [![luisg123v](https://github.com/luisg123v.png?size=30px)](https://github.com/luisg123v) [![frahikLV](https://github.com/frahikLV.png?size=30px)](https://github.com/frahikLV) | Be able to manually flag partners as customer or supplier.
[partner_middlename](partner_middlename/) | 16.0.1.0.0 | | Have split Middle
[partner_mobile_duplicate_warn](partner_mobile_duplicate_warn/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Warning banner on partner form if another partner has the same mobile
[partner_multi_relation](partner_multi_relation/) | 16.0.1.0.0 | | Partner Relations
[partner_multi_relation](partner_multi_relation/) | 16.0.1.0.1 | | Partner Relations
[partner_phonecall_schedule](partner_phonecall_schedule/) | 16.0.1.0.1 | | Track the time and days your partners expect phone calls
[partner_pricelist_search](partner_pricelist_search/) | 16.0.1.0.0 | | Partner pricelist search
[partner_purchase_manager](partner_purchase_manager/) | 16.0.1.0.1 | [![EmilioPascual](https://github.com/EmilioPascual.png?size=30px)](https://github.com/EmilioPascual) | Add purchase manager field in partner
[partner_ref_unique](partner_ref_unique/) | 16.0.1.0.0 | | Add an unique constraint to partner ref field
[partner_second_lastname](partner_second_lastname/) | 16.0.1.0.1 | | Have split first and second lastnames
[partner_stage](partner_stage/) | 16.0.1.0.0 | [![dreispt](https://github.com/dreispt.png?size=30px)](https://github.com/dreispt) | Add lifecycle Stages to Partners
[partner_subject_to_vat](partner_subject_to_vat/) | 16.0.1.0.0 | [![victor-champonnois](https://github.com/victor-champonnois.png?size=30px)](https://github.com/victor-champonnois) | Record whether a company is subject to VAT.
[partner_tier_validation](partner_tier_validation/) | 16.0.1.0.0 | [![dreispt](https://github.com/dreispt.png?size=30px)](https://github.com/dreispt) | Support a tier validation process for Contacts
[partner_tier_validation](partner_tier_validation/) | 16.0.1.0.1 | [![dreispt](https://github.com/dreispt.png?size=30px)](https://github.com/dreispt) | Support a tier validation process for Contacts
[partner_tz](partner_tz/) | 16.0.1.0.0 | | Remove partner timezone default value and display on form
[partner_vat_unique](partner_vat_unique/) | 16.0.1.0.0 | | Module to make the VAT number unique for customers and suppliers.
[purchase_supplier_rank](purchase_supplier_rank/) | 16.0.1.0.1 | | Update Supplier Rank when creating a Purchase Order
Expand Down
85 changes: 85 additions & 0 deletions partner_auto_archive/README.rst
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.
1 change: 1 addition & 0 deletions partner_auto_archive/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions partner_auto_archive/__manifest__.py
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,
}
13 changes: 13 additions & 0 deletions partner_auto_archive/data/ir_cron.xml
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>
37 changes: 37 additions & 0 deletions partner_auto_archive/i18n/partner_auto_archive.pot
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 ""
1 change: 1 addition & 0 deletions partner_auto_archive/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
20 changes: 20 additions & 0 deletions partner_auto_archive/models/res_partner.py
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
2 changes: 2 additions & 0 deletions partner_auto_archive/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Marina Alapont <[email protected]>

2 changes: 2 additions & 0 deletions partner_auto_archive/readme/DESCRIPTION.rst
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.
3 changes: 3 additions & 0 deletions partner_auto_archive/readme/USAGE.rst
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".
Binary file added partner_auto_archive/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

0 comments on commit 4837537

Please sign in to comment.