Accept Merge Request #1356: (feature/销售和排程添加消息推送 -> develop)
Merge Request: 消息推送 Created By: @廖丹龙 Reviewed By: @胡尧 Approved By: @胡尧 Accepted By: @廖丹龙 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1356?initial=true
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
""",
|
""",
|
||||||
'category': 'sf',
|
'category': 'sf',
|
||||||
'website': 'https://www.sf.jikimo.com',
|
'website': 'https://www.sf.jikimo.com',
|
||||||
'depends': ['sale', 'purchase', 'sf_plan', 'jikimo_message_notify','stock'],
|
'depends': ['sale', 'purchase', 'sf_plan', 'jikimo_message_notify','stock','sf_tool_management'],
|
||||||
'data': [
|
'data': [
|
||||||
'data/bussiness_node.xml'
|
'data/bussiness_node.xml',
|
||||||
],
|
],
|
||||||
'test': [
|
'test': [
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,7 +8,11 @@ class SFMessagefunctionalToolDismantle(models.Model):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
|
# 判断是否为web页面创建请求
|
||||||
|
is_web_request = self.env.context.get('params', False)
|
||||||
result = super(SFMessagefunctionalToolDismantle, self).create(vals)
|
result = super(SFMessagefunctionalToolDismantle, self).create(vals)
|
||||||
|
if is_web_request and is_web_request.get('menu_id', False):
|
||||||
|
return result
|
||||||
for obj in result:
|
for obj in result:
|
||||||
if obj.dismantle_cause in ['寿命到期报废', '崩刀报废']and obj.state=='待拆解':
|
if obj.dismantle_cause in ['寿命到期报废', '崩刀报废']and obj.state=='待拆解':
|
||||||
obj.add_queue('功能刀具寿命到期')
|
obj.add_queue('功能刀具寿命到期')
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ class SFMessageStockPicking(models.Model):
|
|||||||
_description = "库存调拨"
|
_description = "库存调拨"
|
||||||
_inherit = ['stock.picking', 'jikimo.message.dispatch']
|
_inherit = ['stock.picking', 'jikimo.message.dispatch']
|
||||||
|
|
||||||
def button_validate(self):
|
@api.model_create_multi
|
||||||
res = super(SFMessageStockPicking, self).button_validate()
|
def create(self, vals):
|
||||||
if self.location_id.name == 'Vendors' and self.location_dest_id.name == '进货':
|
result = super(SFMessageStockPicking, self).create(vals)
|
||||||
self.add_queue('调拨入库')
|
for obj in result:
|
||||||
return res
|
if obj.location_id.name == '进货' and obj.location_dest_id.name == '刀具房':
|
||||||
|
obj.add_queue('调拨入库')
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
@api.depends('move_type', 'immediate_transfer', 'move_ids.state', 'move_ids.picking_id')
|
@api.depends('move_type', 'immediate_transfer', 'move_ids.state', 'move_ids.picking_id')
|
||||||
def _compute_state(self):
|
def _compute_state(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user