Policy Mixin

Info Description

Policy Mixin is a core mixin module in the @simetri-sinergi-id/ssi-mixin technology suite for Odoo 15. It provides a reusable abstract 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.

Features Key Features

Use Cases Use Cases / Context

Use this mixin for any transactional document where button availability depends on configurable business rules:

Simply set _inherit = ["mixin.policy"] on your model and define your policy fields and templates via the UI.

Install Installation & Usage

  1. Clone branch 15.0 of the repository: https://github.com/simetri-sinergi-id/ssi-mixin
  2. Add the path to this repository in your Odoo configuration (addons-path).
  3. Update the module list (ensure you are in developer mode).
  4. Go to Apps → Apps → Main Apps, search for Policy Mixin, and install.
  5. In your custom model:
    _inherit = ["mixin.policy"]
  6. Declare your policy fields via _get_policy_field() and configure policy.template records through the UI.

FAQs FAQ

Bug Tracker 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 Credits & Contributors

This module is developed and maintained by PT. Simetri Sinergi Indonesia.