Odoo Aide

0

0
4 Answers
0
Megha_SerpentCS
27/08/2018 02:07

avasen,

Use self.pool.get instead of self.env

Thank You

0
Sunny Dev
28/02/2018 01:06

Hello,

try below code,

active_ids =  self._context.get('active_ids',False)

maybe it will help you.

Thanks

0
avasen
29/06/2017 09:03

hello ,thanks for your answer but when i do that i have just the last record so instead i have done


def _get_all_records(self):
       
        active_ids =  self.context.get('active_ids',False)
        recsss = self.pool.get('hr.job').search(self.cr,self.uid, [('id','in',active_ids)], context=self._context)
        resss = self.pool.get('hr.job').browse(self.cr, self.uid, recsss)
        return resss


but they say that my module has not attribute context

can you help please

0
Avatar
--NIKHIL KRISHNAN--

-- Nikhilkrishnan --

Exploring new ways in odoo..!
And want to become a key to the new odoo trends.

-> Odoo Consultancy,
-> Functional and Technical Consultant,
-> Requirement Collection and Analysis,
-> Module Customization,
-> Odoo ERP Community Contributor,
-> Handling ERP/Odoo projects,
-> ERP Workshop Facilitator.
Feel happy working with best and good supporting team.

#PITS Family

Nikhil Krishnan

nikhilkrishnan0101@gmail.com

NIKHIL KRISHNAN
27/06/2017 02:38

Hai Brami,

  @api.model
    def _get_all_records(self):

       recsss = self.pool.get('hr.job').search(self.cr,self.uid, [('id','in',self.ids)])
        resss = self.pool.get('hr.job').browse(self.cr, self.uid, recsss)
        return resss

In this report parser you just use the pool.get method, then its work fine, 

Poser une question
Writer
Étiquettes
Keep Informed
1 Abonné(e)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