In simple Odoo module holding basic web component configuration and letting us test the web framework.
The example module is available online and can be downloaded using the following command:
git clone http://github.com/odoo/petstore
If you browse the petstore folder, you should see the following content.It should currently look like:
|-- images
| |-- alligator.jpg
| |-- ball.jpg
| |-- crazy_circle.jpg
| |-- fish.jpg
| `-- mice.jpg
|-- __init__.py
|-- oepetstore.message_of_the_day.csv
|-- __openerp__.py
|-- petstore_data.xml
|-- petstore.py
|-- petstore.xml
`-- static
`-- src
|-- css
| `-- petstore.css
|-- js
| `-- petstore.js
`-- xml
`-- petstore.xml
The module already holds various server customizations. We'll come back to these later, for now let's focus on the web-related content, in the static folder.
Files used in the "web" side of an Odoo module must be placed in a static folder so they are available to a web browser, files outside that folder can not be fetched by browsers. The src/css, src/js and src/xml sub-folders are conventional and not strictly necessary.
oepetstore/static/css/petstore.css
currently empty, will hold the CSS for pet store content
oepetstore/static/xml/petstore.xml
Mostly empty, will hold QWeb templates
oepetstore/static/js/petstore.js
Note-The most important part, contains the logic of the application (or at least its web-browser side) as javascript.
0 Comment(s)