Skip to Content
Menu
This question has been flagged
1 Reply
3438 Views

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

Avatar
Discard
Best Answer

type(date(field_date))

Avatar
Discard
Related Posts Replies Views Activity
1
May 20
3397
0
Mar 15
2837
0
Mar 15
2427
0
Dec 24
31
1
Oct 24
266