Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3204 มุมมอง

i´m trying to implement a custom automated action in odoo v9, and i followed this link here

http://odoo-development.readthedocs.io/en/latest/odoo/models/ir.cron.html

In automated action window, when i run the option button "run manually" i receive the following log message:

2018-01-04 12:09:09,138 4088 WARNING PROJECT_MANAGEMENT openerp.addons.base.ir.ir_cron: Method `scheduler.demo.process_demo_scheduler_queue` does not exist.

Can anyone give me some clue

 

อวตาร
ละทิ้ง
ผู้เขียน

Can anyone help ???

ผู้เขียน คำตอบที่ดีที่สุด

Solved.

I was declaring in the wrong way the method ' process_demo_scheduler_queue '; i forgot that in python, methods and variables begin after four(4) white spaces before declaring them.

Right way:

class scheduler_demo(models.Model):

     _name = "scheduler.demo"

     # fields ...

     #declare de method, but first give 4 white space

     # method declared with 4 white spaces

     def process_demo_scheduler_queue

          #put here your custom code

wrong way:

class scheduler_demo(models.Model):

     _name = "scheduler.demo"

     # fields ...

     #declare de method, but first give 4 white space

     # method declared with no 4 white spaces

def process_demo_scheduler_queue

    #put here your custom code

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 24
2600
1
ก.ย. 23
2424
5
ก.ค. 20
6414
0
มี.ค. 17
3629
1
ก.ย. 24
1885