14 lines
461 B
Python
14 lines
461 B
Python
from odoo import models, fields, api, _
|
|
|
|
|
|
class SFMessageStockPicking(models.Model):
|
|
_name = 'stock.picking'
|
|
_description = "库存调拨"
|
|
_inherit = ['stock.picking', 'jikimo.message.dispatch']
|
|
|
|
def button_validate(self):
|
|
res = super(SFMessageStockPicking, self).button_validate()
|
|
if self.location_id.name == '进货' and self.location_dest_id.name == '刀具房':
|
|
self.add_queue('调拨入库')
|
|
return res
|