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

MissingError

By
Lakay lakay
on 9/24/14, 9:17 PM 1,227 views

Hi. im just trying to get the 'partner_id' from the 'res.users' of the account im currently , here's my code below:

current_obj=self.pool.get('res.users').browse(cr,uid,ids,context)
                num=current_obj.partner_id

 

self.write(cr,uid,ids,{'storage':num},context=context)

=================================================AND THEN THIS ERROR CAME OUT and no result came in.

MissingError

One of the documents you are trying to access has been deleted, please try again after refreshing.

 

 

 

 

 

0

Maniganda

--Maniganda--
1038
| 5 7 7
Bangalore, India
--Maniganda--
Maniganda
On 9/25/14, 3:37 AM

Hi Lakay , the problem is with your code, you are passing the account_object ids to res.users object so you are getting error

current_obj=self.pool.get('res.users').browse(cr,uid,ids,context)
                num=current_obj.partner_id

use instead

current_obj=self.pool.get('res.users').browse(cr,uid,uid,context)
                num=current_obj.partner_id and current_obj.partner_id.id or False

yes i already figured this out. thanks for your reply

Lakay lakay
on 9/25/14, 4:15 AM

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

1 follower(s)

Stats

Asked: 9/24/14, 9:17 PM
Seen: 1227 times
Last updated: 3/16/15, 8:10 AM