Policy Mixin
by OpenSynergy Indonesia https://simetri-sinergi.id , PT. Simetri Sinergi Indonesia https://simetri-sinergi.id
Odoo
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 549 |
| Technical Name |
ssi_policy_mixin |
| License | AGPL-3 |
| Website | https://simetri-sinergi.id |
| Versions | 11.0 14.0 |
Policy Mixin
ssi_policy_mixin provides an abstract Odoo model — mixin.policy — that implements a policy-template mechanism for controlling which action buttons are available on a document at any given time.
Each inheriting model declares boolean policy fields (e.g. confirm_ok, cancel_ok) via _get_policy_field and links to a policy.template that evaluates Python conditions against the current record to set those fields automatically.
- policy.template — master-data record holding Python evaluation code (matching criteria) and ordered detail lines.
- policy.template.detail — maps a policy field to its computed value for records that match the template.
- action_reload_policy_template — manually re-selects the active template based on the record’s current state.
Installation
To install this module, you need to:
- Clone the branch 14.0 of the repository https://github.com/open-synergy/ssi-mixin
- Add the path to this repository in your configuration (addons-path)
- Update the module list (Must be on developer mode)
- Go to menu Apps -> Apps -> Main Apps
- Search For Policy Mixin
- Install the module
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.
Credits
Contributors
- Michael Viriyananda <viriyananda.michael@gmail.com>
- Andhitia Rama <andhitia.r@gmail.com>
Maintainer
This module is maintained by the PT. Simetri Sinergi Indonesia.
Please log in to comment on this module