Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3855 มุมมอง

Hello everybody,

I use a XML-RPC to access to invoices, I want to get the states of invoices, but always I get paid instead of Payé (French)

I use administrator to connect to the databse, he has as lang = 'fr_FR'

def _get_invoice_states(self, cr, uid, ids, field_name, args, context=None):
    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 = {}
    for invoice in self.browse(cr, uid, ids, context=context):
        res = _('Name : ') + (invoice.number or '') 
        res += _('Etat : ') + (invoice.state or '')

Can you help me to get the wanted result, Thank you

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 23
5009
2
มี.ค. 22
2455
3
ธ.ค. 19
5143
How to get selection value translated แก้ไขแล้ว
1
ก.ค. 19
13998
0
มี.ค. 15
4401