forked from OCA/server-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix template description being indented
[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
- Loading branch information
Vincent Vinet
authored and
Maxime Chambreuil
committed
Oct 9, 2015
1 parent
4ac7556
commit 60f327b
Showing
14 changed files
with
402 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,67 +21,70 @@ | |
############################################################################## | ||
|
||
|
||
def get_default_description(self): | ||
""" | ||
Extract the content of default description because the text is very huge | ||
in module_prototyper model | ||
""" | ||
return """ | ||
Module name | ||
=========== | ||
DEFAULT_DESCRIPTION = """ | ||
Module name | ||
=========== | ||
This module was written to extend the functionality of ... to support ... | ||
and allow you to ... | ||
This module was written to extend the functionality of ... to support ... | ||
and allow you to ... | ||
Installation | ||
============ | ||
Installation | ||
============ | ||
To install this module, you need to: | ||
To install this module, you need to: | ||
* do this ... | ||
* do this ... | ||
Configuration | ||
============= | ||
Configuration | ||
============= | ||
To configure this module, you need to: | ||
To configure this module, you need to: | ||
* go to ... | ||
* go to ... | ||
Usage | ||
===== | ||
Usage | ||
===== | ||
To use this module, you need to: | ||
To use this module, you need to: | ||
* go to ... | ||
* go to ... | ||
For further information, please visit: | ||
For further information, please visit: | ||
* https://www.odoo.com/forum/help-1 | ||
* https://www.odoo.com/forum/help-1 | ||
Known issues / Roadmap | ||
====================== | ||
Known issues / Roadmap | ||
====================== | ||
* ... | ||
* ... | ||
Credits | ||
======= | ||
Credits | ||
======= | ||
Contributors | ||
------------ | ||
Contributors | ||
------------ | ||
* Firstname Lastname <[email protected]> | ||
* Firsname Lastname <[email protected]> | ||
Maintainer | ||
---------- | ||
Maintainer | ||
---------- | ||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
This module is maintained by the OCA. | ||
This module is maintained by the OCA. | ||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
To contribute to this module, please visit http://odoo-community.org.""" | ||
|
||
To contribute to this module, please visit http://odoo-community.org.""" | ||
|
||
def get_default_description(self): | ||
""" | ||
Extract the content of default description because the text is very huge | ||
in module_prototyper model | ||
""" | ||
return DEFAULT_DESCRIPTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# -*- encoding: utf-8 -*- | ||
# ############################################################################# | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# This module copyright (C) 2010 - 2014 Savoir-faire Linux | ||
# (<http://www.savoirfairelinux.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
BASE_GPL = """ | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the {name} as | ||
published by the Free Software Foundation{version}. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the {name} | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
""" | ||
|
||
|
||
GPL3 = "GPL-3" | ||
GPL3_L = "GPL-3 or any later version" | ||
LGPL3 = "LGPL-3" | ||
LGPL3_L = "LGPL-3 or any later version" | ||
AGPL3 = "AGPL-3" | ||
AGPL3_L = "AGPL-3 or any later version" | ||
OSI = "Other OSI approved license" | ||
|
||
V3 = " version 3" | ||
V3L = """, either version 3 of the | ||
License, or (at your option) any later version""" | ||
|
||
GPL_LICENSES = { | ||
GPL3: ("GNU General Public License", V3), | ||
GPL3_L: ("GNU General Public License", V3L), | ||
LGPL3: ("GNU Lesser General Public License", V3), | ||
LGPL3_L: ("GNU Lesser General Public License", V3L), | ||
AGPL3: ("GNU Affero General Public License", V3), | ||
AGPL3_L: ("GNU Affero General Public License", V3L), | ||
} | ||
|
||
BASE_OSI = """ | ||
This program is free software: you should have received a copy of the | ||
license under which it is distributed along with the program. | ||
""" | ||
|
||
|
||
def get_license_text(license): | ||
""" Get the python license header for a license """ | ||
if license in GPL_LICENSES: | ||
name, version = GPL_LICENSES[license] | ||
return BASE_GPL.format(name=name, version=version).splitlines() | ||
elif license == OSI: | ||
return BASE_OSI | ||
else: | ||
return "" |
Oops, something went wrong.