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

Module: Invoicing

Entity: account.reconcile.model

Compute Method: _compute_number_entries

Inputs Method Outputs
  • id
data = self.env['account.move.line']._read_group([('reconcile_model_id', 'in', self.ids)], ['reconcile_model_id'], ['__count'])
mapped_data = {reconcile_model.id: count for reconcile_model, count in data}
for model in self:
            model.number_entries = mapped_data.get(model.id, 0)

Back to entity