Browse Source

Fix flake 8

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

41
sms_send_picking/__openerp__.py

@ -20,26 +20,23 @@
#
###############################################################################
{'name': 'Sms Send Picking',
'version': '0.0.1',
'author': 'Akretion',
'website': 'www.akretion.com',
'license': 'AGPL-3',
'category': 'Generic Modules',
'description': """
Automatic sms sending when a delivery is ready to transfert
""",
'depends': [
'stock',
'smsclient_core',
],
'data': [
'cron.xml'
],
'installable': True,
'application': False,
{
'name': 'Sms Send Picking',
'version': '0.0.1',
'author': 'Akretion',
'website': 'www.akretion.com',
'license': 'AGPL-3',
'category': 'Generic Modules',
'description': """
Automatic sms sending when a delivery is ready to transfert
""",
'depends': [
'stock',
'smsclient_core',
],
'data': [
'cron.xml'
],
'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