Skip to content

Filter out terminated BA contracts in CU wizard

CHANGELOG:

### Fixed
- [#425](https://gitlab.com/coopdevs/odoo-somconnexio/-/merge_requests/425) Filter out terminated BA contracts in CU wizard

Method "_compute_partner_ba_contracts" should not include terminated contracts, since they don't have "current_tariff_contract_line" (see https://gitlab.com/coopdevs/odoo-somconnexio/-/blob/master/somconnexio/models/contract.py#L263) and therefore they don't have "current_tariff_product". This lead to a False in wizard's self.partner_ba_products which then lead to the following error:

```
  File "/opt/odoo/odoo/fields.py", line 2381, in convert_to_onchange
    result.append((0, record.id.ref or 0, vals[record]))
AttributeError: 'bool' object has no attribute 'ref'
```

Merge request reports