Skip to content

Commit

Permalink
[IMP] clarify initial instructions, autogen directory if does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
xmo-odoo committed May 19, 2014
1 parent d326842 commit 5f7be30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
17 changes: 6 additions & 11 deletions doc/howto/howto_website.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,14 @@ Creating a basic module

In OpenERP, doing things takes the form of creating modules, and these modules
customize the behavior of the OpenERP installation. The first step is thus to
create a module:

.. todo:: output directory probably shouldn't be ``.``

.. todo:: ``oe`` v ``./oe``?
create a module: at the command-line, go to your server's directory and enter

.. code-block:: console
$ oe scaffold Academy .
$ ./oe scaffold Academy ../my-modules
.. patch::
:hidden:

This builds a basic module for you:
This will build a basic module for you in a directory called ``my-modules``
right next to your server's directory:

.. code-block:: text
Expand All @@ -49,7 +43,8 @@ This builds a basic module for you:
└── security
└── ir.model.access.csv
Ignore anything in the ``models`` and ``security`` directories for now.
.. patch::
:hidden:

.. todo::

Expand Down
4 changes: 3 additions & 1 deletion openerpcommand/scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ def directory(p):
expanded = os.path.abspath(
os.path.expanduser(
os.path.expandvars(p)))
if not os.path.exists(expanded):
os.makedirs(expanded)
if not os.path.isdir(expanded):
die("Directory %s does not seem to exist" % p)
die("%s exists but is not a directory" % p)
return expanded

def die(message, code=1):
Expand Down

0 comments on commit 5f7be30

Please sign in to comment.