It's the `_inherit = "res.partner"`. Odoo is inheriting the model with a new model name which means it's creating a new table and copying all fields. For `channel_ids` it's trying to create the many2many "join" table, but with the same name as in `res.partner`. That happens because the table name is directly defined in [the field](https://github.com/odoo/odoo/blob/6c72297e72e0936e5564f175dcb1716057e0ac4b/addons/mail/models/res_partner.py#L24) (`mail_channel_partner`).
```python
channel_ids = fields.Many2many('mail.channel', 'mail_channel_partner',
'partner_id', 'channel_id', string='Channels', copy=False)
```
So to solve the problem you have to "redefine" `channel_ids` on your new model again and change the table name, for example like:
```python
channel_ids = fields.Many2many(relation='mail_channel_library_book_partner')
```
It's the `_inherit = "res.partner"`. Odoo is inheriting the model with a new model name which means it's creating a new table and copying all fields. For `channel_ids` it's trying to create the many2many "join" table, but with the same name as in `res.partner`. That happens because the table name is directly defined in [the field](https://github.com/odoo/odoo/blob/6c72297e72e0936e5564f175dcb1716057e0ac4b/addons/mail/models/res_partner.py#L24) (`mail_channel_partner`).
```python
channel_ids = fields.Many2many('mail.channel', 'mail_channel_partner',
'partner_id', 'channel_id', string='Channels', copy=False)
```
So to solve the problem you have to "redefine" `channel_ids` on your new model again and change the table name, for example like:
```python
channel_ids = fields.Many2many(relation='mail_channel_library_book_partner')
```