Odoo Help

0
2 Answers
4
Avatar

Hilar AK

--Hilar AK--
--Hilar AK--
  Blog:-
        https://hilarlive.wordpress.com/
  StackOverflow:
        http://stackoverflow.com/users/7561347/burmese-pythis

Quora:
    

            https://www.quora.com/profile/Hilar-Ak-1

Experienced Odoo developer, Functional Consultant.



Hilar AK
2/1/17, 11:22 PM

Hi,

1. Here you can access CR by self._cr or self.env.cr. for Query execution try self._cr.execute("yourQuery")

2. You can get the logged in user by the following code
     user_id = self.env.user.id

     user_name = self.env.user.name

     related_partner = self.env.user.partner_id.id

I hope I have given the hints. Now you can compare using these values.

0
Damien Taylor
2/2/17, 6:45 AM

That worked!  Thankyou so much!

1 Comment
Hilar AK
2/5/17, 10:25 PM

You are Welcome

Ask a Question
Writer
Keep Informed
1 follower(s)
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