Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3741 Представления

I have built a new module using a class of the type http.Controller

 

class website_order(http.Controller):

    @http.route(['/order/list',], type='http', auth="public", website=True)
    def order_list(self, **post):
        cr, uid, context, pool = request.cr, request.uid, request.context, request.registry

        res_user = request.registry.get('sale.order').browse(cr,uid,uid)

        values = {
            'order_menu': 'active',
            'res_user': res_user,
            'sale_orders': request.registry.get('sale.order').browse(cr,uid,request.registry.get('sale.order').search(cr,uid,[('company_id','=',res_user.company_id.id)])),
        }
        return request.website.render("smart_order.list", values)

I have created a i18n-catalogue, a pot and po-file for my translation. The labels and texts that I want to translate are exported to the pot-file and my translation in the po-file are in the database as it supposed to be.

My user have the language int the request.context, but request.website.render does not perform any translation for me. What am I missing?

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
июн. 16
5379
0
февр. 19
5568
0
авг. 15
4299
1
мар. 15
4099
1
мар. 15
6130