坯料采购提醒
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
import logging
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class SFMessagePurchase(models.Model):
|
||||
_name = 'purchase.order'
|
||||
_inherit = ['purchase.order', 'jikimo.message.dispatch']
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
res = super(SFMessagePurchase, self).create(vals_list)
|
||||
if res:
|
||||
try:
|
||||
res.add_queue('坯料采购提醒')
|
||||
except Exception as e:
|
||||
logging.info('add_queue error:%s' % e)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user