Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
1213 Näkymät

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


Avatar
Hylkää
Tekijä Paras vastaus

I FIX MYSELF, THANKS

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 25
526
1
lokak. 25
664
2
kesäk. 25
2191
0
maalisk. 25
2068
0
helmik. 25
1565