Commit Graph
81 Commits
Author SHA1 Message Date
Sébastien Mottet (oms) 021166b31b [DOC] A doc page for the extract API
This doc page details the extract API and has the following structure:

- Service explanation.
- Expected successful flow
- Description of the 3 routes (request and response structure)
	- /parse
	- /get_results
	- /validate
- Hint for integration testing

closes odoo/odoo#61991

X-original-commit: af486cb87a0086d29ea45a31f3667458ad73e7fd
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2020-11-19 10:16:16 +00:00
Swapnesh Shah b07f2d31d2 [FIX] *: update document links
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#60228

X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-19 07:03:01 +00:00
Swapnesh Shah b4795e6d3b [FIX] doc: correct link for runbot
Following the last summer runbot update, the URLs have changed

closes odoo/odoo#59241

X-original-commit: 7eaec4b2693b9aea67cfbde5d19dda152fd9f395
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-06 10:36:27 +00:00
Raf Geens cfe2d22999 [ADD] doc: port the searchbar from user to dev docs
The developer documentation already has a search functionality via Sphinx if
you use the right URL, but it was not exposed in the frontend. This commit ports
 the search bar from the user documentation.

Original commits: 17fc4219bd24e8993fc5ab3c00d9979f87a45e84 (rim) and
52e49eda472963e929ec7b004eae20c514364403 (kts) from
https://github.com/odoo/documentation-user/

closes odoo/odoo#58213

X-original-commit: b38059caf59a3fbd67989d89317cfdc9f3be35a3
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-09-22 11:42:36 +00:00
Xavier Morel 96a3265118 [FIX] doc: remove <act_window> and <report>
* remove <report> and <act_window> form the backend tutorial
* remove documentation for <report> in the report doc

Also various fixes and improvements:

* add ACL to the wizard in the tutorial, as transients now require ACLs
* fix indentation & spacing in rST
* reword a few bits
* improve styling of footnote references (and recompile stylesheet
  with recent lessc which apparently changes its output formatting
  quite a bit)
2020-07-28 13:03:13 +00:00
Xavier Morel e1df56f25c [FIX] doc: meta directive support
The translator defined a `meta` attribute, however:

* it was static so couldn't be expanded using the `meta` directive,
  move to instance attribute, and create an `add_meta` method which
  adds some indentation (for a cleaner HTML output)
* the `meta` directive itself was not supported by the translator
* turns out HTMLWriter just removes the first to entries of `meta` as
  "cleanup", which explains why we had to duplicate it in the template
  - therefore pad the `meta` list and remove entries from template
  - move front to linktags, that seems more relevant

closes odoo/odoo#49699

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-17 08:48:21 +00:00
Adrian Torres 5952928b42 [REM] *: remove various unused import shims
Before this commit, a lot of leftover import shims existed in the
codebase for py2-py3 compatibility, these are no longer needed since
Odoo 13.0+ doesn't support Python 2 anymore and is (finally) in EOL.

With this commit, these shims are dropped, making the code cleaner,
easier to read and with one less dependency.

Queue -> queue -> py2-py3 compatibility
xmlrpclib -> xmlrpc.client -> py2-py3 compatibility
ConfigParser -> configparser -> py2-py3 compatibility
itertools.izip_longest -> itertools.zip_longest -> py2-py3 compatibility
urllib -> urllib.request -> py2-py3 compatibility
__builtins__ -> builtins -> py2-py3 compatibility
_winreg -> winreg -> py2-py3 compatibility

mock -> unittest.mock -> merged into CPython

The debian/fedora packages and requirements.txt have been updated accordingly

closes odoo/odoo#44601

Related: odoo/enterprise#8141
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-01 12:45:40 +00:00
fw-bot 13c326f6dc [FIX] doc: increase requirement
Partial cherry pick of e4b75149f7
Sphinx 1.6.7 is the minimum in debian stable and ubuntu LTS

X-original-commit: 516e7854fd61c75865bb444e3614cad20283275e
2020-03-10 15:24:11 +01:00
Martin Trigaux da66138f58 [IMP] doc: restore canonical URL
Was added at 958f9106dd but lost during design change

closes odoo/odoo#42061

X-original-commit: 560dba5313c5ca5265190dacc3bce7cbe509d30a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-12 14:06:34 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
mreficent 41c434cd5d [FIX] v13 urls
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-03 12:48:09 +00:00
Julien Castiaux a7a63bdb4a [REF] doc: remove deprecated modules
[PEP 594] is going deprecates the `imp` standard modules in
PY3.8 in order to completely remove them in PY3.10.

The `imp` module provides the `new_module` function. It returns a new
module created solely using its name. The `types.ModuleName` is a
drop-in replacement.

Task: 2003936

[PEP 594]: https://www.python.org/dev/peps/pep-0594/\#imp

closes odoo/odoo#36463

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 08:10:51 +00:00
Martin Trigaux 40421be73c [MERGE] Forward port of saas-12.2 to saas-12.3 up to cf8e74a1a7
closes odoo/odoo#34907

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 11:44:38 +00:00
Martin Trigaux cf8e74a1a7 [MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34
closes odoo/odoo#34901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 09:14:17 +00:00
Martin Trigaux 30f760d534 [FIX] doc: adapt header to the new eLearning
closes odoo/odoo#34837

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 14:44:38 +00:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Christophe Simonis cfe0523714 [MERGE] forward port branch 12.0 up to 8f21148e1a 2019-05-31 14:37:38 +02:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Christophe Simonis cc3a2c1bf3 [MERGE] forward port branch 12.0 up to e11bacfe51 2019-05-09 21:07:44 +02:00
Xavier Morel 2b28dd89b8 [FIX] doc: Sphinx 2.0 compatibility
* order of parameters to translator swapped
* context['meta'] always set, defaulting to None if the document has no
  metadata
* [3.0 prep] modifying script_files deprecated, use add_javascript /
  add_js_file
* remove deprecated call to l_ (which was useless anyway as the documentation
  is not translated)

Fixes #33107

closes odoo/odoo#33187

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-06 13:55:44 +00:00
Xavier Morel 7b00776c6c [FIX] doc: error & potential warnings
* properly handle 3-args version of odoo.define(): just ignore the
second argument, pretty much the only use-case is dynamic
dependencies (otherwise it should be using static require() calls)
so there's little the extractor can do
* fix an issue with sys.path ordering meaning sphinx would pick up an
odoo installed into the current virtualenv (editable or not) over
the local copy it's part of

closes odoo/odoo#33538

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-21 14:19:13 +00:00
David Monjoie 7cb64b5e93 [REF] doc: promisify doc examples
Also remove a file on async stuff as its content is outdated, and
actually not used.
2019-03-06 20:07:17 +01:00
Xavier Morel cca26f7952 [FIX] doc: workarounds for weirdo code & refs
Make UnknownNS more capable (of giving no fucks) so the documentation
builder blows up less on weird-ass code at module toplevels.

UnknownNS should probably be split out from NSDoc though, that requires
odd workarounds in `__getitem__`.
2019-02-18 08:55:57 +00:00
Xavier Morel fe0a27d240 [FIX] doc: P2 bits forgotten in 758382b3a7
closes odoo/odoo#29438
2018-12-12 10:36:37 +00:00
Adrian Torres 758382b3a7 [REM] pycompat: remove python 2 shims and helpers
Odoo no longer supports python 2, thus some of these helpers can and
have been replaced by python 3 built-ins, therefore there is no need for
them to stay defined.

The removed helpers are:
    * izip, imap and ifilter
    * unichr, text_type
    * implements_to_string, implements_iterator
    * string_types, integer_types
    * to_native

The python 2 shims have also been removed, and only the python 3 helpers
have been kept, because they can still be usable (i.e. accepting
both bytes and str for functions that can only accept one of the two)

[REM] pyjsparser: remove PY3 shims

They're no longer necessary as Odoo doesn't officially support python 2
anymore.

closes odoo/odoo#28519
2018-11-29 09:28:17 +00:00
Adrian Torres 52f5528cfb [REF] *: replace deprecated pycompat helpers for builtins
This commit replaces calls to pycompat helpers that were intended for
python 2 <-> python 3 interoperability for python 3 builtins, as python
2 is no longer officially supported by Odoo.

This includes:
    * calls to imap/izip/ifilter replaced by map/zip/filter
    * uses of text_type replaced by str
    * uses of unichr replaced by chr
    * calls to implements_to_string, implements_iterator removed
    * string_types and integer_types replaced by str, int respectively
    * calls to to_native replaced by calls to to_text

This is done in preparation to the removal of these deprecated helpers
in the following commit.
2018-11-29 09:28:17 +00:00
Christophe Simonis 5e055a2afd [MERGE] forward port branch saas-11.4 up to f6ca72b3ce 2018-11-02 10:52:55 +01:00
Christophe Simonis ee0ff262f0 [MERGE] forward port branch saas-15 up to 953dfe92c2
closes odoo/odoo#28255
2018-10-29 14:16:45 +00:00
xmo-odoo 71cb425d00 [FIX] doc: translator under Sphinx 1.5
In Sphinx 1.5 (fairly specifically), the warner thing takes a `type` kw,
and building the doc blows up if that parameter is not provided.
2018-10-25 11:08:35 +02:00
Martin Trigaux a0050c323c [FIX] doc: backport of ac37ca39ea to 10.0
To be compatible with sphinx >= 1.8
2018-10-23 16:17:58 +02:00
Martin Trigaux 27cc2ae3a9 [FIX] doc: backport of 9a07a4599c to 10.0
To be compatible with sphinx >= 1.6
2018-10-23 16:17:58 +02:00
Xavier Morel 35bb8304ab [FIX] doc: building on Python 3.6.7, 3.7.1, possibly 2.7.???
https://bugs.python.org/issue33899

tokenize.generate_tokens was altered to match the C tokenizer,
previously it would end the tokenization with just an ENDMARKER, in the
titled releases it adds a NEWLINE before the ENDMARKER if none is
present, this broke the parsing of jsdoc type specifications as Python's
tokenizer is used under the cover.

closes odoo/odoo#28056
2018-10-23 10:39:22 +00:00
mreficent dddd4072de [FIX] v12 urls
Was still pointing to old links

closes odoo/odoo#27443
2018-10-09 13:44:38 +00:00
Xavier Morel 00eefae98d [FIX] doc: implement delegation/inheritance in JS documenter
Else website_sale_wishlist.wishlist blows up the documenter:
``events`` is set to sAnimations.Class.events but that is not an "own
property" of sAnimation.Class, it is instead inherited from Widget.

If delegation is not implemented, the value resolves to <nothing>,
which blows up when trying to set its name to the "property name" (by
calling ``set_name``).
2018-10-01 17:31:41 +02:00
Xavier Morel ac37ca39ea [FIX] doc: github_link compatibility with Sphinx 1.8 2018-09-25 16:28:18 +02:00
Xavier Morel 8eb8495710 [FIX] doc: backport of ac37ca39e
github_link compatibility with Sphinx 1.8

Backport to 11.0
2018-09-28 12:23:41 +02:00
Xavier Morel 0e307f8280 [FIX] doc building and warnings
doc:

* fix incorrect doc comments (documenting params which don't exist)
* correctly quote non-refs
* fix role label syntax (backticks must be escaped)
* add newline to fix warning

JS doc parser:

* fix handling of already-resolved objects
* fix handling of non-string properties (e.g. foo[0] at module toplevel)
* don't blow up if subject of .include call can't be resolved (just ignore)

Others:

* add translator support for ``problematic`` node (apparently used for
  some refs by recent Sphinx)
2018-08-27 12:55:21 +02:00
Xavier Morel a56372a4ca [FIX] various broken JS docstrings
Resulting in sphinx warnings or ill-formatted doc all the way to the
doc not building at all.
2018-07-24 12:06:13 +02:00
Martin Trigaux a87dc3111c [IMP] doc: specify the API examples are in python2
Odoo 11 is python 3 but the xmlrpc interface works with python 2 too.
The example should probably be migrated to use python 3.
In the meantime specify exactly these examples are python 2 to avoid the
confusion.

Fixes #24232
2018-04-17 13:59:50 +02:00
Xavier Morel 4e784adbf7 [FIX] doc: non-module JS autodocumenters
Also when there is both a docstring and directive-level content put
the docstring first. That seems to match what Sphinx's autodoc does
and looks less odd.

Possible future improvement: a parameter to suppress the docstring?
Possibly a way to reorder the non-docstring content (e.g. members
documentation)?
2018-04-05 12:31:27 +02:00
Christophe Simonis 4715d7e35a [MERGE] forward port branch saas-15 up to 0d55241185 2018-03-19 19:29:58 +01:00
Jeremy Kersten 4252cd7053 [FIX] doc: update footer links
Synchronize footer from odoo.com with the documentation.
2018-03-13 15:51:15 +01:00
Jeremy Kersten 7179008ffa [FIX] doc: fix link to our website
Remove wrong slash trailing

Now, in V11, matching of page are done on the exact name.

Previously, the error was transparent because we was using a
dedicated controller that allow trailing slash.
https://github.com/odoo/odoo/blob/11.0/odoo/http.py#L936

https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html

    http://example.com/foo/ (with trailing slash, conventionally a directory)
    http://example.com/foo (without trailing slash, conventionally a file)

    Google treats each URL above separately     (and equally) regardless of
    whether it’s a file or a directory, or it contains a trailing slash or
    it doesn’t contain a trailing slash.

    Different content on / and no-/ URLs okay for Google, often less ideal for users

   Special case for homepage
       Rest assured that for your root URL specifically,
       http://example.com is equivalent to
       http://example.com/ and can’t be redirected even if you’re Chuck Norris.
2018-02-23 10:36:15 +01:00
Xavier Morel f1143b4073 [FIX] doc: tokenization of nested generics in JS docstrings
With more than 1 level of generic type, the "closure" of generic
parameters would get tokenized by python as a single right shift (>>)
rather than two gt (>, >) leading to our own tokenizing pass getting
lost and blowing up.

Fix by explicitly recognizing and splitting (>>) into (>, >). We could
consider writing the entire tokenizer ourselves instead of
post-processing Python's but given the entire post-processing function
is currently shorter than just Pythons' tokenizer's regexes...

Anyway issue found by vsc while trying to write better docstrings.
2018-02-19 13:22:58 +01:00
Xavier Morel f7323dbe23 [FIX] doc: informal sub-params
Revert 6cb12273e2 which reverted
08d48b0fff.

Issue was the support for sub-parameters (aka @param {type} foo.bar)
where the "parent" parameter was not formal (only present in a
function's docstring, but not in the function's parameters list),
subtype creation would fail to find a root parameter to attach the
sub-parameter to.

This has not actually been fixed, but for the specific case where the
formal parameters list is *completely empty* we fall back on a list of
the docstring's parameters, which works well enough for this case.
2018-01-10 12:36:58 +01:00
Miquel Raïch a578531ca3 [FIX] v11 urls
Was still pointing to old links

Closes #21590
2017-12-12 17:19:01 +01:00
stefanorigano c201cf2b77 [IMP] doc: revamp documentation design
A comprehensive theme’s revamp, details:

=== New features ===
- Show titles permalink markers on hover
- “Scrollspy” effect for the sidebar

=== Fixes ===
- Solve an issue causing the sidebar to flicker on scroll
- Hide the sidebar if less then two links

=== Design ===
- Improve typography vertical rhythm and line height
- Visually increase separation between sections
- Review alerts and <dl> design
- Reduce cover’s size
- Reduce overall paddings/margins.

Closes #21304
2017-12-01 10:51:53 +01:00
xmo-odoo b62bb5add2 IAP doc: tutorial (#20317)
* [ADD] doc: iap tutorial

Should be easier to approach than the raw APIDoc. 
contains:
- overview of the flow
- tutorial (coalroller) with guidelines
- technical description of objects/helpers
2017-11-02 19:06:33 +01:00
Xavier Morel e8dc72fd69 [FIX] doc: handle unknown browser globals better
Before this, if a new global was added to JS code (module toplevel,
function bodies are not considered) it would blow up when attempting
to resolve variable refs & uses.

Make the toplevel scope a defaultdict such that if e.g. a "foo" is
looked up in a module but not a local variable of that module it's
assumed to be an UnknownNS object (from which further UnknownNS can be
deref'd).
2017-10-30 16:16:41 +01:00