how to define a type alpha numeric in openerp

Asked by Bushair

Hi,
Is the type alpha numeric is available in openerp?

i would like to create a field for the document reference number which is of type alpha numeric.

How to define the alpha numeric field?

thanks
Bushair

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) said :
#1

On 06/08/2010 09:47 AM, Bushair wrote:
> New question #113881 on OpenObject Server:
> https://answers.launchpad.net/openobject-server/+question/113881
>
> Hi,
> Is the type alpha numeric is available in openerp?
>
> i would like to create a field for the document reference number which is of type alpha numeric.
>
> How to define the alpha numeric field?
>
> thanks
> Bushair
>
Hi all,

You can use the fields.char object

Stephane

--
Stephane Wirtel - "As OpenERP is OpenSource, please feel free to contribute."
Quality/Release Manager
Technical Project Manager
OpenERP S.A.
Chaussee de Namur, 40
B-1367 Grand-Rosière
Tel: +32.81.81.37.00
Web: http://www.openerp.com
Planet: http://www.openerp.com/planet/
Blog: http://stephane-wirtel-at-tiny.blogspot.com

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) said :
#2

There is no default type, but there are two ways to do:

1. Difficult: you can either create a new field by inheriting fields.char and making your new type and i think the changes should follow in clients also. (Use only if you will repeatedly need it)

2. Easy: build a constraint and validate that the content is Alpha numeric using regular expressions

Can you help with this problem?

Provide an answer of your own, or ask Bushair for more information if necessary.

To post a message you must log in.