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

Hi,

I create new module, In this module have two custom fields,

first field many2one

second field char

I create one function for inherit module,In that function used for onchange field of second field.

after i create function nothing is coming,please find the below code.


class InheritProductProduct(models.Model):

_inherit = 'product.template'

num_code = fields.Char('Num Code')

@api.onchange('categ_id')
def num_code(self):
        _logger.info(self)
for record in self:
_logger.info("RECORD :",record)


If i change category, field num_code automatically change.num_code is already in category table.


Nothing comes in log file


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

I FIX MYSELF, THANKS

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 25
526
1
thg 10 25
664
2
thg 6 25
2191
0
thg 3 25
2068
0
thg 2 25
1565