Skip to content

Commit

Permalink
[IMP]To solve testing flake 8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnaPrajapati-SerpentCS committed Apr 7, 2017
1 parent 223dd24 commit 6e1bc51
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
3 changes: 1 addition & 2 deletions hotel_pos_restaurant/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
'data': ['views/pos_restaurent_view.xml',
'views/hotel_pos_report.xml',
'views/report_pos_management.xml',
'wizard/hotel_pos_wizard.xml',
],
'wizard/hotel_pos_wizard.xml'],
'qweb': ['static/src/xml/*.xml'],
'auto_install': False,
'installable': True
Expand Down
7 changes: 2 additions & 5 deletions pos_order_for_restaurant/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
'data': ['security/pos_order_for_restaurant_security.xml',
'security/ir.model.access.csv',
'view/templates.xml',
'view/pos_order_for_restaurant_view.xml',
],
'demo': [
'view/pos_order_restaurant_demo.xml',
],
'view/pos_order_for_restaurant_view.xml'],
'demo': ['view/pos_order_restaurant_demo.xml'],
'depends': ['point_of_sale', 'pos_restaurant', 'pos_receipt'],
'qweb': ['static/src/xml/pos_order_for_restaurant.xml'],
'auto_install': False,
Expand Down
15 changes: 5 additions & 10 deletions pos_order_for_restaurant/models/pos_order_for_restaurant.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ def action_pos_order_paid(self):
t_rs = res_table.reserver_seat
if(t_ac - t_rs) == 0:
vals = {'state': 'available',
'available_capacities': t_rs - t_ac
}
'available_capacities': t_rs - t_ac}
tab_obj.browse(res_table.table_id.id).write(vals)
else:
if(t_ac - t_rs) > 0:
Expand All @@ -80,8 +79,7 @@ def action_pos_order_paid(self):
if(t_ac - t_rs) > 0:
rst_id = res_table.table_id.id
val = {'state': 'available',
'available_capacities': t_rs - t_ac
}
'available_capacities': t_rs - t_ac}
tab_obj.browse(rst_id).write(val)

return res
Expand Down Expand Up @@ -149,14 +147,12 @@ def close_order(self, order_id):
res_id = res_tab_obj.browse(res_table.table_id.id)
if(rtac - rtrs) == 0:
vals = {'state': 'available',
'available_capacities': rtac - rtrs
}
'available_capacities': rtac - rtrs}
res_id.write(vals)
else:
if(rtac - rtrs) > 0:
vals = {'state': 'available',
'available_capacities': rtac - rtrs
}
'available_capacities': rtac - rtrs}
res_id.write(vals)
order_id = order_id[0]
line_ids = [line.id for line in self.browse(order_id).lines]
Expand All @@ -176,8 +172,7 @@ def reassign_table(self, booked_table):
tab_id = tab_obj.browse(table_id)
tac_id = tab_id.available_capacities
vals = {'available_capacities': tac_id - int(qty),
'state': 'available'
}
'state': 'available'}
tab_id.write(vals)
return True

Expand Down
2 changes: 1 addition & 1 deletion pos_receipt/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'security/ir.model.access.csv',
'view/templates.xml',
'view/pos_receipt_view.xml',
'view/kitchen_screen_data.xml'
'view/kitchen_screen_data.xml',
],
'depends': ['point_of_sale', 'pos_options_bar'],
'qweb': ['static/src/xml/pos_receipt.xml'],
Expand Down
8 changes: 3 additions & 5 deletions pos_receipt/models/pos_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def _process_order(self, order, kitchen=False):
'product_id': order1.product_id.id,
'product_uom_qty': order1.qty,
'price_unit': order1.price_unit,
'price_subtotal': order1.price_subtotal
'price_subtotal': order1.price_subtotal,
}
sol_rec = so_line_obj.sudo().create(values)
hsl_obj.sudo().create({'folio_id': order_id.folio_id.id,
Expand Down Expand Up @@ -285,8 +285,7 @@ def _process_order(self, order, kitchen=False):
}
sol_rec = so_line_obj.sudo().create(values)
val = {'folio_id': order_id.folio_id.id,
'service_line_id': sol_rec.id,
}
'service_line_id': sol_rec.id}
hsl_obj.sudo().create(val)
order_id.folio_id.sudo().write({'folio_pos_order_ids':
[(4, order_id.id)]})
Expand Down Expand Up @@ -353,8 +352,7 @@ def _process_order(self, order, kitchen=False):
'payment_date':
time.strftime('%Y-%m-%d %H:%M:%S'),
'payment_name': _('return'),
'journal': cash_journal,
})
'journal': cash_journal})
return order_id

@api.multi
Expand Down

0 comments on commit 6e1bc51

Please sign in to comment.