Skip to Content
Menu
This question has been flagged

Hello Odoo users, 

I have already uploaded my customers, contacts and opportunities on the CRM with Excel files but I have a problem when I want to upload an activities list. My problem is about the due date which not works. 

When I upload my Excel file, the due date column send me this error : null value in column "res_model_id" violates not-null constraint DETAIL: Failing row contains (2714, 274365, null, null, null, null, null, null, null, 2019-06-15, f, 2, 2, null, null, 1, 2019-06-14 10:05:38.345051, 1, 2019-06-14 10:05:38.345051, null)

I tried to export a file with activities created manually but when I import it it didn't work either.

If you have any ideas on how to import activities with a due date relied to opportunities on CRM your help will be welcomed.

Have a great day !


Avatar
Discard
Best Answer

Each activity has a linked document - e.g. 'Opportunity 1'. It is a requirement.

This link is done through 2 fields 'res_id' (integer) & 'res_model_id' (many2one for ir.model). Thus, when you import you should have those columns.

In res_id you should indicate just a number (an id of related customer, opportunity, etc.). Look at your address line when you open a related document (&id=197)

In res_model_id you should either indicate an id of this model. It might be also foundin the address line in debug mode: settings > technical > database structure > models. Name of model might also work. 

Avatar
Discard
Related Posts Replies Views Activity
1
Dec 22
1604
0
Dec 21
3884
0
Mar 15
3100
3
May 24
1721
3
Dec 22
22188