Coder Social home page Coder Social logo

odooenv's Introduction

odooenv

Tool to administrate Odoo environments

Moldeo Interactive (c) 2014-2018 Cristian S. Rocha [email protected]

This code is distributed under the MIT license.

Introduction

OdooEnv is a python based environment manager. It is a derivative from OERPenv which exists in "https://launchpad.net/oerpenv". But when OpenERP was renamed to Odoo, we changed the OERPEnv to OdooEnv. We also changed the source repository, changing it from launchpad to github.

Installation

Using PIP installer (pip needs to be installed)

 pip install odooenv

Usage:

The odooenv command line is available with the following sub-commands:

	usage: odooenv [-h]
		       
		       {init,update,create,add,install,list-installables,list-addons,enable,disable,dummy,test,client,search,show}
		       ...

	optional arguments:
	  -h, --help            shows this help message and exits

	subcommands:
	  The Odoo environment administrator helps you administrate Odoo
	  environments. You can use the following commands.

	  {init,update,create,add,install,list-installables,list-addons,enable,disable,dummy,test,client,search,show}
				commands
	    init                Initializes an environment in the work path or in the
				declared path.
	    update              Updates sources.
	    create              Creates a new python environment.
	    add                 Adds a branch to the sources list.
	    install             Installs all the required software in the default environment. The packages to be installed need to be declared 
				in the environment file. 
	    list-installables   Lists all available applications in sources.
	    list-addons         Lists available addons in sources. Shows all addons if
				not filter expression declared.
	    enable              Enables addons on the environment. Creates a symbolic
				link.
	    disable             Disables addons on the environment. Removes a symbolic
				link.
	    dummy               Creates a dummy addon. Useful for creating a new addon from scratch.
	    test                Executes the server in test mode for this addon.
	    client              Executes the server in test mode for this addon.
	    search              Searchs addon with this object.
	    show                Shows addon information.

All configurations are stored in the environment.conf file. You can setup it by hand or by using the available commands listed above.

Testing a module:

To create a simple Odoo instance you need to run the following commands in your work directory.

$ odooenv init odoo_env
$ cd odoo_env
$ odooenv install
$ odooenv list-addons

Search for an addon to test, like hr_attendance

$ odooenv enable hr_attendance
$ odooenv test hr_attendance

In case you want to run the server, you only need to execute:

$ odooenv server-start --debug

The server should be running and you can start working with Odoo by launching your browser and pointing it to the appropiate port (commonly 8069)

Develop a new addon not from zero:

If you need test more than one module, or you want develop a new addon you can create a dummy addon in the following way:

$ odooenv dummy hr_test

In the output you can find the source path. There you can found the openerp.py file. Append the modules you want to test in the 'depends' field, in this example will use hr_attendace and hr_contract. If you done all right you can execute the follwing command without errors:

$ odooenv enable hr_test

Then you can execute the server in mode test again, for the new module.

$ odooenv test hr_test

Searching for an object in source code:

To search the source code of a code you can use the command 'search'.

Display addon information:

To show addon information, like description, declarated objects and path to the source you can use the command 'show'.

odooenv's People

Contributors

morrillo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.