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

ValueError: Many2one shrinkage.record.line.shrinkage_record_id from Model to TransientModel is forbidden,


What does it mean?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

It means Model 'shrinkage.record.line' is  Transient Model. (e.g. class MyTransientModel(models.TransientModel)

you couldn't use a transient model as Many2one field in persistence model (e.g. class MyModel(models.Model))

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Transient Model are not handled as Models.model in the database. Although, it also saved as a database record, it will be deleted automatically after its data transferring work.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 11 24
30284
1
thg 12 21
2925
0
thg 12 21
2433
0
thg 4 15
4782
2
thg 3 15
10576