Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2995 Lượt xem

Hi everybody,

I developped an android application that use XML-RPC to communicate with the server.

All request returns non-formatted text,

I tried to force the context but no changes

if not context : 
    context = {}
user = self.pool.get('res.users').read(cr, uid, uid, ['lang','tz'])
context.update({'lang' : str(user.get('lang',u'fr_FR'))})
context.update({'tz' : str(user.get('tz',u'GMT'))})
context.update({'uid' : uid})
result = {}

then I use :

for invoice in self.browse(cr, uid, ids, context=context):
    res = _('Name : ') + (invoice.number or '') + EOL
    res += _('Etat : ') + ( invoice.state or '') + EOL
    res += _('Date de la facture : ') + (invoice.date_invoice or '') + EOL

It returns :

Name : INV0002
Etat : paid
Date de la facture : 2014-04-22

A help please

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 21
4020
1
thg 5 20
3996
0
thg 3 15
3626
3
thg 7 25
3017
0
thg 12 24
1450