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

My problem is when i press button the openerp user interface is blocked, because it is doing some xmlrpc work, as long as work is in not done the openerp ui is blocked. So, my question is - Is there any way to do this work in background even i pressed the button ? I don`t want to use any scheduler or any server actions.

Also, I want to take care of repetitive xmlrpc events on pressing button 2-3 times.

Please suggest some thing , how to solve this problem ???

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I found this at base/res/res_partner.py:

def email_send(self, cr, uid, ids, email_from, subject, body, on_error=''):
        while len(ids):
            self.pool.get('ir.cron').create(cr, uid, {
                'name': 'Send Partner Emails',
                'user_id': uid,
                'model': 'res.partner',
                'function': '_email_send',
                'args': repr([ids[:16], email_from, subject, body, on_error])
            })
            ids = ids[16:]
        return True

The task is added to the cron and executed as soon as possible(i think with a delay of max. a minute) in background.

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

Thanks , I already using cron jobs for doing background work in OpenERP, I think this is the only way to do it. anyways, thanks a lot.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 15
5772
0
มี.ค. 15
4182
3
ก.ค. 25
2833
1
ต.ค. 24
2060
1
เม.ย. 24
2092