Description
Company Currency Mixin is a lightweight mixin module in the
@simetri-sinergi-id/ssi-mixin technology suite for Odoo 15.
It provides a reusable abstract model — mixin.company_currency —
that adds a company field and its derived currency field to any model.
Any model that inherits from mixin.company_currency automatically gains:
res.company field that defaults
to the current user's company.
res.currency field
that always reflects the selected company's currency.
Monetary fields on inheriting models can set
currency_field='company_currency_id' to format amounts in the
company's currency without any extra boilerplate.
Key Features
mixin.company_currency in any model — no structural view changes required.company_id defaults to the current user's company automatically.company_currency_id is always in sync with the selected company's currency via a stored related field.currency_field='company_currency_id' on any monetary field to enable proper currency display.base — no heavy extra dependencies.
Use Cases / Context
Use this mixin for any transactional or master-data model that needs multi-company currency awareness:
Simply set _inherit = ["mixin.company_currency"] on your model and reference company_currency_id in your monetary fields.
Installation & Usage
addons-path)._inherit = ["mixin.company_currency"]
currency_field="company_currency_id"
FAQ
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
This module is developed and maintained by PT. Simetri Sinergi Indonesia.