[IMP] rdtraining: add links from enterprise wiki
Select links and pieces of information from Odoo Enterprise wiki
were copied over at the end Chap. 2 of the functional training.
These would be useful to have during the tutorial instead of at
the end of it.
closes odoo/documentation#1515
X-original-commit: a9bc16bec8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
parent
e4c963d7b6
commit
64fd4bbd0a
@ -63,12 +63,16 @@ Advanced topics
|
||||
|
||||
rdtraining/B_acl_irrules
|
||||
rdtraining/C_data
|
||||
rdtraining/D_mixins
|
||||
rdtraining/E_unittest
|
||||
rdtraining/J_reports
|
||||
rdtraining/K_dashboard
|
||||
rdtraining/N_security
|
||||
|
||||
* :doc:`rdtraining/B_acl_irrules`
|
||||
* :doc:`rdtraining/C_data`
|
||||
* :doc:`rdtraining/D_mixins`
|
||||
* :doc:`rdtraining/E_unittest`
|
||||
* :doc:`rdtraining/J_reports`
|
||||
* :doc:`rdtraining/K_dashboard`
|
||||
* :doc:`rdtraining/N_security`
|
||||
|
@ -21,12 +21,23 @@ Fetch the sources & configure git
|
||||
Install and configure git
|
||||
-------------------------
|
||||
|
||||
The very first step of the installation process is to install the `git version control system <https://git-scm.com/>`__
|
||||
because the Odoo source code is managed on GitHub. Once installed, you can set your name and email:
|
||||
The very first step of the installation process is to install the `git version control system <https://git-scm.com/>`_
|
||||
because the Odoo source code is managed on GitHub.
|
||||
|
||||
Git can be installed on `Linux <https://git-scm.com/download/linux>`_, `Windows
|
||||
<https://git-scm.com/download/win>`_ or `MacOS <https://git-scm.com/download/mac>`_.
|
||||
|
||||
If you're using the laptop provided to you by Odoo, Git should already be installed. If it is not,
|
||||
you can install it with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ sudo apt install git
|
||||
|
||||
Once installed, you can set your name and email:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ git config --global user.name "Your full name"
|
||||
$ git config --global user.email "xyz@odoo.com"
|
||||
|
||||
@ -43,7 +54,7 @@ authentication will allow you to connect to GitHub without supplying your userna
|
||||
password every time.
|
||||
|
||||
|
||||
The following instructions are based on the official `GitHub documentation <https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh>`__.
|
||||
The following instructions are based on the official `GitHub documentation <https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh>`_.
|
||||
|
||||
|
||||
Here is a step-by-step procedure:
|
||||
@ -104,9 +115,9 @@ Configure development repository
|
||||
--------------------------------
|
||||
|
||||
To contribute to Odoo's development you will need to
|
||||
`fork the repository <https://guides.github.com/activities/forking/>`__, create a branch containing
|
||||
`fork the repository <https://guides.github.com/activities/forking/>`_, create a branch containing
|
||||
your code in the fork and submit a
|
||||
`Pull Request <https://docs.github.com/en/github/getting-started-with-github/github-glossary#pull-request>`__
|
||||
`Pull Request <https://docs.github.com/en/github/getting-started-with-github/github-glossary#pull-request>`_
|
||||
to the Odoo repository.
|
||||
|
||||
If you are lucky enough to work at Odoo, the forks already exist. They are called
|
||||
@ -282,9 +293,9 @@ Log in to Odoo
|
||||
--------------
|
||||
|
||||
Open `http://localhost:8069/` on your browser. We recommend you use:
|
||||
`Firefox <https://www.mozilla.org/fr/firefox/new/>`__,
|
||||
`Chrome <https://www.google.com/intl/fr/chrome/>`__
|
||||
(`Chromium <https://www.chromium.org/Home>`__ the open source equivalent) or any other browser with
|
||||
`Firefox <https://www.mozilla.org/fr/firefox/new/>`_,
|
||||
`Chrome <https://www.google.com/intl/fr/chrome/>`_
|
||||
(`Chromium <https://www.chromium.org/Home>`_ the open source equivalent) or any other browser with
|
||||
development tools.
|
||||
|
||||
To log in as the administrator user, you can use the following credentials:
|
||||
@ -299,7 +310,7 @@ The Developer or Debug Mode gives you access to additional (advanced) tools.
|
||||
|
||||
This is useful for training and we assume that the user is in developer mode for the rest of the tutorials.
|
||||
|
||||
To activate the developer or debug mode you can follow the steps `here <https://www.odoo.com/documentation/user/general/developer_mode/activate.html>`__.
|
||||
To activate the developer or debug mode you can follow the steps `here <https://www.odoo.com/documentation/user/general/developer_mode/activate.html>`_.
|
||||
|
||||
Extra tools
|
||||
===========
|
||||
@ -346,7 +357,7 @@ Administrator tools for PostgreSQL
|
||||
-----------------------------------
|
||||
|
||||
You can manage your PostgreSQL databases using the command line as demonstrated earlier or using
|
||||
a GUI application such as `pgAdmin <https://www.pgadmin.org/download/pgadmin-4-apt/>`__ or `DBeaver <https://dbeaver.io/>`__.
|
||||
a GUI application such as `pgAdmin <https://www.pgadmin.org/download/pgadmin-4-apt/>`_ or `DBeaver <https://dbeaver.io/>`_.
|
||||
|
||||
To connect the GUI application to your database we recommend you connect using the Unix socket.
|
||||
|
||||
@ -361,8 +372,8 @@ Python Debugging
|
||||
When facing a bug or trying to understand how the code works, simply printing things out can
|
||||
go a long way, but a proper debugger can save a lot of time.
|
||||
|
||||
You can use a classic Python library debugger (`pdb <https://docs.python.org/3/library/pdb.html>`__,
|
||||
`pudb <https://pypi.org/project/pudb/>`__ or `ipdb <https://pypi.org/project/ipdb/>`__) or you can
|
||||
You can use a classic Python library debugger (`pdb <https://docs.python.org/3/library/pdb.html>`_,
|
||||
`pudb <https://pypi.org/project/pudb/>`_ or `ipdb <https://pypi.org/project/ipdb/>`_) or you can
|
||||
use your editor's debugger. To avoid difficult configurations in the beginning, it is
|
||||
easier if you use a library debugger.
|
||||
|
||||
@ -446,5 +457,51 @@ Here is a list of commands:
|
||||
limit_time_cpu = 9999
|
||||
limit_time_real = 9999
|
||||
|
||||
Now that your server is running, it's time to start
|
||||
Additional resources
|
||||
--------------------
|
||||
|
||||
Below are links to resources that could prove helpful during this tutorial.
|
||||
|
||||
Git
|
||||
~~~
|
||||
|
||||
- Atlassian has a set of `excellent tutorials <https://www.atlassian.com/git/tutorials/>`_.
|
||||
Particularly, how to `rewrite the history
|
||||
<https://www.atlassian.com/git/tutorials/rewriting-history>`_.
|
||||
- If the Atlassian tutorial does not work for you, W3schools offers a `very nice alternative
|
||||
<https://www.w3schools.com/git/>`_.
|
||||
- To visualize the effect of git commands on the commits graphs, play with this `interactive
|
||||
tutorial <https://learngitbranching.js.org/>`_.
|
||||
- If you want to read more about Github, their `documentation
|
||||
<https://docs.github.com/en/get-started/quickstart/hello-world>`_ includes a comprehensive
|
||||
introduction.
|
||||
|
||||
Python
|
||||
~~~~~~
|
||||
|
||||
- Don't forget about `Python official documentation <https://docs.python.org/3/>`_
|
||||
(and make sure to select the correct version at the top of the page!).
|
||||
- `The Hitchhiker's Guide <https://docs.python-guide.org/>`_ will teach you the good practices of
|
||||
Python.
|
||||
- If you have good experience of similar languages or just need a quick recall,
|
||||
`this guide <https://learnxinyminutes.com/docs/python3/>`_ is made for you.
|
||||
|
||||
Javascript
|
||||
~~~~~~~~~~
|
||||
|
||||
- You should find a tutorial that suits your level in this `"re-introduction" to JavaScript
|
||||
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript>`_.
|
||||
- If you just need a quick recall, `this one <https://learnxinyminutes.com/docs/javascript/>`_
|
||||
will do the trick.
|
||||
|
||||
(Postgre)SQL
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- If you are not familiar with PostgreSQL, `these exercises <https://www.pgexercises.com/>`_
|
||||
will teach you better than any long documentation.
|
||||
- Even though you shouldn't have to interact with it, you might be interested to know
|
||||
that Odoo uses `psycopg2 <https://www.psycopg.org/docs/usage.html>`_ to interact
|
||||
with its SQL backend.
|
||||
|
||||
Back to the training! Now that your server is running, it's time to start
|
||||
:ref:`writing your own application <howto/rdtraining/03_newapp>`!
|
||||
|
@ -139,22 +139,6 @@ commits you can just copy/paste your commit messages as the PR message.
|
||||
|
||||
.. image:: 16_guidelines_pr/media/pr_message.png
|
||||
|
||||
Additional Info for Odoo Staff
|
||||
==============================
|
||||
|
||||
Now that you know the basics, here are some more useful pages if you haven't seen them already:
|
||||
|
||||
- Our `welcome <https://github.com/odoo/enterprise/wiki/Welcome>`__ page has extra info about
|
||||
working at Odoo as well as additional
|
||||
`tutorials <https://github.com/odoo/enterprise/wiki/Welcome#3-technical-training>`__ that are
|
||||
both language and Odoo specific.
|
||||
- Once you are ready to start doing tasks, it is important to note that Odoo follows a
|
||||
`rebasing workflow instead of merging <https://www.atlassian.com/git/tutorials/merging-vs-rebasing>`__
|
||||
for your PRs.
|
||||
`This cheatsheet <https://github.com/odoo/enterprise/wiki/GIT-Cheatsheet#pull-request-flow>`__ describes
|
||||
how to do this flow. If you want to become more of a rebasing master, then
|
||||
`this tutorial <https://www.atlassian.com/git/tutorials/rewriting-history>`__ is extra useful.
|
||||
|
||||
Test on the runbot
|
||||
==================
|
||||
|
||||
|
@ -1,9 +1,14 @@
|
||||
:orphan:
|
||||
|
||||
.. _howto/rdtraining/D_mixins:
|
||||
|
||||
==================
|
||||
Advanced D: Mixins
|
||||
==================
|
||||
|
||||
Hopefully, this topic will be written soon :-)
|
||||
If you need to interface with common Odoo features such as the chatter, you can rely on
|
||||
:doc:`mixins <../../reference/backend/mixins>`.
|
||||
They are Odoo models exposing useful methods through inheritance.
|
||||
|
||||
To learn and play with mixins, visit `this repository <https://github.com/tivisse/odoodays-2018/>`_.
|
||||
This module for a plant nursery is training material developed for the OXP 2018. You don't need to
|
||||
code it on your side. But you can check the presentations in the :file:`/static/pdf` directory and
|
||||
play with the module to discover some magic features in Odoo.
|
||||
|
@ -1,9 +1,27 @@
|
||||
:orphan:
|
||||
|
||||
.. _howto/rdtraining/N_security:
|
||||
|
||||
====================
|
||||
Advanced N: Security
|
||||
====================
|
||||
|
||||
Hopefully, this topic will be written soon :-)
|
||||
Every day we hear about data leaks and attacks in the newspapers.
|
||||
We expect you to be aware and careful about how to avoid security breaches in your future
|
||||
developments.
|
||||
|
||||
You already defined new models in your training. Did you check the access rights and define record
|
||||
rules on it ? Are you sure your module is not an open door to SQL injections ? Did you use getattr
|
||||
or t-raw in your code?
|
||||
|
||||
- No or wrong access rules on models.
|
||||
- Introduction of public methods that should actually be private.
|
||||
- Wrong manipulation of access tokens.
|
||||
- No or wrong `ir.rules` (restriction rules) on models.
|
||||
- Introduction of SQL injections.
|
||||
- etc.
|
||||
|
||||
Please check this `presentation from Olivier Dony (odo)
|
||||
<https://docs.google.com/presentation/d/1oDINxPtHWz31V8-2W0h2u2ubaKgz9lmbyfx9DJI4lTw/edit>`_ about
|
||||
common mistakes that you should **absolutely** avoid in your future developments.
|
||||
Also, please always use this `security checklist
|
||||
<https://docs.google.com/presentation/d/1oDINxPtHWz31V8-2W0h2u2ubaKgz9lmbyfx9DJI4lTw/edit#slide=id.g2faad955b1_0_6>`_
|
||||
to double-check your development and avoid further embarrassing issues.
|
||||
|
Loading…
Reference in New Issue
Block a user