[FIX] docstrings

parent 522665b2
......@@ -254,14 +254,16 @@ def load_data(cr, module_name, filename, idref=None, mode='init'):
:param filename: the path to the filename, relative to the module \
directory.
:param idref: optional hash with ?id mapping cache?
:param mode: one of 'init', 'update', 'demo', 'init_no_create'. \
Always use 'init' for adding new items from files that are marked with \
'noupdate'. Defaults to 'init'.
'init_no_create' is a hack to load data for records which have \
forcecreate=False set. As those records won't be recreated during the \
update, standard Odoo would recreate the record if it was deleted, \
but this will fail in cases where there are required fields to be \
filled which are not contained in the data file.
:param mode:
one of 'init', 'update', 'demo', 'init_no_create'.
Always use 'init' for adding new items from files that are marked with
'noupdate'. Defaults to 'init'.
'init_no_create' is a hack to load data for records which have
forcecreate=False set. As those records won't be recreated during the
update, standard Odoo would recreate the record if it was deleted,
but this will fail in cases where there are required fields to be
filled which are not contained in the data file.
"""
if idref is None:
......
......@@ -30,10 +30,11 @@ def convert_binary_field_to_attachment(env, field_spec):
:param env: Odoo environment
:param field_spec: A dictionary with the ORM model name as key, and as
dictionary values a tuple with:
* field name to be converted as attachment as first element.
* SQL column name that contains actual data as second element. If
the second element is None, then the column name is taken
calling `get_legacy_name` method, which is the typical technique.
* field name to be converted as attachment as first element.
* SQL column name that contains actual data as second element. If
the second element is None, then the column name is taken
calling `get_legacy_name` method, which is the typical technique.
"""
logger = logging.getLogger('OpenUpgrade')
attachment_model = env['ir.attachment']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment