Many2one Configurator 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 | 43 |
| Technical Name |
ssi_m2o_configurator_mixin |
| License | AGPL-3 |
| Website | https://simetri-sinergi.id |
Many2one Configurator Mixin
ssi_m2o_configurator_mixin provides an abstract Odoo model — mixin.many2one_configurator — that implements a three-strategy runtime filter for Many2one fields.
The three strategies are:
- manual — the allowed records are selected explicitly by the user.
- domain — a domain string (evaluated with safe_eval) determines which records are allowed.
- code — arbitrary Python code is evaluated in a local dictionary (env, document) and must assign a recordset to result.
Concrete configurator models inherit this mixin and expose the strategy fields to end users, enabling dynamic Many2one filtering without hard-coded domains.
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 Many2one Configurator 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
- 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