Odoo Help

0
2 Answers
1
Avatar

subbarao

--subbarao--

1108
| 5 1 5
Chennai, India
--subbarao--


subbarao
12/18/18, 10:45 PM

Hello Arthur,

Cron job function self will give always empty browse object only

So you have search the company or you can get it from self.env.user.company_id

3 Comments
arthur
12/19/18, 8:14 AM

I see. And how would I access my self.env['sale.order'] from inside a cron, for example? How do I search for it?

arthur
12/19/18, 8:33 AM

Nevermind, I got it. Basically I was trying to get access to a my model variables through "self.variableName", but since self was empty I got errors.

Thanks, subbarao!

arthur
12/19/18, 8:33 AM

Nevermind, I got it. Basically I was trying to get access to a my model variables through "self.variableName", but since self was empty I got errors.

Thanks, subbarao!

0
DHA Medic
12/18/18, 9:29 PM

Settings -> Activate the developer mode

Settings - Technical -> Automation -> Scheduled Actions

Select your cronjob -> Run Manually

You can use pycharm community to debug

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