Browse Source

Fix flake 8

pull/130/head
Valentin Chemiere 9 years ago
committed by MonsieurB
parent
commit
992b41062a
  1. 7
      sms_send_picking/__openerp__.py
  2. 10
      sms_send_picking/stock.py

7
sms_send_picking/__openerp__.py

@ -20,7 +20,8 @@
#
###############################################################################
{'name': 'Sms Send Picking',
{
'name': 'Sms Send Picking',
'version': '0.0.1',
'author': 'Akretion',
'website': 'www.akretion.com',
@ -39,7 +40,3 @@
'installable': True,
'application': False,
}

10
sms_send_picking/stock.py

@ -31,12 +31,12 @@ class StockPicking(models.Model):
@api.model
def _send_sms(self):
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]
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:
data = {
'gateway': gateway.id,

Loading…
Cancel
Save