Odoo Help

-1

MissingError

By
Lakay lakay
on 9/24/14, 9:17 PM 1,560 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
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

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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