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

Module: Denmark - Accounting

Entity: res.company

Compute Method: _compute_nemhandel_purchase_journal_id

Inputs Method Outputs
for company in self:
            if not company.nemhandel_purchase_journal_id and company.l10n_dk_nemhandel_proxy_state not in {'not_registered', 'rejected'}:
                company.nemhandel_purchase_journal_id = self.env['account.journal'].search([
                    *self.env['account.journal']._check_company_domain(company),
                    ('type', '=', 'purchase'),
                ], limit=1)
                company.nemhandel_purchase_journal_id.is_nemhandel_journal = True
            else:
                company.nemhandel_purchase_journal_id = company.nemhandel_purchase_journal_id

Back to entity