Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
8561 มุมมอง

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

คำตอบที่ดีที่สุด

Hi, I don't know if still you need the answer for this issue but it means that you have a db conflict so try to reset the db, you could use dbeaver and use the vaccum tool and it could work again, it works to me, I hope it can help

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for the answer, but I asked the question 7 years ago :) Here is the answer: https://stackoverflow.com/a/26101401/262618. This specific problem was connected to the length of model names, so any amount of resting things would not help.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 22
3711
2
มี.ค. 15
4640
0
มี.ค. 15
3950
1
มี.ค. 15
5268
1
ธ.ค. 21
2384