File: ref_fields.rst

package info (click to toggle)
python-oerplib 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,212 kB
  • ctags: 501
  • sloc: python: 3,230; makefile: 115
file content (34 lines) | stat: -rw-r--r-- 1,406 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. _fields:

Browse object fields
====================

The table below presents the Python types returned by `OERPLib`
for each `OpenERP` fields used by ``browse_record`` objects
(see the :func:`browse <oerplib.OERP.browse>` method):

================  ==============================
`OpenERP` fields  Python types used in `OERPLib`
================  ==============================
fields.binary     basestring (str or unicode)
fields.boolean    bool
fields.char       basestring (str or unicode)
fields.date       `datetime <http://docs.python.org/library/datetime.html>`_.date
fields.datetime   `datetime <http://docs.python.org/library/datetime.html>`_.datetime
fields.float      float
fields.integer    integer
fields.selection  basestring (str or unicode)
fields.text       basestring (str or unicode)
================  ==============================

Exceptions made for relation fields:

================  ===========================================================
`OpenERP` fields  Types used in `OERPLib`
================  ===========================================================
fields.many2one   ``browse_record`` instance
fields.one2many   generator to iterate on ``browse_record`` instances 
fields.many2many  generator to iterate on ``browse_record`` instances
fields.reference  ``browse_record`` instance
================  ===========================================================