Skip to Content
मेन्यू
This question has been flagged
1 Reply
2174 Views

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
2
जन॰ 24
3245
1
मई 23
1989
2
अप्रैल 23
2945
8
जन॰ 25
6848
1
अप्रैल 25
1533