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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[access_limit_records_number](access_limit_records_number/) | 18.0.1.0.0 | | Limit the number of records in a model, for example, limit the number of users that it's possible to create
[attachment_unindex_content](attachment_unindex_content/) | 18.0.1.0.0 | <a href='https://github.com/moylop260'><img src='https://github.com/moylop260.png' width='32' height='32' style='border-radius:50%;' alt='moylop260'/></a> <a href='https://github.com/ebirbe'><img src='https://github.com/ebirbe.png' width='32' height='32' style='border-radius:50%;' alt='ebirbe'/></a> <a href='https://github.com/luisg123v'><img src='https://github.com/luisg123v.png' width='32' height='32' style='border-radius:50%;' alt='luisg123v'/></a> | Disable indexing of attachments
[auditlog](auditlog/) | 18.0.2.0.0 | | Audit Log
[auto_backup](auto_backup/) | 18.0.1.0.1 | | Backups database
Expand Down Expand Up @@ -55,6 +56,7 @@ addon | version | maintainers | summary
[scheduler_error_mailer](scheduler_error_mailer/) | 18.0.1.0.0 | | Scheduler Error Mailer
[sentry](sentry/) | 18.0.1.0.3 | <a href='https://github.com/barsi'><img src='https://github.com/barsi.png' width='32' height='32' style='border-radius:50%;' alt='barsi'/></a> <a href='https://github.com/naglis'><img src='https://github.com/naglis.png' width='32' height='32' style='border-radius:50%;' alt='naglis'/></a> <a href='https://github.com/versada'><img src='https://github.com/versada.png' width='32' height='32' style='border-radius:50%;' alt='versada'/></a> <a href='https://github.com/moylop260'><img src='https://github.com/moylop260.png' width='32' height='32' style='border-radius:50%;' alt='moylop260'/></a> <a href='https://github.com/fernandahf'><img src='https://github.com/fernandahf.png' width='32' height='32' style='border-radius:50%;' alt='fernandahf'/></a> | Report Odoo errors to Sentry
[session_db](session_db/) | 18.0.1.0.1 | <a href='https://github.com/sbidoul'><img src='https://github.com/sbidoul.png' width='32' height='32' style='border-radius:50%;' alt='sbidoul'/></a> | Store sessions in DB
[test_access_limit_records_number](test_access_limit_records_number/) | 18.0.1.0.0 | | Test Base model to handle a limit in the number of records in an Odoo model
[test_base_time_window](test_base_time_window/) | 18.0.1.0.0 | | Test Base model to handle time windows
[tracking_manager](tracking_manager/) | 18.0.1.1.0 | <a href='https://github.com/Kev-Roche'><img src='https://github.com/Kev-Roche.png' width='32' height='32' style='border-radius:50%;' alt='Kev-Roche'/></a> <a href='https://github.com/sebastienbeau'><img src='https://github.com/sebastienbeau.png' width='32' height='32' style='border-radius:50%;' alt='sebastienbeau'/></a> | This module tracks all fields of a model, including one2many and many2many ones.
[tracking_manager_domain](tracking_manager_domain/) | 18.0.1.0.0 | <a href='https://github.com/CRogos'><img src='https://github.com/CRogos.png' width='32' height='32' style='border-radius:50%;' alt='CRogos'/></a> | This module extends the tracking manager to allow to define a domain on fields to track changes only when certain conditions apply.
Expand Down
116 changes: 116 additions & 0 deletions access_limit_records_number/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
=======================
Limit number of records
=======================

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

.. |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%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/18.0/access_limit_records_number
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-access_limit_records_number
: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/server-tools&target_branch=18.0
:alt: Try me on Runboat

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

With this module you can limit number of records for any model in
specified domain. For example, you can restrict number of vehicles in
fleet_vehicle, say by three. If users try to create more then three
vehicles then exception occurs.

This module uses base.action.rule to restrict number of records. And
also there is new model base.limit.records_number to store the settings.

To do new settings to restrict number of records in any model the user
should be a member of ``Control limits on records number`` security
group.

This project is based on this other project:
https://apps.odoo.com/apps/modules/11.0/access_limit_records_number/

**Table of contents**

.. contents::
:local:

Usage
=====

- In debug mode open ``Settings / Users / Groups``
- Find there ``Limit records number / Control limits on records number``
group and add your user in the group.
- Open ``Settings / Technical / Security / Records Number Limits`` menu
- Create new record. For example:

- Model: Information on a vehicle
- Domain: []
- Maximum Records: 3

- Save the record
- Try to create more than three vehicles from
``Fleet / Vehicles / Vehicles``. When you try to create more than
three vehicles then you see an exception message. The system doesn't
allow you create more than three records.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/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/server-tools/issues/new?body=module:%20access_limit_records_number%0Aversion:%2018.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
-------

* Ivan Yelizariev
* Pavel Romanchenko
* IT Projects Labs
* Miguel Martinez Lopez

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

- Miguel Martinez Lopez @odoodevelopment on tiktok
- Ivan Yelizariev
<`https://it-projects.info/team/yelizariev\\> <https://it-projects.info/team/yelizariev\>>`__
- Pavel Romanchenko <[email protected]>
- IT Projects Labs
<`https://www.it-projects.info\\> <https://www.it-projects.info\>>`__

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/server-tools <https://github.com/OCA/server-tools/tree/18.0/access_limit_records_number>`_ 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 access_limit_records_number/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions access_limit_records_number/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": """Limit number of records""",
"category": "Extra tools",
"version": "18.0.1.0.0",
"author": "Ivan Yelizariev, Pavel Romanchenko, IT Projects Labs, "
"Miguel Martinez Lopez, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
"depends": ["base_automation"],
"data": [
"security/security.xml",
"security/ir.model.access.csv",
"views/base_limit_records_number.xml",
],
"installable": True,
"auto_install": False,
}
Loading