Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

ProgrammingError: can't adapt type 'dict'

By
jean44
on 9/17/13, 9:04 AM 1,388 views

How I can resolve this problem ?

Can you please more specify ? At where or code you have done ?

Pinakin Nayi (pna)
on 9/17/13, 11:05 AM
0

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
896
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.

https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile

tibrahim@2p.com.sa

Tarek Mohamed Ibrahim
On 4/27/15, 3:22 AM

I got the same error when using the method trg_validate with the customized button 'signal_draft_depheadapr' :

wf_service.trg_validate(uid, 'purchase.order', id, 'signal_draft_depheadapr', cr)

After trace I discovered that the 'id' parameter is an object one and not an integer id, I replace the above line with the following line and it worked:

wf_service.trg_validate(uid, 'purchase.order', po_obj.id, 'signal_draft_depheadapr', cr) 

The exact line that caused this problem was the cr.execute method

So check your code, the reason of this was a wrong parameter type you passed.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/17/13, 9:04 AM
Seen: 1388 times
Last updated: 4/27/15, 3:22 AM