Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.0 prototype #107

Merged
merged 24 commits into from
Oct 10, 2015
Merged

8.0 prototype #107

merged 24 commits into from
Oct 10, 2015

Conversation

foutoucour
Copy link
Contributor

Module Prototype

This module allows the administrator to prototype new features and export them as module.
Functional people can prepare the job for a developer who is left with the logic to implement
in addition to everything the prototype does not export yet.
See README.rst for more information.

Version 0.1

All the features are not implemented but the minimal is done.
With this version you can:

  • The set up of __openerp__.py is covered, description, maintainer, website, name, technical name...
  • Views and menus can be set through odoo and gathered in prototype. The files will be automatically generated and add to the data section of the __openerp__.py. Be aware some advanced feature as domain or context might still missing.
  • Dependencies can be set throught the Dependency page
  • Custom fields can be added. A file by model will be generated with all the fields of the model. The init.py files are updated accordingly. Be aware that some features are not implemented yet, as the domain, the context.

This version should be enough for:

  • set up the client module
  • create a new field in a view.

Features that you might expect in next version:

  • better generation of fields (many2many fields, domain, context)
  • Generation of data and demo data files.
  • Security files (rules, ir.model.access.csv)
  • __openerp__'s description editing README.rst and index.html
  • module screenshots

Version 0.2

  • Renamed from prototype to module_prototyper as discussed in [prototype] rename module #108
  • menu in Settings that gather element used to create a prototype (menu views, views, fields)

Known bugs

  • icon file extension might be wrong. The extension is hard coded for now. It is planned add Document as dependency to handle it.

Hope it helps,
Jordi

@coveralls
Copy link

Coverage Status

Coverage increased (+6.84%) when pulling 972d2f2 on savoirfairelinux:8.0-prototype into 825a26d on OCA:8.0.

@coveralls
Copy link

Coverage Status

Coverage increased (+6.78%) when pulling 1004de9 on savoirfairelinux:8.0-prototype into 825a26d on OCA:8.0.

from . import (
models,
wizard
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use four lines when you can use 2?

@max3903
Copy link
Member

max3903 commented Dec 31, 2014

#108

@foutoucour
Copy link
Contributor Author

test failed because of base_field_serialized. It is out of the scope of this pull request.

help=('The Module Name will be used as the displayed name of the '
'exported module.')
)
summary = fields.Char('Summary', required=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a help option

@coveralls
Copy link

Coverage Status

Coverage increased (+6.52%) to 51.78% when pulling 95da17a on savoirfairelinux:8.0-prototype into 825a26d on OCA:8.0.

@max3903
Copy link
Member

max3903 commented Feb 7, 2015

Travis is complaining about a Flake8 configuration:
UnboundLocalError: local variable 'local_dir' referenced before assignment

No PEP8 errors for this module so
👍

Maxime Chambreuil and others added 16 commits October 9, 2015 11:50
[FIX] Use human name and english category name for manifest

[IMP] multi line notes, unprefix names, pep8 py files

[IMP] whitespace cleanup in templates

[FIX] base models get _name, custom get _inherit

flake fix

add missing spaces

prevent crash on menus with no action

switch GPL-2 to LGPL-3

generate license headers with license name

fix pep/flake errors in generated files

add m2m and relation field options in fields
[FIX] Typos

[IMP] application = True in module manifest
[FIX] other licenses, return lines as well

[FIX] license not shown in __oe__

[FIX] unprefix more names, try to get _name/_inherit right [IMP] group by module in zip

[FIX] fix category and summary being on same line

[FIX] fix export test

[IMP] add tabs for reports/security/workflow/data + partial data/demo generation

unprefix model names in __init__

[FIX] fix data file names in __openerp__.py

[IMP] move Data&Demo after Interface in view

[FIX] unprefix view file names

[IMP] remove prefixes from field attrs in views

[FIX] encode files in zip to utf-8, remove trailing comma in menu groups

remove unused variable in tests

remove AGPL3 or later from license choices: not in base module choices
[IMP] Add OCA as an author

[IMP] Add Bug Tracker section in description

[IMP] Update description template

[ADD] Initial version of prototype

[IMP] Add wizard for API version and templates. Update translation file

[ADD] Security template files

[ADD] Filters for data and demo data
[IMP] prototype: Switched to v8 api.

[IMP] prototype: renamed the templates to avoid confusion with pep8 tests.

[IMP] prototype: renamed some fields in prototype.py.

[IMP] prototype: implemented the process to create the zip file to export.

[IMP] prototype: worked on the generation of __openerp__.py and __init__.py files from the prototype.

[IMP] prototype: pep8

[IMP] prototype: added more comments.

[IMP] prototype: worked on fields.

[IMP] prototype: implemented the generation of files from models/model_name.py.template and models/init.py.template

[IMP] prototype: first work on implementation of generations of views.

[IMP] prototype: improved the arch section in model_view.xml.template

[IMP] prototype: Reviewed the names of many2many from plurials to name_ids.

[IMP] prototype: added menus.

[IMP] prototype: typo in templates/8.0/views/model_view.xml.template

[IMP] prototype: improved template with adding extension to header.template to ease management of file with licence header.

[IMP] prototype: prototype.prototype demo data

[IMP] prototype: worked to get the views and menus properly generated. Added actions to model_menus.xml.template.

[IMP] prototype: should fix pep8 in model_name.py.template.
I propose to add inline comments for the following reason:

General understanding is promoted when reading the source files as probablyt the main entry point for a developer.
js,css,qweb are taken from other manifests I've seen. They are explained in the link. I think completedness of the manifest scaffold also helps reduce ambiguity about it.

Lastly, I introduced newlines for better readability and grouping.

I hope these changes, well (marginally) improve the usefulness of this great module.
[FIX] URL

[FIX] URL to issue

[FIX] Typo

[FIX] Typo
[IMP] prototype: no more bug when no icon, commented no implemented page in the view.

[IMP] prototype: better management of special cases.

[IMP] prototype: prototype.py removed print statement and shadowing of "fields".

[IMP] prototype -> module_prototyper

[IMP] module_prototyper: gathered menuitems that is helpfull to create a prototype under the menu 'Module Prototypes'

[IMP] module_prototyper: more comment and docstrings.

[IMP] module_prototyper: translations.

[FIX] module_prototyper: pep8

[IMP] update module_prototyper:

* pump up the version of the module to 0.3
* replace ir.ui.model by ir.ui.view in generated xml views
* improve pep8 compatibility of generation of models

[IMP] update module_prototyper: update of README with versions.
[FIX] license field
[IMP] Add template README.rst as default description

[FIX] PEP8 errors

[IMP] Take reviews into account
[FIX] Use human name and english category name for manifest

[IMP] multi line notes, unprefix names, pep8 py files

[IMP] whitespace cleanup in templates

[FIX] base models get _name, custom get _inherit

add missing spaces
[FIX] PEP8 errors
[FIX] Get default description
[IMP] README.rst

[IMP] Provide Jinja2 requirement
[IMP] Add license badge in description
[FIX] Formatting

[FIX] Version and typos
@max3903
Copy link
Member

max3903 commented Oct 9, 2015

@pedrobaeza Rebase done. Thanks for merging!

* customize your instance by adding fields and creating inherited views
* create your menu items and their window actions
* prepare your data and demo data by creating filters
* create your own groups with access rights and record rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 steps are not yet covered by the module, so you should remove them from the usage until the module get support for them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are covered, a user can perform those steps.

Data, demo data and security are not exported yet, that's why they appear in the roadmap section.

@pedrobaeza
Copy link
Member

@max3903, please attend remarks from @yvaucher and me and then I merge.

@max3903
Copy link
Member

max3903 commented Oct 10, 2015

@pedrobaeza I think @yvaucher's comments have all been answered.

pedrobaeza added a commit that referenced this pull request Oct 10, 2015
@pedrobaeza pedrobaeza merged commit d076cfa into OCA:8.0 Oct 10, 2015
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (10.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.