Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Maintenance
Entity: maintenance.equipment
Compute Method: _compute_match_serial
| Inputs | Method | Outputs |
|---|---|---|
|
+ if 'stock.lot' not in self.env or not self.env['stock.lot'].has_access('read'): + self.match_serial = False + return + matched_serial_data = self.env['stock.lot']._read_group( + [('name', 'in', self.mapped('serial_no'))], + ['name'], + ['__count'], + ) + matched_serial_count = dict(matched_serial_data) + for equipment in self: + equipment.match_serial = matched_serial_count.get(equipment.serial_no, 0) |
|
