We're adding additional phone fields to Leads (crm.leads) and Partners (res.partner). When the module is installed, fields are added and that seems to work properly. The problem shows up when we try to uninstall the module.

Thank you, John, for your answer. We still have the same problem. Changing to the v8 format doesn't make a difference. Unless we are missing something somewhere. Module installs and works fine, but we're unable to cleanly uninstall when we inherit from 'cmr.lead'.
And yes, we found out that it is easier/faster to clone the DB, and drop it, than to try and fix the tables when a module breaks Odoo.

Try changing this: class crm_lead(models.Model):
to this: class crm_lead_extra_phones(models.Model):
and this: class res_partner(models.Model):
to this: class res_partner_extra_phones(models.Model):
Naming it the same as crm.lead and res.partner overwrites these in the DB, the only way to uninstall would be to uninstall crm.lead and res.partner... This is my opinion but it is very similar to the problem that I had, that's why I showed "my_crm_lead" calls name below.

Thanks John. I'm pretty sure that we tried that before. But, just to be completely sure, we did so again. Not good. Same error message when uninstalling. Based on the little I have read about Odoo design, there is no need to change the class name for inheritance. If we remove the 'crm.lead' portion from our module (and keep 'res.partner' only), the module will install and uninstall properly. The problem seems to be inheriting from 'crm.lead'.

Fixed! And we hope this helps someone who might be having the same issue (and anyone writing their custom modules).

It seems that 'depends', in __openerp__.py, is not only important to install a module (and its dependency), but also to uninstall it. Even if, like us, you don't get errors when installing your module.

We were able to fix this issue simply by changing 'depends' in __openerp__.py from:

'depends': ['base'],

to:

'depends': ['base','crm'],

How? We copied some Python code, from one of the standard odoo modules, that was installing and uninstalling properly. But that code was not working in our module. So, that pointed to a problem "outside" the Python file, and that's when we realized that we didn't have 'crm' on the 'depends'.