1234567891011121314151617181920212223 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_current_user():
- user = r.env.user
- return {
- 'id': user.id,
- 'name': user.name,
- 'displayName': user.display_name,
- 'currency': {
- 'id': user.company_id.currency_id.id,
- 'name': user.company_id.currency_id.name,
- 'displayName': user.company_id.currency_id.display_name,
- 'symbol': user.company_id.currency_id.symbol
- },
- 'company': {
- 'id': user.company_id.id,
- 'name': user.company_id.name,
- 'displayName': user.company_id.display_name
- }
- }
|