diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-09-27 14:13:25 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-09-27 14:13:25 +0200 |
| commit | 0b90087828b1dc2fa3d941d9ed1783da714acbef (patch) | |
| tree | 6ab579f3adb27385362ebf1043e2fef9abf06c5b /doc/03_module_dev_01.rst | |
| parent | 47c6314c4488a42541155105dbc34b50d8da891e (diff) | |
[IMP] field regularity
Make @file a more generic data source, add base64 type for b64 encoding
bzr revid: xmo@openerp.com-20130927121325-mbjm4612qkaa0z0x
Diffstat (limited to 'doc/03_module_dev_01.rst')
| -rw-r--r-- | doc/03_module_dev_01.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/03_module_dev_01.rst b/doc/03_module_dev_01.rst index adc32c4a4e9..f35dab539a4 100644 --- a/doc/03_module_dev_01.rst +++ b/doc/03_module_dev_01.rst @@ -206,8 +206,8 @@ Extra attributes can either preprocess the body or replace its use entirely: ``@type`` (optional) One of ``char``, ``int``, ``float``, ``list``, ``tuple``, ``xml`` or - ``html`` or ``file``. Converts the ``field``'s body to the specified type - (or validates the body's content) + ``html``, ``file`` or ``base64``. Converts the ``field``'s body to the + specified type (or validates the body's content) * ``xml`` will join multiple XML nodes under a single ``<data>`` root * in ``xml`` and ``html``, external ids can be referenced using @@ -217,6 +217,13 @@ Extra attributes can either preprocess the body or replace its use entirely: * ``file`` expects a module-local path and will save the path prefixed with the current module's name, separated by a ``,`` (comma). For use with :py:func:`~openerp.modules.module.get_module_resource`. + * ``base64`` expects binary data, encodes it to base64 and sets it. Mostly + useful with ``@file`` + +``@file`` + + Can be used with types ``char`` and ``base64``, sources the field's content + from the specified file instead of the field's text body. ``@model`` |
