坯料采购提醒

This commit is contained in:
guanhuan
2024-09-23 13:20:31 +08:00
parent e7e64720c6
commit 5af1953e04
3 changed files with 16 additions and 0 deletions

View File

@@ -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