Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2332 Lượt xem

In this chapter 4:

https://www.odoo.com/documentation/15.0/developer/howtos/rdtraining/04_basicmodel.html#object-relational-mapping

When I attempt to create a new table in the database after I run the server and connected to a database to check if the table exists or not I get this error Did not find any relation named "estate_property".

Ảnh đại diện
Huỷ bỏ

Hi,
The link seems broken, could you provide with the new link please?

Tác giả

The link works fine with me, you can visit Odoo developer documentation -> Getting Started -> Chapter 4: Models And Basic Fields

Tác giả Câu trả lời hay nhất

I solve problem

When I create a new model class

from odoo import fields, models

class TestModel(models.Model):

_name = "test.model"

_description = "Test Model"

now I created a new table name is test_model but when I open the terminal and write the following


$ psql -d rd-demo rd-demo=# SELECT COUNT(*) FROM estate_property;

error message: Did not find any relation named "estate_property". because my tabel name is test_model not estate_property
rd-demo=# SELECT COUNT(*) FROM test_model;
this's work with me because database name is correct.
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 25
1926
2
thg 11 24
7591
2
thg 10 24
4232
2
thg 8 24
2383
3
thg 7 24
8838