stock_warehouse.py 395 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. from openerp.http import request
  3. _MODEL = 'stock.warehouse'
  4. def get_warehouses():
  5. return [
  6. {
  7. 'id': w.id,
  8. 'name': w.display_name,
  9. 'locationStock': {
  10. 'id': w.lot_stock_id.id,
  11. 'name': w.lot_stock_id.display_name
  12. }
  13. } for w in request.env.user.store_id.warehouse_ids
  14. ]