Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Malaysia - E-invoicing

Entity: account.move

Compute Method: _compute_l10n_my_edi_is_applicable

Inputs Method Outputs
  • state
  • country_code
""" Whether MyInvois is relevant for this invoice at all, regardless of the state of its document(s).
        Callers that care about the document's state check 'l10n_my_edi_state' on top of this. """
for move in self:
            move.l10n_my_edi_is_applicable = bool(
                move.is_invoice()
                and move.state == 'posted'
                and move.country_code == 'MY'
                and move._l10n_my_edi_get_proxy_user(),
            )

Back to entity