Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to add "à" and "é" in selection field ?

By
Anne-Sylvie Burri
on 5/30/13, 7:19 AM 563 views

Hi everybody,

I created a new selection field and I want to use "à" and "é" for basis text (Prive => Privé, Cours a la carte => Cours à la carte, Feries => Fériés).

Here is my code :

# -*- coding: utf-8 -*- from openerp.osv import fields, osv class crm_meeting(osv.osv):
_inherit = 'crm.meeting'
_name = 'crm.meeting'
_columns = {
'categ': fields.selection((('Admin','Admin'), ('Anniversaires','Anniversaires'), ('Cours a la carte','Cours à la carte'), ('Cours NE','Cours NE'), ('Divers','Divers'), ('Examens NE','Examens NE'), ('Fondation','Fondation'), ('Info','Info'), ('Jours feries','Jours fériés'), ('Maladie','Maladie'), ('Prive','Privé'), ('Rendez-vous','Rendez-vous'), ('Staff / tous','Staff / tous'), ('Technique','Technique'), ('Vacances','Vacances'), ('Voyages','Voyages')),'Categories', required=True),

} crm_meeting()

Someone could help me ?

Many thanks in advance.

JMB

2

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/30/13, 7:32 AM

Hi,

use unicode add a u before your selection value:

(u'Privé','Privé')
(u'Cours a la carte','Cours à la carte')

It works perfectly ! Thank you very much :-)

J.-M. Burri - Bureau ing.-conseils informatique, Anne-Sylvie Burri
on 5/30/13, 7:36 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/30/13, 7:19 AM
Seen: 563 times
Last updated: 3/16/15, 8:10 AM