I've defined the following two models:
class Weekday(models.Model):
_name = 'ludwik.offers.weekday'
name = fields.Char()class Duration(models.Model):
_name = 'ludwik.offers.duration'
weekday = fields.Many2many('ludwik.offers.weekday')
When I try to start odoo I get the following message:
ProgrammingError: relation "ludwik_offers_duration_ludwik_offers_weekday_rel_ludwik_offers_" already exists
Also, when I change the _name properties in models, the problem persists (of course the relation name in the error message changes to reflect the rename), so it's not like it's just a conflict with some old relations already existing in the database.
For people experiencing similar issues. I figured this out and explained the issue in detail here: http://stackoverflow.com/a/26101401/262618