Skip to main content

mds-irrulecontext

Tryton module to add values to context of ir.rule.

Install

pip install mds-irrulecontext

How To

Add your model_names using _context_modelnames(), the module will then add the value user_id to the context of ir.rule. If company is installed, the ID of company and employee will be in the context. Use _get_context_values() to add additional values to context of ir.rule:

class IrRule(metaclass=PoolMeta):
    __name__ = 'ir.rule'

    @classmethod
    def _context_modelnames(cls):
        """ add model_name to context
        """
        result = super(IrRule, cls)._context_modelnames()
        result |= {'modelname1', 'modelname2'}
        return result

    @classmethod
    def _get_context_values(cls, model_name):
        """ add values to context
        """
        result = super(IrRule, cls)._get_context_values(model_name)

        if model_name == 'modelname1':
            result['key1'] = 'value1'
        elif model_name == 'modelname2':
            result['key2'] = 'value2'
        return result

Requires

  • Tryton 8.0

Changes

8.0.2 - 03.08.2026

  • migrate to 8.0

Metadata

Release files for mds-irrulecontext 8.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mds-irrulecontext 8.0.2
File Size Uploaded Provenance
mds_irrulecontext-8.0.2.tar.gz 18.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mds-irrulecontext 8.0.2
File Interpreter ABI Platform
mds_irrulecontext-8.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / mds_irrulecontext-8.0.2.tar.gz

Download URL mds_irrulecontext-8.0.2.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b3ede99012da406ac11ea460f04161b21ff88d9b0960f368b0cd6551a8f71a73
BLAKE2b-256 checksum
How to use checksums
1b58f7e409619706b392233c7ecc956f0c8c1f5117ccce4bb9a2ab181755bc85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / mds_irrulecontext-8.0.2-py3-none-any.whl

Download URL mds_irrulecontext-8.0.2-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9345aa8e22e21b6a52f50cb394dc099a0e148342baa61de2565ffcc27e9da634
BLAKE2b-256 checksum
How to use checksums
848d12a1811f330a4645fc8b8d039670a14e8f32cbb786ac7ed7d22b2da034bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for mds-irrulecontext 8.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page