Git Product home page Git Product logo

bobtemplates.odoo's People

Contributors

adrienpeiffer avatar chermed avatar pre-commit-ci[bot] avatar rennerocha avatar rousseldenis avatar sbejaoui avatar sbidoul avatar thomasbinsfeld avatar xavier-bouquiaux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bobtemplates.odoo's Issues

Is there a way to hook additional templates?

Given that it's likely that not all my contributions are going to be welcome, is there a sensible way (or can such be created) to easily write custom extensions to acsone/bobtemplates.odoo?

Regenerating projects or modules

@sbidoul
Good job thanks!

FYI the following python pure library cookiecutter save a configuration file with your command line choices.
This allow you to regenerate the full project meta-files with new changes/updates E.g. .travis.yml, .tox

For the case of this project, maybe we could use this technical to reuse a configuration file to create a new module based on configuration stored as default value.

Question: The final focus of this project... Is create a scaffold (just create modules) or a cookiecutter (create full project too)?

does it support windows?

run on windows10 and python27:

(venv) c:\Users\qq470647251\Desktop>mrbob bobtemplates.odoo:addon

File "d:\p\odoo-11.0\venv\lib\site-packages\bobtemplates\odoo\hooks.py", line 37, in _delete_file
os.remove(path)
WindowsError: [Error 3] : u'c:\Users\qq470647251\Desktop\test/README.rst.oca'

New template: migration

What about a new migration template that would generate migration script for a given module?
When being in the current module's directory: mrbob bobtemplates.odoo:migration

It would ask for:

  • new module version
  • use openupgrade? (yes/no)
  • pre-migrate? (yes/no)
  • post-migrate? (yes/no)

And then it would:

  • generate the migrations/{version_number}/(pre/post)-migrate.py file(s)
  • import logging and add a default _logger.info() message in the migrate method
  • if the use of openupgrade is selected:
    • import openupgrade
    • add the @openupgrade.migrate(use_env=True) decorator and use the env variable in the migrate method
    • add openupgradelib to the external dependencies of the manifest
  • change the version of the module accordingly

If it's relevant, the same could be done for pre/post-init hooks (I can write a separate issue for that).

README question is confusing

--> Generate README (non-oca) or fragments (oca) ? [y]: oca
ERROR: Value must be a boolean (y/n)
--> Generate README (non-oca) or fragments (oca) ? [y]: 

Would docstring variables be accepted?

among others pylint requires / strongly suggests it and could enforce good practice. Not 100% sure if a sensible way of dealing with docstrings can be found in an odoo context, but at least if inherit == False, it could be made required.

Encourages thinking before doing ... ๐Ÿ˜‰

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.