erppeek API Reference
Versatile CLI and Python library for interacting with Odoo / OpenERP servers via XML-RPC and JSON-RPC APIs.
erppeek.CONF_FILE
Error rendering doc: No Python documentation found for 'erppeek.ini'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.Client
Python Library Documentation: class Client in module erppeek
class Client(builtins.object)
| Client(server, db=None, user=None, password=None, transport=None, verbose=False)
|
| Connection to an Odoo instance.
|
| This is the top level object.
| The `server` is the URL of the instance, like ``http://localhost:8069``.
| If `server` is an ``odoo``/``openerp`` Python package, it is used to
| connect to the local server (>= 6.1).
|
| The `db` is the name of the database and the `user` should exist in the
| table ``res.users``. If the `password` is not provided, it will be
| asked on login.
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, exc_type, exc_value, tb)
|
| __getattr__(self, method)
|
| __init__(self, server, db=None, user=None, password=None, transport=None, verbose=False)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| access(self, obj, mode='read')
| Wrapper for :meth:`Model.access` method.
|
| clone_database(self, passwd, db_name)
| Clone the current database.
|
| The superadmin `passwd` and `db_name` are mandatory.
| Login if successful.
|
| Supported since OpenERP 7.
|
| count(self, obj, domain=None)
| Count the records in the `domain`.
|
| create_database(self, passwd, database, demo=False, lang='en_US', user_password='admin', login='admin', country_code=None)
| Create a new database.
|
| The superadmin `passwd` and the `database` name are mandatory.
| By default, `demo` data are not loaded, `lang` is ``en_US``
| and no country is set into the database.
| Login if successful.
|
| exec_workflow(self, obj, signal, obj_id)
| Wrapper around ``object.exec_workflow`` RPC method.
|
| Argument `obj` is the name of the model. The `signal`
| is sent to the object identified by its integer ``id`` `obj_id`.
|
| execute(self, obj, method, *params, **kwargs)
| Wrapper around ``object.execute`` RPC method.
|
| Argument `method` is the name of an ``osv.osv`` method or
| a method available on this `obj`.
| Method `params` are allowed. If needed, keyword
| arguments are collected in `kwargs`.
|
| field(self, obj, name)
| Wrapper for :meth:`Model.field` method.
|
| fields(self, obj, names=None)
| Wrapper for :meth:`Model.fields` method.
|
| install(self, *modules)
| Press the button ``Install``.
|
| keys(self, obj)
| Wrapper for :meth:`Model.keys` method.
|
| login(self, user, password=None, database=None)
| Switch `user` and (optionally) `database`.
|
| If the `password` is not available, it will be asked.
|
| model(self, name, check=True)
| Return a :class:`Model` instance.
|
| The argument `name` is the name of the model. If the optional
| argument `check` is :const:`False`, no validity check is done.
|
| models(self, name='')
| Return a dictionary of models.
|
| The argument `name` is a pattern to filter the models returned.
| If omitted, all models are returned.
| Keys are camel case names of the models.
| Values are instances of :class:`Model`.
|
| The return value can be used to declare the models in the global
| namespace:
|
| >>> globals().update(client.models('res.'))
|
| modules(self, name='', installed=None)
| Return a dictionary of modules.
|
| The optional argument `name` is a pattern to filter the modules.
| If the boolean argument `installed` is :const:`True`, the modules
| which are "Not Installed" or "Not Installable" are omitted. If
| the argument is :const:`False`, only these modules are returned.
| If argument `installed` is omitted, all modules are returned.
| The return value is a dictionary where module names are grouped in
| lists according to their ``state``.
|
| read(self, obj, *params, **kwargs)
| Wrapper for ``client.execute(obj, 'read', [...], ('a', 'b'))``.
|
| The first argument `obj` is the model name (example: ``"res.partner"``)
|
| The second argument, `domain`, accepts:
| - ``[('name', '=', 'mushroom'), ('state', '!=', 'draft')]``
| - ``['name = mushroom', 'state != draft']``
| - ``[]``
| - a list of ids ``[1, 2, 3]`` or a single id ``42``
|
| The third argument, `fields`, accepts:
| - a single field: ``'first_name'``
| - a tuple of fields: ``('street', 'city')``
| - a space separated string: ``'street city'``
| - a format spec: ``'%(street)s %(city)s'``
|
| If `fields` is omitted, all fields are read.
|
| If `domain` is a single id, then:
| - return a single value if a single field is requested.
| - return a string if a format spec is passed in the `fields` argument.
| - else, return a dictionary.
|
| If `domain` is not a single id, the returned value is a list of items.
| Each item complies with the rules of the previous paragraph.
|
| The optional keyword arguments `offset`, `limit` and `order` are
| used to restrict the search. The `order` is also used to order the
| results returned. Note: the low-level RPC method ``read`` itself does
| not preserve the order of the results.
|
| reset(self)
|
| search(self, obj, *params, **kwargs)
| Filter the records in the `domain`, return the ``ids``.
|
| uninstall(self, *modules)
| Press the button ``Uninstall``.
|
| upgrade(self, *modules)
| Press the button ``Upgrade``.
|
| wizard(self, name, datas=None, action='init', context=<object object at 0x0000027EC4E39040>)
| Wrapper around ``wizard.create`` and ``wizard.execute``
| RPC methods.
|
| If only `name` is provided, a new wizard is created and its ``id`` is
| returned. If `action` is not ``"init"``, then the action is executed.
| In this case the `name` is either an ``id`` or a string.
| If the `name` is a string, the wizard is created before the execution.
| The optional `datas` argument provides data for the action.
| The optional `context` argument is passed to the RPC method.
|
| Removed in OpenERP 7.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_config(environment, user=None, verbose=False)
| Create a connection to a defined environment.
|
| Read the settings from the section ``[environment]`` in the
| ``erppeek.ini`` file and return a connected :class:`Client`.
| See :func:`read_config` for details of the configuration file format.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| connect = None
erppeek.ConfigParser
Python Library Documentation: class ConfigParser in module configparser
class ConfigParser(RawConfigParser)
| ConfigParser(defaults=None, dict_type=<class 'dict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object at 0x0000027EC4E38910>, converters=<object object at 0x0000027EC4E38910>)
|
| ConfigParser implementing interpolation.
|
| Method resolution order:
| ConfigParser
| RawConfigParser
| collections.abc.MutableMapping
| collections.abc.Mapping
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.object
|
| Methods defined here:
|
| add_section(self, section)
| Create a new section in the configuration. Extends
| RawConfigParser.add_section by validating if the section name is
| a string.
|
| set(self, section, option, value=None)
| Set an option. Extends RawConfigParser.set by validating type and
| interpolation syntax on the value.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset()
|
| ----------------------------------------------------------------------
| Methods inherited from RawConfigParser:
|
| __contains__(self, key)
|
| __delitem__(self, key)
|
| __getitem__(self, key)
|
| __init__(self, defaults=None, dict_type=<class 'dict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object at 0x0000027EC4E38910>, converters=<object object at 0x0000027EC4E38910>)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
|
| __len__(self)
|
| __setitem__(self, key, value)
|
| defaults(self)
|
| get(self, section, option, *, raw=False, vars=None, fallback=<object object at 0x0000027EC4E38910>)
| Get an option value for a given section.
|
| If `vars` is provided, it must be a dictionary. The option is looked up
| in `vars` (if provided), `section`, and in `DEFAULTSECT` in that order.
| If the key is not found and `fallback` is provided, it is used as
| a fallback value. `None` can be provided as a `fallback` value.
|
| If interpolation is enabled and the optional argument `raw` is False,
| all interpolations are expanded in the return values.
|
| Arguments `raw`, `vars`, and `fallback` are keyword only.
|
| The section DEFAULT is special.
|
| getboolean(self, section, option, *, raw=False, vars=None, fallback=<object object at 0x0000027EC4E38910>, **kwargs)
|
| getfloat(self, section, option, *, raw=False, vars=None, fallback=<object object at 0x0000027EC4E38910>, **kwargs)
|
| getint(self, section, option, *, raw=False, vars=None, fallback=<object object at 0x0000027EC4E38910>, **kwargs)
| # getint, getfloat and getboolean provided directly for backwards compat
|
| has_option(self, section, option)
| Check for the existence of a given option in a given section.
| If the specified `section` is None or an empty string, DEFAULT is
| assumed. If the specified `section` does not exist, returns False.
|
| has_section(self, section)
| Indicate whether the named section is present in the configuration.
|
| The DEFAULT section is not acknowledged.
|
| items(self, section=<object object at 0x0000027EC4E38910>, raw=False, vars=None)
| Return a list of (name, value) tuples for each option in a section.
|
| All % interpolations are expanded in the return values, based on the
| defaults passed into the constructor, unless the optional argument
| `raw` is true. Additional substitutions may be provided using the
| `vars` argument, which must be a dictionary whose contents overrides
| any pre-existing defaults.
|
| The section DEFAULT is special.
|
| options(self, section)
| Return a list of option names for the given section name.
|
| optionxform(self, optionstr)
|
| popitem(self)
| Remove a section from the parser and return it as
| a (section_name, section_proxy) tuple. If no section is present, raise
| KeyError.
|
| The section DEFAULT is never returned because it cannot be removed.
|
| read(self, filenames, encoding=None)
| Read and parse a filename or an iterable of filenames.
|
| Files that cannot be opened are silently ignored; this is
| designed so that you can specify an iterable of potential
| configuration file locations (e.g. current directory, user's
| home directory, systemwide directory), and all existing
| configuration files in the iterable will be read. A single
| filename may also be given.
|
| Return list of successfully read files.
|
| read_dict(self, dictionary, source='<dict>')
| Read configuration from a dictionary.
|
| Keys are section names, values are dictionaries with keys and values
| that should be present in the section. If the used dictionary type
| preserves order, sections and their keys will be added in order.
|
| All types held in the dictionary are converted to strings during
| reading, including section names, option names and keys.
|
| Optional second argument is the `source` specifying the name of the
| dictionary being read.
|
| read_file(self, f, source=None)
| Like read() but the argument must be a file-like object.
|
| The `f` argument must be iterable, returning one line at a time.
| Optional second argument is the `source` specifying the name of the
| file being read. If not given, it is taken from f.name. If `f` has no
| `name` attribute, `<???>` is used.
|
| read_string(self, string, source='<string>')
| Read configuration from a given string.
|
| remove_option(self, section, option)
| Remove an option.
|
| remove_section(self, section)
| Remove a file section.
|
| sections(self)
| Return a list of section names, excluding [DEFAULT]
|
| write(self, fp, space_around_delimiters=True)
| Write an .ini-format representation of the configuration state.
|
| If `space_around_delimiters` is True (the default), delimiters
| between keys and values are surrounded by spaces.
|
| Please note that comments in the original configuration file are not
| preserved when writing the configuration back.
|
| ----------------------------------------------------------------------
| Readonly properties inherited from RawConfigParser:
|
| converters
|
| ----------------------------------------------------------------------
| Data descriptors inherited from RawConfigParser:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from RawConfigParser:
|
| BOOLEAN_STATES = {'0': False, '1': True, 'false': False, 'no': False, ...
|
| NONSPACECRE = re.compile('\\S')
|
| OPTCRE = re.compile('\n (?P<option>.*?) ... ...
|
| OPTCRE_NV = re.compile('\n (?P<option>.*?) ... ...
|
| SECTCRE = re.compile('\n \\[ ... ...
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.MutableMapping:
|
| clear(self)
| D.clear() -> None. Remove all items from D.
|
| pop(self, key, default=<object object at 0x0000027EC4E381F0>)
| D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
| If key is not found, d is returned if given, otherwise KeyError is raised.
|
| setdefault(self, key, default=None)
| D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
|
| update(self, other=(), /, **kwds)
| D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.
| If E present and has a .keys() method, does: for k in E: D[k] = E[k]
| If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v
| In either case, this is followed by: for k, v in F.items(): D[k] = v
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.Mapping:
|
| __eq__(self, other)
| Return self==value.
|
| keys(self)
| D.keys() -> a set-like object providing a view on D's keys
|
| values(self)
| D.values() -> an object providing a view on D's values
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from collections.abc.Mapping:
|
| __hash__ = None
|
| __reversed__ = None
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Collection:
|
| __subclasshook__(C)
| Abstract classes can override this to customize issubclass().
|
| This is invoked early on by abc.ABCMeta.__subclasscheck__().
| It should return True, False or NotImplemented. If it returns
| NotImplemented, the normal algorithm is used. Otherwise, it
| overrides the normal algorithm (and the outcome is cached).
|
| ----------------------------------------------------------------------
| Class methods inherited from collections.abc.Iterable:
|
| __class_getitem__ = GenericAlias(...)
| Represent a PEP 585 generic type
|
| E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
erppeek.DEFAULT_DB
Error rendering doc: No Python documentation found for 'odoo'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.DEFAULT_URL
Error rendering doc: No Python documentation found for 'http://localhost:8069/xmlrpc'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.DEFAULT_USER
Error rendering doc: No Python documentation found for 'admin'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.DOMAIN_OPERATORS
Python Library Documentation: frozenset object class frozenset(object) | frozenset() -> empty frozenset object | frozenset(iterable) -> frozenset object | | Build an immutable unordered collection of unique elements. | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __contains__(...) | x.__contains__(y) <==> y in x. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __ne__(self, value, /) | Return self!=value. | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __reduce__(...) | Return state information for pickling. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rsub__(self, value, /) | Return value-self. | | __rxor__(self, value, /) | Return value^self. | | __sizeof__(...) | S.__sizeof__() -> size of S in memory, in bytes | | __sub__(self, value, /) | Return self-value. | | __xor__(self, value, /) | Return self^value. | | copy(...) | Return a shallow copy of a set. | | difference(...) | Return the difference of two or more sets as a new set. | | (i.e. all elements that are in this set but not the others.) | | intersection(...) | Return the intersection of two sets as a new set. | | (i.e. all elements that are in both sets.) | | isdisjoint(...) | Return True if two sets have a null intersection. | | issubset(self, other, /) | Test whether every element in the set is in other. | | issuperset(self, other, /) | Test whether every element in other is in the set. | | symmetric_difference(...) | Return the symmetric difference of two sets as a new set. | | (i.e. all elements that are in exactly one of the sets.) | | union(...) | Return the union of sets as a new set. | | (i.e. all elements that are in either set.) | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature.
erppeek.Error
Python Library Documentation: class Error in module erppeek class Error(builtins.Exception) | An ERPpeek error. | | Method resolution order: | Error | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
erppeek.Fault
Python Library Documentation: class Fault in module xmlrpc.client class Fault(Error) | Fault(faultCode, faultString, **extra) | | Indicates an XML-RPC fault package. | | Method resolution order: | Fault | Error | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, faultCode, faultString, **extra) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | ---------------------------------------------------------------------- | Methods inherited from Error: | | __str__(self, /) from builtins.object | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from Error: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
erppeek.HIST_FILE
Error rendering doc: No Python documentation found for 'C:\\Users\\Youse/.erppeek_history'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.MAXCOL
Python Library Documentation: list object class list(object) | list(iterable=(), /) | | Built-in mutable sequence. | | If no argument is given, the constructor creates a new empty list. | The argument must be an iterable if specified. | | Methods defined here: | | __add__(self, value, /) | Return self+value. | | __contains__(self, key, /) | Return bool(key in self). | | __delitem__(self, key, /) | Delete self[key]. | | __eq__(self, value, /) | Return self==value. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getitem__(self, index, /) | Return self[index]. | | __gt__(self, value, /) | Return self>value. | | __iadd__(self, value, /) | Implement self+=value. | | __imul__(self, value, /) | Implement self*=value. | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self, /) | Implement iter(self). | | __le__(self, value, /) | Return self<=value. | | __len__(self, /) | Return len(self). | | __lt__(self, value, /) | Return self<value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __repr__(self, /) | Return repr(self). | | __reversed__(self, /) | Return a reverse iterator over the list. | | __rmul__(self, value, /) | Return value*self. | | __setitem__(self, key, value, /) | Set self[key] to value. | | __sizeof__(self, /) | Return the size of the list in memory, in bytes. | | append(self, object, /) | Append object to the end of the list. | | clear(self, /) | Remove all items from list. | | copy(self, /) | Return a shallow copy of the list. | | count(self, value, /) | Return number of occurrences of value. | | extend(self, iterable, /) | Extend list by appending elements from the iterable. | | index(self, value, start=0, stop=9223372036854775807, /) | Return first index of value. | | Raises ValueError if the value is not present. | | insert(self, index, object, /) | Insert object before index. | | pop(self, index=-1, /) | Remove and return item at index (default last). | | Raises IndexError if list is empty or index is out of range. | | remove(self, value, /) | Remove first occurrence of value. | | Raises ValueError if the value is not present. | | reverse(self, /) | Reverse *IN PLACE*. | | sort(self, /, *, key=None, reverse=False) | Sort the list in ascending order and return None. | | The sort is in-place (i.e. the list itself is modified) and stable (i.e. the | order of two equal elements is maintained). | | If a key function is given, apply it once to each list item and sort them, | ascending or descending, according to their function values. | | The reverse flag can be set to sort in descending order. | | ---------------------------------------------------------------------- | Class methods defined here: | | __class_getitem__(...) | See PEP 585 | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
erppeek.MAXINT
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
erppeek.MININT
Python Library Documentation: int object
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
erppeek.Model
Python Library Documentation: class Model in module erppeek class Model(builtins.object) | Model(client, name) | | The class for Odoo models. | | Methods defined here: | | __getattr__(self, attr) | | __repr__(self) | Return repr(self). | | access(self, mode='read') | Check if the user has access to this model. | | Optional argument `mode` is the access mode to check. Valid values | are ``read``, ``write``, ``create`` and ``unlink``. If omitted, | the ``read`` mode is checked. Return a boolean. | | browse(self, domain, *params, **kwargs) | Return a :class:`Record` or a :class:`RecordList`. | | The argument `domain` accepts a single integer ``id``, a list of ids | or a search domain. | If it is a single integer, the return value is a :class:`Record`. | Otherwise, the return value is a :class:`RecordList`. | To get all the records, pass an empty list along with keyword | argument ``limit=None``. | | create(self, values, context=<object object at 0x0000027EC4E39040>) | Create a :class:`Record`. | | The argument `values` is a dictionary of values which are used to | create the record. Relationship fields `one2many` and `many2many` | accept either a list of ids or a RecordList or the extended Odoo | syntax. Relationship fields `many2one` and `reference` accept | either a Record or the Odoo syntax. | | The newly created :class:`Record` is returned. | | field(self, name) | Return the field properties for field `name`. | | fields(self, names=None) | Return a dictionary of the fields of the model. | | Optional argument `names` is a sequence of field names or | a space separated string of these names. | If omitted, all fields are returned. | | get(self, domain, context=<object object at 0x0000027EC4E39040>) | Return a single :class:`Record`. | | The argument `domain` accepts a single integer ``id`` or a search | domain, or an external ID ``xml_id``. The return value is a | :class:`Record` or None. If multiple records are found, | a ``ValueError`` is raised. | | keys(self) | Return the keys of the model. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(cls, client, name) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
erppeek.PY2
Python Library Documentation: bool object class bool(int) | bool(x) -> bool | | Returns True when the argument x is true, False otherwise. | The builtins True and False are the only two instances of the class bool. | The class bool is a subclass of the class int, and cannot be subclassed. | | Method resolution order: | bool | int | object | | Methods defined here: | | __and__(self, value, /) | Return self&value. | | __invert__(self, /) | ~self | | __or__(self, value, /) | Return self|value. | | __rand__(self, value, /) | Return value&self. | | __repr__(self, /) | Return repr(self). | | __ror__(self, value, /) | Return value|self. | | __rxor__(self, value, /) | Return value^self. | | __xor__(self, value, /) | Return self^value. | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(*args, **kwargs) | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from int: | | __abs__(self, /) | abs(self) | | __add__(self, value, /) | Return self+value. | | __bool__(self, /) | True if self else False | | __ceil__(...) | Ceiling of an Integral returns itself. | | __divmod__(self, value, /) | Return divmod(self, value). | | __eq__(self, value, /) | Return self==value. | | __float__(self, /) | float(self) | | __floor__(...) | Flooring an Integral returns itself. | | __floordiv__(self, value, /) | Return self//value. | | __format__(self, format_spec, /) | Convert to a string according to format_spec. | | __ge__(self, value, /) | Return self>=value. | | __getattribute__(self, name, /) | Return getattr(self, name). | | __getnewargs__(self, /) | | __gt__(self, value, /) | Return self>value. | | __hash__(self, /) | Return hash(self). | | __index__(self, /) | Return self converted to an integer, if self is suitable for use as an index into a list. | | __int__(self, /) | int(self) | | __le__(self, value, /) | Return self<=value. | | __lshift__(self, value, /) | Return self<<value. | | __lt__(self, value, /) | Return self<value. | | __mod__(self, value, /) | Return self%value. | | __mul__(self, value, /) | Return self*value. | | __ne__(self, value, /) | Return self!=value. | | __neg__(self, /) | -self | | __pos__(self, /) | +self | | __pow__(self, value, mod=None, /) | Return pow(self, value, mod). | | __radd__(self, value, /) | Return value+self. | | __rdivmod__(self, value, /) | Return divmod(value, self). | | __rfloordiv__(self, value, /) | Return value//self. | | __rlshift__(self, value, /) | Return value<<self. | | __rmod__(self, value, /) | Return value%self. | | __rmul__(self, value, /) | Return value*self. | | __round__(...) | Rounding an Integral returns itself. | | Rounding with an ndigits argument also returns an integer. | | __rpow__(self, value, mod=None, /) | Return pow(value, self, mod). | | __rrshift__(self, value, /) | Return value>>self. | | __rshift__(self, value, /) | Return self>>value. | | __rsub__(self, value, /) | Return value-self. | | __rtruediv__(self, value, /) | Return value/self. | | __sizeof__(self, /) | Returns size in memory, in bytes. | | __sub__(self, value, /) | Return self-value. | | __truediv__(self, value, /) | Return self/value. | | __trunc__(...) | Truncating an Integral returns itself. | | as_integer_ratio(self, /) | Return a pair of integers, whose ratio is equal to the original int. | | The ratio is in lowest terms and has a positive denominator. | | >>> (10).as_integer_ratio() | (10, 1) | >>> (-10).as_integer_ratio() | (-10, 1) | >>> (0).as_integer_ratio() | (0, 1) | | bit_count(self, /) | Number of ones in the binary representation of the absolute value of self. | | Also known as the population count. | | >>> bin(13) | '0b1101' | >>> (13).bit_count() | 3 | | bit_length(self, /) | Number of bits necessary to represent self in binary. | | >>> bin(37) | '0b100101' | >>> (37).bit_length() | 6 | | conjugate(...) | Returns self, the complex conjugate of any int. | | is_integer(self, /) | Returns True. Exists for duck type compatibility with float.is_integer. | | to_bytes(self, /, length=1, byteorder='big', *, signed=False) | Return an array of bytes representing an integer. | | length | Length of bytes object to use. An OverflowError is raised if the | integer is not representable with the given number of bytes. Default | is length 1. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Determines whether two's complement is used to represent the integer. | If signed is False and a negative integer is given, an OverflowError | is raised. | | ---------------------------------------------------------------------- | Class methods inherited from int: | | from_bytes(bytes, byteorder='big', *, signed=False) | Return the integer represented by the given array of bytes. | | bytes | Holds the array of bytes to convert. The argument must either | support the buffer protocol or be an iterable object producing bytes. | Bytes and bytearray are examples of built-in objects that support the | buffer protocol. | byteorder | The byte order used to represent the integer. If byteorder is 'big', | the most significant byte is at the beginning of the byte array. If | byteorder is 'little', the most significant byte is at the end of the | byte array. To request the native byte order of the host system, use | `sys.byteorder' as the byte order value. Default is to use 'big'. | signed | Indicates whether two's complement is used to represent the integer. | | ---------------------------------------------------------------------- | Data descriptors inherited from int: | | denominator | the denominator of a rational number in lowest terms | | imag | the imaginary part of a complex number | | numerator | the numerator of a rational number in lowest terms | | real | the real part of a complex number
erppeek.Record
Python Library Documentation: class Record in module erppeek class Record(builtins.object) | Record(res_model, res_id, context=<object object at 0x0000027EC4E39040>) | | A class for all Odoo records. | | It maps any Odoo object. | The fields can be accessed through attributes. The changes are immediately | sent to the server. | The ``many2one``, ``one2many`` and ``many2many`` attributes are wrapped in | ``Record`` and ``RecordList`` objects. These attributes support writing | too. | The attributes are evaluated lazily, and they are cached in the record. | The Record's cache is invalidated if any attribute is changed. | | Methods defined here: | | __dir__(self) | Default dir() implementation. | | __eq__(self, other) | Return self==value. | | __getattr__(self, attr) | | __init__(self, res_model, res_id, context=<object object at 0x0000027EC4E39040>) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | __setattr__(self, attr, value) | Implement setattr(self, name, value). | | __str__(self) | Return str(self). | | _get_name(self) | | _send(self, signal) | Trigger workflow `signal` for this :class:`Record`. | | _set_external_id(self, xml_id) | Set the External ID of this record. | | _update(self, values) | | copy(self, default=None, context=<object object at 0x0000027EC4E39040>) | Copy a record and return the new :class:`Record`. | | The optional argument `default` is a mapping which overrides some | values of the new record. | | perm_read(self, context=<object object at 0x0000027EC4E39040>) | Read the metadata of the :class:`Record`. | | Return a dictionary of values. | See :meth:`Client.perm_read` for details. | | read(self, fields=None, context=<object object at 0x0000027EC4E39040>) | Read the `fields` of the :class:`Record`. | | The argument `fields` accepts different kinds of values. | See :meth:`Client.read` for details. | | refresh(self) | Force refreshing the record's data. | | unlink(self, context=<object object at 0x0000027EC4E39040>) | Delete the current :class:`Record` from the database. | | write(self, values, context=<object object at 0x0000027EC4E39040>) | Write the `values` in the :class:`Record`. | | `values` is a dictionary of values. | See :meth:`Model.create` for details. | | ---------------------------------------------------------------------- | Readonly properties defined here: | | _external_id | Retrieve the External ID of the :class:`Record`. | | Return the fully qualified External ID of the :class:`Record`, | with default value False if there's none. If multiple IDs | exist, only one of them is returned (randomly). | | _fields | | _keys | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
erppeek.RecordList
Python Library Documentation: class RecordList in module erppeek class RecordList(builtins.object) | RecordList(res_model, ids, context=<object object at 0x0000027EC4E39040>) | | A sequence of Odoo :class:`Record`. | | It has a similar API as the :class:`Record` class, but for a list of | records. The attributes of the ``RecordList`` are read-only, and they | return list of attribute values in the same order. The ``many2one``, | ``one2many`` and ``many2many`` attributes are wrapped in ``RecordList`` | and list of ``RecordList`` objects. Use the method ``RecordList.write`` | to assign a single value to all the selected records. | | Methods defined here: | | __add__(self, other) | | __dir__(self) | Default dir() implementation. | | __eq__(self, other) | Return self==value. | | __getattr__(self, attr) | | __getitem__(self, key) | | __init__(self, res_model, ids, context=<object object at 0x0000027EC4E39040>) | Initialize self. See help(type(self)) for accurate signature. | | __len__(self) | | __repr__(self) | Return repr(self). | | __setattr__(self, attr, value) | Implement setattr(self, name, value). | | read(self, fields=None, context=<object object at 0x0000027EC4E39040>) | Wrapper for :meth:`Record.read` method. | | unlink(self, context=<object object at 0x0000027EC4E39040>) | Wrapper for :meth:`Record.unlink` method. | | write(self, values, context=<object object at 0x0000027EC4E39040>) | Wrapper for :meth:`Record.write` method. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None
erppeek.Request
Python Library Documentation: class Request in module urllib.request
class Request(builtins.object)
| Request(url, data=None, headers={}, origin_req_host=None, unverifiable=False, method=None)
|
| Methods defined here:
|
| __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=False, method=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| add_header(self, key, val)
|
| add_unredirected_header(self, key, val)
|
| get_full_url(self)
|
| get_header(self, header_name, default=None)
|
| get_method(self)
| Return a string indicating the HTTP request method.
|
| has_header(self, header_name)
|
| has_proxy(self)
|
| header_items(self)
|
| remove_header(self, header_name)
|
| set_proxy(self, host, type)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables
|
| __weakref__
| list of weak references to the object
|
| data
|
| full_url
erppeek.ServerError
Python Library Documentation: class ServerError in module erppeek class ServerError(builtins.Exception) | An error received from the server. | | Method resolution order: | ServerError | builtins.Exception | builtins.BaseException | builtins.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Methods inherited from builtins.Exception: | | __init__(self, /, *args, **kwargs) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setstate__(...) | | __str__(self, /) | Return str(self). | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args
erppeek.ServerProxy
Python Library Documentation: class ServerProxy in module xmlrpc.client class ServerProxy(builtins.object) | ServerProxy(uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False, use_builtin_types=False, *, headers=(), context=None) | | uri [,options] -> a logical connection to an XML-RPC server | | uri is the connection point on the server, given as | scheme://host/target. | | The standard implementation always supports the "http" scheme. If | SSL socket support is available (Python 2.0), it also supports | "https". | | If the target part and the slash preceding it are both omitted, | "/RPC2" is assumed. | | The following options can be given as keyword arguments: | | transport: a transport factory | encoding: the request encoding (default is UTF-8) | | All 8-bit strings passed to the server proxy are assumed to use | the given encoding. | | Methods defined here: | | __call__(self, attr) | A workaround to get special attributes on the ServerProxy | without interfering with the magic __getattr__ | | __enter__(self) | | __exit__(self, *args) | | __getattr__(self, name) | | __init__(self, uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False, use_builtin_types=False, *, headers=(), context=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
erppeek.Service
Python Library Documentation: class Service in module erppeek class Service(builtins.object) | Service(client, endpoint, methods, verbose=False) | | A wrapper around XML-RPC endpoints. | | The connected endpoints are exposed on the Client instance. | The `server` argument is the URL of the server (scheme+host+port). | If `server` is an ``odoo`` Python package, it is used to connect to the | local server. The `endpoint` argument is the name of the service | (examples: ``"object"``, ``"db"``). The `methods` is the list of methods | which should be exposed on this endpoint. Use ``dir(...)`` on the | instance to list them. | | Methods defined here: | | __del__(self) | | __dir__(self) | Default dir() implementation. | | __getattr__(self, name) | | __init__(self, client, endpoint, methods, verbose=False) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | __str__ = __repr__(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object
erppeek.USAGE
Error rendering doc: No Python documentation found for 'Usage (some commands):\n models(name) # List models matching pattern\n model(name) # Return a Model instance\n model(name).keys() # List field names of the model\n model(name).fields(names=None) # Return details for the fields\n model(name).field(name) # Return details for the field\n model(name).browse(domain)\n model(name).browse(domain, offset=0, limit=None, order=None)\n # Return a RecordList\n\n rec = model(name).get(domain) # Get the Record matching domain\n rec.some_field # Return the value of this field\n rec.read(fields=None) # Return values for the fields\n\n client.login(user) # Login with another user\n client.connect(env) # Connect to another env.\n client.modules(name) # List modules matching pattern\n client.upgrade(module1, module2, ...)\n # Upgrade the modules\n'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.attr
Error rendering doc: No Python documentation found for 'n'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.basestring
Python Library Documentation: class str in module builtins
class str(object)
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return bool(key in self).
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Return a formatted version of the string as described by format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Call keyword.iskeyword(s) to test whether string s is a reserved identifier,
| such as "def" or "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| removeprefix(self, prefix, /)
| Return a str with the given prefix string removed if present.
|
| If the string starts with the prefix string, return string[len(prefix):].
| Otherwise, return a copy of the original string.
|
| removesuffix(self, suffix, /)
| Return a str with the given suffix string removed if present.
|
| If the string ends with the suffix string and that suffix is not empty,
| return string[:-len(suffix)]. Otherwise, return a copy of the original
| string.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the end of the string and works to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the substrings in the string, using sep as the separator string.
|
| sep
| The separator used to split the string.
|
| When set to None (the default value), will split on any whitespace
| character (including \n \r \t \f and spaces) and will discard
| empty strings from the result.
| maxsplit
| Maximum number of splits.
| -1 (the default value) means no limit.
|
| Splitting starts at the front of the string and works to the end.
|
| Note, str.split() is mainly useful for data that has been intentionally
| delimited. With natural text that includes punctuation, consider using
| the regular expression module.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(...)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.
erppeek.cls
Error rendering doc: No Python documentation found for 'Num'. Use help() to get the interactive help utility. Use help(str) for help on the str class.
erppeek.current_thread
Python Library Documentation: function current_thread in module threading
current_thread()
Return the current Thread object, corresponding to the caller's thread of control.
If the caller's thread of control was not created through the threading
module, a dummy thread object with limited functionality is returned.
erppeek.dispatch_jsonrpc
Python Library Documentation: function dispatch_jsonrpc in module erppeek dispatch_jsonrpc(url, service_name, method, args)
erppeek.format_exception
Python Library Documentation: function format_exception in module erppeek
format_exception(exc_type, exc, tb, limit=None, chain=True, _format_exception=<function format_exception at 0x0000027EC56E53A0>)
Format a stack trace and the exception information.
This wrapper is a replacement of ``traceback.format_exception``
which formats the error and traceback received by XML-RPC/JSON-RPC.
If `chain` is True, then the original exception is printed too.
erppeek.http_post
Python Library Documentation: function http_post in module erppeek
http_post(url, data, headers={'Content-Type': 'application/json'})
erppeek.int_types
Python Library Documentation: class int in module builtins
class int(object)
| int([x]) -> integer
| int(x, base=10) -> integer
|
| Convert a number or string to an integer, or return 0 if no arguments
| are given. If x is a number, return x.__int__(). For floating-point
| numbers, this truncates towards zero.
|
| If x is not a number or if base is given, then x must be a string,
| bytes, or bytearray instance representing an integer literal in the
| given base. The literal can be preceded by '+' or '-' and be surrounded
| by whitespace. The base defaults to 10. Valid bases are 0 and 2-36.
| Base 0 means to interpret the base from the string as an integer literal.
| >>> int('0b100', base=0)
| 4
|
| Built-in subclasses:
| bool
|
| Methods defined here:
|
| __abs__(self, /)
| abs(self)
|
| __add__(self, value, /)
| Return self+value.
|
| __and__(self, value, /)
| Return self&value.
|
| __bool__(self, /)
| True if self else False
|
| __ceil__(...)
| Ceiling of an Integral returns itself.
|
| __divmod__(self, value, /)
| Return divmod(self, value).
|
| __eq__(self, value, /)
| Return self==value.
|
| __float__(self, /)
| float(self)
|
| __floor__(...)
| Flooring an Integral returns itself.
|
| __floordiv__(self, value, /)
| Return self//value.
|
| __format__(self, format_spec, /)
| Convert to a string according to format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __index__(self, /)
| Return self converted to an integer, if self is suitable for use as an index into a list.
|
| __int__(self, /)
| int(self)
|
| __invert__(self, /)
| ~self
|
| __le__(self, value, /)
| Return self<=value.
|
| __lshift__(self, value, /)
| Return self<<value.
|
| __lt__(self, value, /)
| Return self<value.
|
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __neg__(self, /)
| -self
|
| __or__(self, value, /)
| Return self|value.
|
| __pos__(self, /)
| +self
|
| __pow__(self, value, mod=None, /)
| Return pow(self, value, mod).
|
| __radd__(self, value, /)
| Return value+self.
|
| __rand__(self, value, /)
| Return value&self.
|
| __rdivmod__(self, value, /)
| Return divmod(value, self).
|
| __repr__(self, /)
| Return repr(self).
|
| __rfloordiv__(self, value, /)
| Return value//self.
|
| __rlshift__(self, value, /)
| Return value<<self.
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __ror__(self, value, /)
| Return value|self.
|
| __round__(...)
| Rounding an Integral returns itself.
|
| Rounding with an ndigits argument also returns an integer.
|
| __rpow__(self, value, mod=None, /)
| Return pow(value, self, mod).
|
| __rrshift__(self, value, /)
| Return value>>self.
|
| __rshift__(self, value, /)
| Return self>>value.
|
| __rsub__(self, value, /)
| Return value-self.
|
| __rtruediv__(self, value, /)
| Return value/self.
|
| __rxor__(self, value, /)
| Return value^self.
|
| __sizeof__(self, /)
| Returns size in memory, in bytes.
|
| __sub__(self, value, /)
| Return self-value.
|
| __truediv__(self, value, /)
| Return self/value.
|
| __trunc__(...)
| Truncating an Integral returns itself.
|
| __xor__(self, value, /)
| Return self^value.
|
| as_integer_ratio(self, /)
| Return a pair of integers, whose ratio is equal to the original int.
|
| The ratio is in lowest terms and has a positive denominator.
|
| >>> (10).as_integer_ratio()
| (10, 1)
| >>> (-10).as_integer_ratio()
| (-10, 1)
| >>> (0).as_integer_ratio()
| (0, 1)
|
| bit_count(self, /)
| Number of ones in the binary representation of the absolute value of self.
|
| Also known as the population count.
|
| >>> bin(13)
| '0b1101'
| >>> (13).bit_count()
| 3
|
| bit_length(self, /)
| Number of bits necessary to represent self in binary.
|
| >>> bin(37)
| '0b100101'
| >>> (37).bit_length()
| 6
|
| conjugate(...)
| Returns self, the complex conjugate of any int.
|
| is_integer(self, /)
| Returns True. Exists for duck type compatibility with float.is_integer.
|
| to_bytes(self, /, length=1, byteorder='big', *, signed=False)
| Return an array of bytes representing an integer.
|
| length
| Length of bytes object to use. An OverflowError is raised if the
| integer is not representable with the given number of bytes. Default
| is length 1.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Determines whether two's complement is used to represent the integer.
| If signed is False and a negative integer is given, an OverflowError
| is raised.
|
| ----------------------------------------------------------------------
| Class methods defined here:
|
| from_bytes(bytes, byteorder='big', *, signed=False)
| Return the integer represented by the given array of bytes.
|
| bytes
| Holds the array of bytes to convert. The argument must either
| support the buffer protocol or be an iterable object producing bytes.
| Bytes and bytearray are examples of built-in objects that support the
| buffer protocol.
| byteorder
| The byte order used to represent the integer. If byteorder is 'big',
| the most significant byte is at the beginning of the byte array. If
| byteorder is 'little', the most significant byte is at the end of the
| byte array. To request the native byte order of the host system, use
| `sys.byteorder' as the byte order value. Default is to use 'big'.
| signed
| Indicates whether two's complement is used to represent the integer.
|
| ----------------------------------------------------------------------
| Static methods defined here:
|
| __new__(*args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| denominator
| the denominator of a rational number in lowest terms
|
| imag
| the imaginary part of a complex number
|
| numerator
| the numerator of a rational number in lowest terms
|
| real
| the real part of a complex number
erppeek.is_list_of_dict
Python Library Documentation: function is_list_of_dict in module erppeek
is_list_of_dict(iterator)
Return True if the first non-false item is a dict.
erppeek.issearchdomain
Python Library Documentation: function issearchdomain in module erppeek
issearchdomain(arg)
Check if the argument is a search domain.
Examples:
- ``[('name', '=', 'mushroom'), ('state', '!=', 'draft')]``
- ``['name = mushroom', 'state != draft']``
- ``[]``
erppeek.literal_eval
Python Library Documentation: function literal_eval in module erppeek
literal_eval(expression, _octal_digits=frozenset({'1', '5', '3', '6', '2', '4', '0', '7'}))
erppeek.lowercase
Python Library Documentation: function lowercase in module erppeek
lowercase(s, _sub=<built-in method sub of re.Pattern object at 0x0000027EC77ADBC0>, _repl=<function <lambda> at 0x0000027EC78B7F60>, _cache={})
Convert to lowercase with dots.
>>> lowercase('ResCompany')
'res.company'
erppeek.main
Python Library Documentation: function main in module erppeek main(interact=<function _interact at 0x0000027EC78CC540>)
erppeek.mixedcase
Python Library Documentation: function mixedcase in module erppeek
mixedcase(s, _cache={})
Convert to MixedCase.
>>> mixedcase('res.company')
'ResCompany'
erppeek.read_config
Python Library Documentation: function read_config in module erppeek
read_config(section=None)
Read the environment settings from the configuration file.
The config file ``erppeek.ini`` contains a `section` for each environment.
Each section provides parameters for the connection: ``host``, ``port``,
``database``, ``username`` and (optional) ``password``. Default values
are read from the ``[DEFAULT]`` section. If the ``password`` is not in
the configuration file, it is requested on login.
Return a tuple ``(server, db, user, password or None)``.
Without argument, it returns the list of configured environments.
erppeek.searchargs
Python Library Documentation: function searchargs in module erppeek
searchargs(params, kwargs=None, context=None, api_v9=False)
Compute the 'search' parameters.
erppeek.start_odoo_services
Python Library Documentation: function start_odoo_services in module erppeek
start_odoo_services(options=None, appname=None)
Initialize the Odoo services.
Import the ``odoo`` Python package and load the Odoo services.
The argument `options` receives the command line arguments
for ``odoo``. Example:
``['-c', '/path/to/odoo-server.conf', '--without-demo', 'all']``.
Return the ``odoo`` package.
erppeek.urlopen
Python Library Documentation: function urlopen in module urllib.request
urlopen(url, data=None, timeout=<object object at 0x0000027EC4E38AC0>, *, cafile=None, capath=None, cadefault=False, context=None)
Open the URL url, which can be either a string or a Request object.
*data* must be an object specifying additional data to be sent to
the server, or None if no such data is needed. See Request for
details.
urllib.request module uses HTTP/1.1 and includes a "Connection:close"
header in its HTTP requests.
The optional *timeout* parameter specifies a timeout in seconds for
blocking operations like the connection attempt (if not specified, the
global default timeout setting will be used). This only works for HTTP,
HTTPS and FTP connections.
If *context* is specified, it must be a ssl.SSLContext instance describing
the various SSL options. See HTTPSConnection for more details.
The optional *cafile* and *capath* parameters specify a set of trusted CA
certificates for HTTPS requests. cafile should point to a single file
containing a bundle of CA certificates, whereas capath should point to a
directory of hashed certificate files. More information can be found in
ssl.SSLContext.load_verify_locations().
The *cadefault* parameter is ignored.
This function always returns an object which can work as a
context manager and has the properties url, headers, and status.
See urllib.response.addinfourl for more detail on these properties.
For HTTP and HTTPS URLs, this function returns a http.client.HTTPResponse
object slightly modified. In addition to the three new methods above, the
msg attribute contains the same information as the reason attribute ---
the reason phrase returned by the server --- instead of the response
headers as it is specified in the documentation for HTTPResponse.
For FTP, file, and data URLs and requests explicitly handled by legacy
URLopener and FancyURLopener classes, this function returns a
urllib.response.addinfourl object.
Note that None may be returned if no handler handles the request (though
the default installed global OpenerDirector uses UnknownHandler to ensure
this never happens).
In addition, if proxy settings are detected (for example, when a *_proxy
environment variable like http_proxy is set), ProxyHandler is default
installed and makes sure the requests are handled through the proxy.