|
@ -31,12 +31,12 @@ class StockPicking(models.Model): |
|
|
@api.model |
|
|
@api.model |
|
|
def _send_sms(self): |
|
|
def _send_sms(self): |
|
|
sms_sender_obj = self.env['partner.sms.send'] |
|
|
sms_sender_obj = self.env['partner.sms.send'] |
|
|
gateways = self.env['sms.smsclient'].search([('default_gateway', '=', True)]) |
|
|
|
|
|
|
|
|
gateways = self.env['sms.smsclient'].search([('default_gateway', '=', |
|
|
|
|
|
True)]) |
|
|
gateway = gateways[0] |
|
|
gateway = gateways[0] |
|
|
pickings = self.env['stock.picking'].search([('state', '=', 'assigned'), |
|
|
|
|
|
('sms_sent', '=', False), |
|
|
|
|
|
('picking_type_id.code', '=', 'outgoing') |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
pickings = self.env['stock.picking'].search( |
|
|
|
|
|
[('state', '=', 'assigned'), ('sms_sent', '=', False), |
|
|
|
|
|
('picking_type_id.code', '=', 'outgoing')]) |
|
|
for pick in pickings: |
|
|
for pick in pickings: |
|
|
data = { |
|
|
data = { |
|
|
'gateway': gateway.id, |
|
|
'gateway': gateway.id, |
|
|