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

Getting this warning on Odoo 14:

Field product.template.name: unknown parameter 'track_visibility', if this is an actual parameter you may want to override the method _valid_field_parameter on the relevant model in order to allow it


The code in question is real simple:

from odoo import api, fields, models
class ProductTemplate(models.Model):
    _inherit = 'product.template'
    name = fields.Char(track_visibility='onchange')

The plugin still works as intended.  But any idea how I could get rid of the warning in Odoo 14?
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In V14 the value change tracking system has been changed.

Now track_visibility='true' could be simply changed to tracking=True


https://www.odoo.com/documentation/14.0/reference/mixins.html#logging-changes

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

...and don't forget to include " _inherit = ['mail.thread', 'mail.activity.mixin'] " at above

for track_visibility='onchange' and track_visibility='always', we need to set only tracking=True right?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 22
9691
1
thg 5 20
6824
1
thg 5 21
4159
1
thg 3 21
5697
1
thg 8 25
3717