Browse Source

[FIX] Flake8 on hw_customer_display, hw_telium_payment_terminal and pos_remove_pos_category

pull/147/head
Carlos Vásquez 8 years ago
parent
commit
3065d2d821
  1. 1
      hw_customer_display/controllers/main.py
  2. 1
      hw_telium_payment_terminal/controllers/main.py
  3. 9
      pos_remove_pos_category/module.py

1
hw_customer_display/controllers/main.py

@ -167,6 +167,7 @@ class CustomerDisplayDriver(Thread):
except Exception as e:
self.set_status('error', str(e))
driver = CustomerDisplayDriver()
hw_proxy.drivers['customer_display'] = driver

1
hw_telium_payment_terminal/controllers/main.py

@ -271,6 +271,7 @@ class TeliumPaymentTerminalDriver(Thread):
except Exception as e:
self.set_status('error', str(e))
driver = TeliumPaymentTerminalDriver()
hw_proxy.drivers['telium_payment_terminal'] = driver

9
pos_remove_pos_category/module.py

@ -33,14 +33,15 @@ class Module(models.Model):
# As we have loose previous POS categs restore them
# in a sane empty state
self.env.cr.execute('UPDATE product_template SET pos_categ_id=NULL')
self.env.cr.execute('''
UPDATE product_template SET pos_categ_id=NULL;
''')
# And restore original constraint
self.env.cr.execute('''
ALTER TABLE product_template
DROP CONSTRAINT IF EXISTS
product_template_pos_categ_id_fkey
product_template_pos_categ_id_fkey;
''')
self.env.cr.execute('''
@ -58,7 +59,7 @@ class Module(models.Model):
WHERE
iaw.id = imd.res_id AND
imd.model = 'ir.actions.act_window' AND
imd.name = 'product_pos_category_action'
imd.name = 'product_pos_category_action';
''')
break

Loading…
Cancel
Save