Git Product home page Git Product logo

generateds-odoo's Introduction

Odoo generateDS plugin: generate Odoo abstract model mixins and fields from your xsd schemas

This plugin has been developed by Raphaël Valyi from Akretion and was derived from the official Django generateDS plugin that is documented here: http://www.davekuhlman.org/generateDS.html#django-generating-models-and-forms

This Odoo plugin generate only models. Odoo is able to generate views dynamically alone and we also made the dedicated spec_driven_model Odoo module to help with views. You can read how it evolved from the Django plugin by looking at the commits log.

Disclaimer: we know this code doesn't really look like modern Python. But this is an assumed choice: we prefer not changing the code too much from the original Django plugin so if generateDS evolves it will be easier to follow the changes here.

Although, there are likely other configurations that will work, one reasonably simple way is the following:

  1. Install generateDS:

    $ pip install generateDS
    
  1. Download the source distribution of generateds-odoo with the following:

    $ git clone https://github.com/akretion/generateds-odoo
    
  2. Change directory to the django directory (i.e. the directory containing this file):

    $ cd generateds/django
    
  3. In that directory, either, (a) create, a symbolic link to generateDS.py:

    $ ln -s ../generateDS.py
    

    Or, (b) copy generateDS.py to that directory:

    $ cp ../generateDS.py .
    
  4. In that directory, Run gends_run_gen_odoo.py. For example:

    $ # Brazilian electronic invoice:
    $ python3 gends_run_gen_odoo.py -f -l nfe -x 4_00 -e '^ICMS\d+|^ICMSSN\d+' -d . -v /tmp/generated/schemas/nfe/v4_00/leiauteNFe_v4.00.xsd
    $
    $ # UBL 2.3 invoice:
    $ python3 gends_run_gen_odoo.py -f -l ubl -x 23 -d . -v /home/rvalyi/DEV/UBL-2.3/xsd/maindoc/UBL-Invoice-2.3.xsd
    

If the above ran successfully, it should have created these files:

leiauteNFe_v400lib.py
UBL-Invoice-23lib.py

generateds-odoo's People

Contributors

rvalyi avatar gabrielcardoso21 avatar cclauss avatar mileo 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.