Odoo Help

0

0
2 Answers
1
Avatar

subbarao

--subbarao--

1299
| 5 2 8
Chennai, Índia
--subbarao--


subbarao
18/12/18 22:45

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
19/12/18 08:14

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
19/12/18 08:33

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
19/12/18 08:33

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
18/12/18 21:29

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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now