You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.0 KiB

  1. # -*- coding: utf-8 -*-
  2. #
  3. # Author: Yannick Vaucher
  4. # Copyright 2015 Camptocamp SA
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as
  8. # published by the Free Software Foundation, either version 3 of the
  9. # License, or (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. {'name': 'Records Archiver',
  20. 'version': '0.1',
  21. 'description': """
  22. Records Archiver
  23. ================
  24. Create a cron job that deactivates old records in order to optimize
  25. performance.
  26. Records are deactivated based on their last activity (write_date).
  27. Configuration
  28. =============
  29. You can configure lifespan of each type of record in
  30. `Settings -> Configuration -> Records Archiver`
  31. A different lifespan can be configured for each model.
  32. Usage
  33. =====
  34. Once the lifespans are configured, the cron will automatically
  35. deactivate the old records.
  36. Known issues / Roadmap
  37. ======================
  38. The default behavior is to archive all records having a ``write_date`` <
  39. lifespan and with a state being ``done`` or ``cancel``. If these rules
  40. need to be modified for a model (e.g. change the states to archive), the
  41. hook ``RecordLifespan._archive_domain`` can be extended.
  42. Bug Tracker
  43. ===========
  44. Bugs are tracked on `GitHub Issues
  45. <https://github.com/OCA/server-tools/issues>`_. In case of trouble,
  46. please check there if your issue has already been reported. If you
  47. spotted it first, help us smashing it by providing a detailed and
  48. welcomed feedback `here
  49. <https://github.com/OCA/server-tools/issues/new?body=module:%20record_archiver%0Aversion:%207.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  50. Credits
  51. =======
  52. Contributors
  53. ------------
  54. * Yannick Vaucher <yannick.vaucher@camptocamp.com>
  55. * Guewen Baconnier <guewen.baconnier@camptocamp.com>
  56. Maintainer
  57. ----------
  58. .. image:: https://odoo-community.org/logo.png
  59. :alt: Odoo Community Association
  60. :target: https://odoo-community.org
  61. This module is maintained by the OCA.
  62. OCA, or the Odoo Community Association, is a nonprofit organization whose
  63. mission is to support the collaborative development of Odoo features and
  64. promote its widespread use.
  65. To contribute to this module, please visit http://odoo-community.org.
  66. """,
  67. 'author': 'Camptocamp,Odoo Community Association (OCA)',
  68. 'license': 'AGPL-3',
  69. 'category': 'misc',
  70. 'depends': ['base'],
  71. 'website': 'www.camptocamp.com',
  72. 'data': ['views/record_lifespan_view.xml',
  73. 'data/cron.xml',
  74. 'security/ir.model.access.csv',
  75. ],
  76. 'installable': True,
  77. 'auto_install': False,
  78. }