I’m new to OpenERP and Python, I’m trying to understand the various functions in the py files. There is an import function used in all files generally devided into two parts : the first part seems to refer to Python librairies (called modules ?) like from datetime import datetime or from dateutil.relativedelta import relativedelta but the second part, I don’t know what it refers to.
I would like to know what the following functions refer to :
import netsvc
import pooler
from osv import fields, osv
import decimal_precision as dp
from tools.translate import _
What is netsvc, pooler, osv, decimal_precision, tools_translate ? If they are openERP modules, where can I find the code behind them, else what are they ?
I would be grateful to anyone who would be able to explain to me all of them, and any other similar ones if he/she knows of any.
It sounds like you have installed some version of OpenERP that includes compiled files instead of the raw Python source code.
I suggest you reconfigure your development environment by checking the source out from launchpad and running the server from the source code. Personally, I like to run it under Eclipse with PyDev, because it has a nice debugger.
For the project configuration in Eclipse, I just checked out each branch from launchpad, and then imported each one as a project into my Eclipse workspace. The launch details are a bit different between 6.0 and 6.1. Here are my command line arguments for launching each version of the server project:
6.0:
6.1 needs the web client to launch with the server: