Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2119 Weergaven

We have a field that is defined like this on the product.template model: 

fields.Char(        string='MPN',        compute='_compute_mpn',        inverse='_inverse_mpn',        store=True,    )

And like this on the product.product model: 

fields.Char(string='MPN')

Now when I import this field, it doesn't show any errors but doesn't get imported either, the field stays blank. Is there anything special that needs to be done to make this import work? 

Avatar
Annuleer
Beste antwoord

Hi,

While importing the compute fields will not get Imported,

Instead, you can create a scheduled action to trigger the compute function manually like this to update the compute field in the imported records,


env['product.template'].search([])._compute_mpn()

Thanks

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jan. 24
3168
1
mei 23
1940
2
apr. 23
2889
8
jan. 25
6804
1
apr. 25
1496