Help

5

How to add extra fields to a model?

Avatar
robertotorres34

I just installed the human resources app: I found it handy, but I need some extra fields... Someone can point me to the right direction?

Avatar
Discard
5 Answers
7
Avatar
Mario Arias Badila
Best Answer

You can do it the "easy" way through OpenERP menus...

  • First create the fields using Configuration -> Customization -> Database Structure -> Fields
  • And then make them appear on screen using
    Configuration -> Customization -> User Interface -> Views

Or do it the "right" way, creating a custom module to add the fields to the desired model and views.

You can find many samples on the web, like this one... (can't publish links as I don't have enough karma... just google for openerp create module and you will find many samples)

4 Comments
Avatar
Discard
Avatar
Camptocamp SA
-

Customisation made via interface can make long term maintenance of your instance more complicated. You should create your own addon. You will find dev doc here: http://doc.openerp.com/trunk/developers/server/03_module_dev/

Avatar
robertotorres34
-

HI! I cant see the customization option,, I´m logged as Administrator, I only see under config: Modules, Config, companys, do I need to log as another user?, My installation is under Windows server AND using openERP 7

Avatar
robertotorres34
-

I found it, it took me time to found the option, and an hour to refresh the windows,

Avatar
Olivier Caeymaex
-

would be nice to psot where you found it. i am still searching here... :-(

6
Avatar
eLBati
Best Answer

Create a module that adds fields to the object you want. See this very basic example: http://dl.dropbox.com/u/6303140/add_field_to_partner.tar.gz

Extract the folder to your addons path and 'Update Module List' from 'Modules' menù. Then install the module and open partner form.

5 Comments
Avatar
Discard
Avatar
Santiago
-

Thanks, Great example to start, but for future reference you have to install this module under Settings -> Modules -> Installed Modules -> (Remove "Installed" search tag) -> and then the module will appear.

Any idea why does it not shows under Apps?.

Thanks!!

Avatar
eLBati
-

Because it does not have 'application': True in the __openerp__.py

Avatar
Santiago
-

great, thanks for the clarification!

Avatar
Cameron
-

Just Brilliant! - the start I needed! Many many thanks! - a very similar module with explanation can also be found here - http://www.pixelite.co.nz/article/adding-additional-fields-using-custom-module-openerp-7

Avatar
Cameron
-

Apps - must also be looking online - I've got excess of 900 in there, also shows No of downloads

2
Avatar
Olivier Caeymaex
Best Answer

I am using the demo of v7 and there isn't any 'Configuration -> Customization -> Database Structure -> Fields' menu. Am I missing something?? Thanks in advance.

1 Comment
Avatar
Discard
Avatar
Ray Carnes
-

Make sure your user is a member of the 'Technical Features' group. This is a setting on the USER record (Settings -> Users -> Users) on the Access Rights tab. In 6.1 this option is available when your user is set to use the Extended Interface.

1
Avatar
Cameron
Best Answer

Fantastic start video on Youtube

You Tube Link

Important bit starts at 4:20

Avatar
Discard
1

Hello Olivier Caeymaex,

For creating menus through OpenERP...

  • First give access rights of "Technical Feature" to the user. (From Setting>Users>User>Access Rights>Technical Features)
  • You can see the Menu "Setting>Technical" now.
  • Now you can create the field (from Setting>Technical>Database Structure>Fields)

Thanks.

Avatar
Discard