[IMP] clarify initial instructions, autogen directory if does not exist
This commit is contained in:
parent
d3268420ae
commit
5f7be30a2f
|
@ -20,20 +20,14 @@ Creating a basic module
|
||||||
|
|
||||||
In OpenERP, doing things takes the form of creating modules, and these modules
|
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
|
customize the behavior of the OpenERP installation. The first step is thus to
|
||||||
create a module:
|
create a module: at the command-line, go to your server's directory and enter
|
||||||
|
|
||||||
.. todo:: output directory probably shouldn't be ``.``
|
|
||||||
|
|
||||||
.. todo:: ``oe`` v ``./oe``?
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ oe scaffold Academy .
|
$ ./oe scaffold Academy ../my-modules
|
||||||
|
|
||||||
.. patch::
|
This will build a basic module for you in a directory called ``my-modules``
|
||||||
:hidden:
|
right next to your server's directory:
|
||||||
|
|
||||||
This builds a basic module for you:
|
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
|
@ -49,7 +43,8 @@ This builds a basic module for you:
|
||||||
└── security
|
└── security
|
||||||
└── ir.model.access.csv
|
└── ir.model.access.csv
|
||||||
|
|
||||||
Ignore anything in the ``models`` and ``security`` directories for now.
|
.. patch::
|
||||||
|
:hidden:
|
||||||
|
|
||||||
.. todo::
|
.. todo::
|
||||||
|
|
||||||
|
|
|
@ -120,8 +120,10 @@ def directory(p):
|
||||||
expanded = os.path.abspath(
|
expanded = os.path.abspath(
|
||||||
os.path.expanduser(
|
os.path.expanduser(
|
||||||
os.path.expandvars(p)))
|
os.path.expandvars(p)))
|
||||||
|
if not os.path.exists(expanded):
|
||||||
|
os.makedirs(expanded)
|
||||||
if not os.path.isdir(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
|
return expanded
|
||||||
|
|
||||||
def die(message, code=1):
|
def die(message, code=1):
|
||||||
|
|
Loading…
Reference in New Issue