Metadata-Version: 2.5
Name: trytond_etude
Version: 8.0.0.3
Summary: Etude Form Server
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: form,question,questionnaire,survey,tryton
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Requires-Python: >=3.10
Requires-Dist: trytond-company<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Etude Module
============

The ``etude`` module is the foundation of the etude form server: it holds the
definition of a form and nothing else.  It is the core of the etude group, the
only module of the group that depends on nothing outside ``ir``, ``res`` and
``company``; every other module of the group extends these models.

A form is a hierarchy of four levels: a *form* holds *pages*, a page holds
question *groups* and a group holds *questions*.  A question of a choice kind
carries the *options* a participant chooses from, and a question of a matrix,
array or ranking kind carries *subquestions*, one per row of the matrix.  The
kind of a question is not written on the question but on a shared
``etude.question.type``, so the storage kind of an answer, the number of choices
it takes and the shape of the value it holds are declared once and reused by
every question of that type.

What a form serves is not the working copy it is edited in but the version
publishing froze from it.  Publishing snapshots the definition into an
``etude.form.version`` and the form serves that version; editing a published
form opens a draft version, so that the version being served is never altered
by an edit.  A response pins the version it was rendered against, so what an
answered response reads never changes under it, and a form follows the
``draft -> published -> closed`` lifecycle.

The definition is deliberately independent of the client that renders it and of
the module that consumes its answers: the definition is data, so the same form
is served by the Tryton client, by a public page and by an HTTP API, and the
modules of the group - logic, binding, collection, evaluation and the bridges to
the other modules of the monorepo - extend these models rather than restating
them.

See ``doc/index.rst`` for the module documentation and ``ETUDE.md`` in
``modules-cch/`` for the architecture of the whole group.
