Browse Source
[FIX] Default license
[FIX] Default license
[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 datapull/107/head
Maxime Chambreuil
10 years ago
36 changed files with 1370 additions and 7 deletions
-
12module_prototyper/README.rst
-
2module_prototyper/__openerp__.py
-
12module_prototyper/models/default_description.py
-
2module_prototyper/models/module_prototyper.py
-
25prototype/__init__.py
-
67prototype/__openerp__.py
-
272prototype/i18n/fr.po
-
268prototype/i18n/prototype.pot
-
25prototype/models/__init__.py
-
30prototype/models/ir_model_fields.py
-
69prototype/models/prototype.py
-
2prototype/security/ir.model.access.csv
-
BINprototype/static/description/icon.png
-
22prototype/templates/7.0/__init__.py
-
50prototype/templates/7.0/__openerp__.py
-
8prototype/templates/7.0/data/model_name.xml
-
8prototype/templates/7.0/demo/model_name.xml
-
24prototype/templates/7.0/models/__init__.py
-
36prototype/templates/7.0/models/model_name.py
-
1prototype/templates/7.0/security/ir.model.access.csv
-
10prototype/templates/7.0/security/model_name.xml
-
8prototype/templates/7.0/views/model_name_view.xml
-
22prototype/templates/8.0/__init__.py
-
50prototype/templates/8.0/__openerp__.py
-
8prototype/templates/8.0/data/model_name.xml
-
8prototype/templates/8.0/demo/model_name.xml
-
24prototype/templates/8.0/models/__init__.py
-
34prototype/templates/8.0/models/model_name.py
-
1prototype/templates/8.0/security/ir.model.access.csv
-
10prototype/templates/8.0/security/model_name.xml
-
8prototype/templates/8.0/views/model_view.xml
-
30prototype/views/ir_model_fields_view.xml
-
97prototype/views/prototype_view.xml
-
22prototype/wizard/__init__.py
-
67prototype/wizard/prototype_module_export.py
-
43prototype/wizard/prototype_module_export_view.xml
@ -0,0 +1,25 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import ( |
|||
models, |
|||
wizard |
|||
) |
@ -0,0 +1,67 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': 'Prototype', |
|||
'version': '0.1', |
|||
'author': 'Savoir-faire Linux', |
|||
'maintainer': 'Savoir-faire Linux', |
|||
'website': 'http://www.savoirfairelinux.com', |
|||
'license': 'AGPL-3', |
|||
'category': 'Others', |
|||
'summary': 'Prototype your module', |
|||
'description': """ |
|||
This module allows the administrator to prototype new features and export |
|||
them as module. |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
Go to Settings > Modules > Prototype, create a new prototype, fill in the |
|||
information and export your module. |
|||
|
|||
Contributors |
|||
============ |
|||
|
|||
* Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com> |
|||
* Savoir-faire Linux <support@savoirfairelinux.com> |
|||
|
|||
More informations |
|||
----------------- |
|||
* Module developped and tested with Odoo version 8.0 |
|||
* For questions, please contact our support services \ |
|||
(support@savoirfairelinux.com) |
|||
""", |
|||
'depends': [ |
|||
'base', |
|||
], |
|||
'external_dependencies': { |
|||
'python': [], |
|||
}, |
|||
'data': [ |
|||
'wizard/prototype_module_export_view.xml', |
|||
'views/prototype_view.xml', |
|||
'views/ir_model_fields_view.xml', |
|||
'security/ir.model.access.csv', |
|||
], |
|||
'installable': True, |
|||
} |
@ -0,0 +1,272 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * prototype |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2014-10-08 17:58+0000\n" |
|||
"PO-Revision-Date: 2014-10-08 14:02-0500\n" |
|||
"Last-Translator: Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: 8bit\n" |
|||
"Plural-Forms: \n" |
|||
"X-Generator: Poedit 1.5.4\n" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,api_version:0 |
|||
msgid "7.0" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,api_version:0 |
|||
msgid "8.0" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,api_version:0 |
|||
msgid "API version" |
|||
msgstr "Version de l'API" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,rights:0 |
|||
msgid "Access Rights" |
|||
msgstr "Liste des contrôles d'accès" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,author:0 |
|||
msgid "Author" |
|||
msgstr "Auteur" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,auto_install:0 |
|||
msgid "Auto Install" |
|||
msgstr "Installation automatique" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Cancel" |
|||
msgstr "Annuler" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,category_id:0 |
|||
msgid "Category" |
|||
msgstr "Catégorie" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Close" |
|||
msgstr "Fermer" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,create_uid:0 field:prototype.module.export,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "Créé par" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,create_date:0 field:prototype.module.export,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "Créé le" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Data & Demo" |
|||
msgstr "Données et démo" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,data:0 |
|||
msgid "Data filters" |
|||
msgstr "Filtres pour les données" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,demo:0 |
|||
msgid "Demo filters" |
|||
msgstr "Filtres pour les données de démo" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form field:prototype,depends:0 |
|||
msgid "Dependencies" |
|||
msgstr "Dépendances" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form field:prototype,description:0 |
|||
msgid "Description" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export" |
|||
msgstr "Exporter" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Complete" |
|||
msgstr "Export terminé" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.actions.act_window,name:prototype.button_module_export_action |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Module" |
|||
msgstr "Exporter le module" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Settings" |
|||
msgstr "Configuration de l'export" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.model,name:prototype.model_ir_model_fields |
|||
#: field:prototype,fields:0 |
|||
msgid "Fields" |
|||
msgstr "Champs" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,data:0 |
|||
msgid "File" |
|||
msgstr "Fichier" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,name:0 |
|||
msgid "File Name" |
|||
msgstr "Nom du fichier" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,groups:0 |
|||
msgid "Groups" |
|||
msgstr "Groupes" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Here is the exported module:" |
|||
msgstr "Voici le module exporté :" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,id:0 field:prototype.module.export,id:0 |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,icon_image:0 |
|||
msgid "Icon" |
|||
msgstr "Icône" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Interface" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,write_uid:0 field:prototype.module.export,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "Mis à jour par" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,write_date:0 field:prototype.module.export,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "Mis à jour le" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,maintainer:0 |
|||
msgid "Maintainer" |
|||
msgstr "Mainteneur" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,menu:0 |
|||
msgid "Menu Items" |
|||
msgstr "Éléments du menu" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Models" |
|||
msgstr "Modèles" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Module" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,shortdesc:0 |
|||
msgid "Module Name" |
|||
msgstr "Nom du module" |
|||
|
|||
#. module: prototype |
|||
#: view:ir.model:prototype.view_ir_model_form field:ir.model.fields,notes:0 |
|||
msgid "Notes" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.actions.act_window,name:prototype.open_prototype_list |
|||
#: model:ir.model,name:prototype.model_prototype |
|||
#: model:ir.ui.menu,name:prototype.menu_open_prototype |
|||
#: view:prototype:prototype.view_prototype_tree |
|||
msgid "Prototype" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,rules:0 |
|||
msgid "Record Rules" |
|||
msgstr "Règles sur les enregistrements" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Security" |
|||
msgstr "Sécurité" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,summary:0 |
|||
msgid "Summary" |
|||
msgstr "Résumé" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,name:0 |
|||
msgid "Technical Name" |
|||
msgstr "Nom technique" |
|||
|
|||
#. module: prototype |
|||
#: help:prototype,data:0 |
|||
msgid "The records matching the filters will be added as data." |
|||
msgstr "" |
|||
"Les enregistrements correspondant aux critères des filtres seront exportées " |
|||
"dans le module comme données." |
|||
|
|||
#. module: prototype |
|||
#: help:prototype,demo:0 |
|||
msgid "The records matching the filters will be added as demo data." |
|||
msgstr "" |
|||
"Les enregistrements correspondant aux critères des filtres seront exportées " |
|||
"dans le module comme données de démo." |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,version:0 |
|||
msgid "Version" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,views:0 |
|||
msgid "Views" |
|||
msgstr "Vues" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,website:0 |
|||
msgid "Website" |
|||
msgstr "Site web" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,state:0 |
|||
msgid "choose" |
|||
msgstr "choisir" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,state:0 |
|||
msgid "get" |
|||
msgstr "récupérer" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,state:0 |
|||
msgid "unknown" |
|||
msgstr "inconnu" |
@ -0,0 +1,268 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * prototype |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 8.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2014-10-08 17:58+0000\n" |
|||
"PO-Revision-Date: 2014-10-08 14:00-0500\n" |
|||
"Last-Translator: Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: 8bit\n" |
|||
"Plural-Forms: \n" |
|||
"X-Generator: Poedit 1.5.4\n" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,api_version:0 |
|||
msgid "7.0" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,api_version:0 |
|||
msgid "8.0" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,api_version:0 |
|||
msgid "API version" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,rights:0 |
|||
msgid "Access Rights" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,author:0 |
|||
msgid "Author" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,auto_install:0 |
|||
msgid "Auto Install" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,category_id:0 |
|||
msgid "Category" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Close" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,create_uid:0 field:prototype.module.export,create_uid:0 |
|||
msgid "Created by" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,create_date:0 field:prototype.module.export,create_date:0 |
|||
msgid "Created on" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Data & Demo" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,data:0 |
|||
msgid "Data filters" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,demo:0 |
|||
msgid "Demo filters" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form field:prototype,depends:0 |
|||
msgid "Dependencies" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form field:prototype,description:0 |
|||
msgid "Description" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Complete" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.actions.act_window,name:prototype.button_module_export_action |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Module" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Export Settings" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.model,name:prototype.model_ir_model_fields |
|||
#: field:prototype,fields:0 |
|||
msgid "Fields" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,data:0 |
|||
msgid "File" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,name:0 |
|||
msgid "File Name" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,groups:0 |
|||
msgid "Groups" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype.module.export:prototype.view_module_export_wizard |
|||
msgid "Here is the exported module:" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,id:0 field:prototype.module.export,id:0 |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,icon_image:0 |
|||
msgid "Icon" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Interface" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,write_uid:0 field:prototype.module.export,write_uid:0 |
|||
msgid "Last Updated by" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,write_date:0 field:prototype.module.export,write_date:0 |
|||
msgid "Last Updated on" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,maintainer:0 |
|||
msgid "Maintainer" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,menu:0 |
|||
msgid "Menu Items" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Models" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Module" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,shortdesc:0 |
|||
msgid "Module Name" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:ir.model:prototype.view_ir_model_form field:ir.model.fields,notes:0 |
|||
msgid "Notes" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: model:ir.actions.act_window,name:prototype.open_prototype_list |
|||
#: model:ir.model,name:prototype.model_prototype |
|||
#: model:ir.ui.menu,name:prototype.menu_open_prototype |
|||
#: view:prototype:prototype.view_prototype_tree |
|||
msgid "Prototype" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,rules:0 |
|||
msgid "Record Rules" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: view:prototype:prototype.view_prototype_form |
|||
msgid "Security" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,summary:0 |
|||
msgid "Summary" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,name:0 |
|||
msgid "Technical Name" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: help:prototype,data:0 |
|||
msgid "The records matching the filters will be added as data." |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: help:prototype,demo:0 |
|||
msgid "The records matching the filters will be added as demo data." |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,version:0 |
|||
msgid "Version" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,views:0 |
|||
msgid "Views" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype,website:0 |
|||
msgid "Website" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,state:0 |
|||
msgid "choose" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: selection:prototype.module.export,state:0 |
|||
msgid "get" |
|||
msgstr "" |
|||
|
|||
#. module: prototype |
|||
#: field:prototype.module.export,state:0 |
|||
msgid "unknown" |
|||
msgstr "" |
@ -0,0 +1,25 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import ( |
|||
prototype, |
|||
ir_model_fields |
|||
) |
@ -0,0 +1,30 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from openerp.osv import fields, osv |
|||
|
|||
|
|||
class ir_model_fields(osv.osv): |
|||
_inherit = "ir.model.fields" |
|||
|
|||
_columns = { |
|||
'notes': fields.text('Notes'), |
|||
} |
@ -0,0 +1,69 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from openerp.osv import fields, osv |
|||
|
|||
|
|||
class prototype(osv.osv): |
|||
_name = "prototype" |
|||
_description = "Prototype" |
|||
|
|||
_columns = { |
|||
'name': fields.char('Technical Name', required=True), |
|||
'category_id': fields.many2one('ir.module.category', 'Category'), |
|||
'shortdesc': fields.char('Module Name', required=True), |
|||
'summary': fields.char('Summary', required=True), |
|||
'description': fields.html('Description', required=True), |
|||
'author': fields.char('Author', required=True), |
|||
'maintainer': fields.char('Maintainer'), |
|||
'website': fields.char('Website'), |
|||
'icon_image': fields.binary('Icon'), |
|||
'version': fields.char('Version', size=3), |
|||
'auto_install': fields.boolean('Auto Install'), |
|||
# Relations |
|||
'depends': fields.many2many('ir.module.module', 'prototype_module_rel', |
|||
'prototype_id', 'module_id', |
|||
'Dependencies'), |
|||
'data': fields.many2many('ir.filters', 'prototype_data_rel', |
|||
'prototype_id', 'filter_id', |
|||
'Data filters', help="The records matching the filters will be added as data."), |
|||
'demo': fields.many2many('ir.filters', 'prototype_demo_rel', |
|||
'prototype_id', 'filter_id', |
|||
'Demo filters', help="The records matching the filters will be added as demo data."), |
|||
'fields': fields.many2many('ir.model.fields', 'prototype_fields_rel', |
|||
'prototype_id', 'field_id', 'Fields'), |
|||
'menu': fields.many2many('ir.ui.menu', 'prototype_menu_rel', |
|||
'prototype_id', 'menu_id', 'Menu Items'), |
|||
'views': fields.many2many('ir.ui.view', 'prototype_view_rel', |
|||
'prototype_id', 'view_id', 'Views'), |
|||
'groups': fields.many2many('res.groups', 'prototype_groups_rel', |
|||
'prototype_id', 'group_id', 'Groups'), |
|||
'rights': fields.many2many('ir.model.access', 'prototype_rights_rel', |
|||
'prototype_id', 'right_id', |
|||
'Access Rights'), |
|||
'rules': fields.many2many('ir.rule', 'prototype_rule_rel', |
|||
'prototype_id', 'rule_id', 'Record Rules'), |
|||
} |
|||
|
|||
_defaults = { |
|||
'auto_install': False, |
|||
'version': '0.1', |
|||
} |
@ -0,0 +1,2 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|||
access_prototype_admin,prototype_system,model_prototype,base.group_system,1,1,1,1 |
After Width: 500 | Height: 500 | Size: 14 KiB |
@ -0,0 +1,22 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import models |
@ -0,0 +1,50 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $export_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': '$name', |
|||
'version': '$version', |
|||
'author': '$author', |
|||
'maintainer': '$maintainer', |
|||
'website': '$website', |
|||
'license': 'AGPL-3', |
|||
'category': '$category', |
|||
'summary': '$summary', |
|||
'description': """ |
|||
$description |
|||
|
|||
* Module exported by the prototype module for version 7.0. |
|||
* If you have any questions, please contact Savoir-faire Linux \ |
|||
(support@savoirfairelinux.com) |
|||
""", |
|||
'depends': [ |
|||
$depends |
|||
], |
|||
'external_dependencies': { |
|||
'python': [], |
|||
}, |
|||
'data': [ |
|||
$data |
|||
], |
|||
'installable': True, |
|||
'auto_install': $auto_install, |
|||
} |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$data |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$demo |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,24 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import ( |
|||
$models.py |
|||
) |
@ -0,0 +1,36 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from openerp.osv import fields, osv |
|||
|
|||
|
|||
class $model_name(osv.osv): |
|||
_name = "$model_name" |
|||
_inherit = "$model_name" |
|||
_description = "$model_description" |
|||
|
|||
_columns = { |
|||
$model_fields |
|||
} |
|||
|
|||
_defaults = { |
|||
|
|||
} |
@ -0,0 +1 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$groups |
|||
|
|||
$rules |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$views |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,22 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import models |
@ -0,0 +1,50 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $export_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': '$name', |
|||
'version': '$version', |
|||
'author': '$author', |
|||
'maintainer': '$maintainer', |
|||
'website': '$website', |
|||
'license': 'AGPL-3', |
|||
'category': '$category', |
|||
'summary': '$summary', |
|||
'description': """ |
|||
$description |
|||
|
|||
* Module exported by the prototype module for version 8.0. |
|||
* If you have any questions, please contact Savoir-faire Linux \ |
|||
(support@savoirfairelinux.com) |
|||
""", |
|||
'depends': [ |
|||
$depends |
|||
], |
|||
'external_dependencies': { |
|||
'python': [], |
|||
}, |
|||
'data': [ |
|||
$data |
|||
], |
|||
'installable': True, |
|||
'auto_install': $auto_install, |
|||
} |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$data |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$demo |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,24 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import ( |
|||
$models.py |
|||
) |
@ -0,0 +1,34 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Odoo, Open Source Management Solution |
|||
# This module copyright (C) $generation_date $author |
|||
# (<$website>). |
|||
# |
|||
# 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/>. |
|||
# |
|||
############################################################################## |
|||
from openerp.osv import fields, osv |
|||
|
|||
|
|||
class $model_name(osv.osv): |
|||
_name = "$model_name" |
|||
_inherit = "$model_name" |
|||
_description = "$model_description" |
|||
|
|||
$model_fields |
|||
|
|||
_defaults = { |
|||
|
|||
} |
@ -0,0 +1 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$groups |
|||
|
|||
$rules |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
$views |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="view_ir_model_fields_form" model="ir.ui.view"> |
|||
<field name="name">view_ir_model_fields_form</field> |
|||
<field name="model">ir.model.fields</field> |
|||
<field name="inherit_id" ref="base.view_model_fields_form"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="groups" position="before"> |
|||
<label for="notes"/> |
|||
<field name="notes"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_ir_model_form" model="ir.ui.view"> |
|||
<field name="name">view_ir_model_form</field> |
|||
<field name="model">ir.model</field> |
|||
<field name="inherit_id" ref="base.view_model_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//page/field/form/separator[@string='Groups']" position="before"> |
|||
<separator string="Notes"/> |
|||
<field name="notes"/> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,97 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="view_prototype_tree" model="ir.ui.view"> |
|||
<field name="name">prototype.tree</field> |
|||
<field name="model">prototype</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Prototype"> |
|||
<field name="name"/> |
|||
<field name="shortdesc"/> |
|||
<field name="summary"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_prototype_form" model="ir.ui.view"> |
|||
<field name="name">prototype.form</field> |
|||
<field name="model">prototype</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Module"> |
|||
<link rel="stylesheet" href="/base/static/src/css/description.css"/> |
|||
<sheet> |
|||
<field name="icon_image" widget="image" class="oe_avatar oe_left"/> |
|||
<div class="oe_title"> |
|||
<h1><field name="summary"/></h1> |
|||
<div> |
|||
<button name="%(button_module_export_action)d" string="Export" type="action"/> |
|||
</div> |
|||
</div> |
|||
<group> |
|||
<group> |
|||
<field name="name"/> |
|||
<field name="shortdesc"/> |
|||
<field name="category_id"/> |
|||
<field name="version"/> |
|||
</group> |
|||
<group> |
|||
<field name="author"/> |
|||
<field name="website" widget="url"/> |
|||
<field name="maintainer"/> |
|||
<field name="auto_install"/> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Description"> |
|||
<field name="description"/> |
|||
</page> |
|||
<page string="Dependencies"> |
|||
<field name="depends"/> |
|||
</page> |
|||
<page string="Data & Demo"> |
|||
<label for="data"/> |
|||
<field name="data"/> |
|||
<label for="demo"/> |
|||
<field name="demo"/> |
|||
</page> |
|||
<page string="Models"> |
|||
<label for="fields"/> |
|||
<field name="fields" domain="[('state', '=', 'manual')]"/> |
|||
</page> |
|||
<page string="Interface"> |
|||
<label for="menu"/> |
|||
<field name="menu"/> |
|||
<label for="views"/> |
|||
<field name="views"/> |
|||
</page> |
|||
<page string="Security"> |
|||
<label for="groups"/> |
|||
<field name="groups"/> |
|||
<label for="rights"/> |
|||
<field name="rights"/> |
|||
<label for="rules"/> |
|||
<field name="rules"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="open_prototype_list" model="ir.actions.act_window"> |
|||
<field name="name">Prototype</field> |
|||
<field name="res_model">prototype</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="view_id" ref="view_prototype_tree"/> |
|||
</record> |
|||
|
|||
<menuitem id="menu_open_prototype" |
|||
action="open_prototype_list" |
|||
parent="base.menu_management" |
|||
sequence="30" |
|||
groups="base.group_system"/> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,22 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from . import prototype_module_export |
@ -0,0 +1,67 @@ |
|||
# -*- 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/>. |
|||
# |
|||
############################################################################## |
|||
from openerp.osv import fields,osv |
|||
from openerp.tools.translate import _ |
|||
|
|||
|
|||
class prototype_module_export(osv.osv_memory): |
|||
_name = "prototype.module.export" |
|||
|
|||
_columns = { |
|||
'name': fields.char('File Name', readonly=True), |
|||
'api_version': fields.selection([('8.0','8.0'), |
|||
('7.0', '7.0')], 'API version', |
|||
required=True), |
|||
'data': fields.binary('File', readonly=True), |
|||
'state': fields.selection([('choose', 'choose'), # choose version |
|||
('get', 'get')]) # get module |
|||
} |
|||
_defaults = { |
|||
'state': 'choose', |
|||
'api_version': '8.0', |
|||
} |
|||
|
|||
def act_getfile(self, cr, uid, ids, context=None): |
|||
""" |
|||
Export a zip file containing the module based on the information |
|||
provided in the prototype, using the templates chosen in the wizard. |
|||
""" |
|||
this = self.browse(cr, uid, ids)[0] |
|||
|
|||
# TODO: Implement the export logic here |
|||
filename = 'new' |
|||
this.name = "%s.%s" % (filename, 'zip') |
|||
out = 'toto' |
|||
# /TODO |
|||
|
|||
self.write(cr, uid, ids, {'state': 'get', |
|||
'data': out, |
|||
'name':this.name}, context=context) |
|||
return { |
|||
'type': 'ir.actions.act_window', |
|||
'res_model': 'prototype.module.export', |
|||
'view_mode': 'form', |
|||
'view_type': 'form', |
|||
'res_id': this.id, |
|||
'views': [(False, 'form')], |
|||
'target': 'new', |
|||
} |
@ -0,0 +1,43 @@ |
|||
<?xml version="1.0"?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<record id="view_module_export_wizard" model="ir.ui.view"> |
|||
<field name="name">Export Module</field> |
|||
<field name="model">prototype.module.export</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Export Module"> |
|||
<field name="name" invisible="1"/> |
|||
<field name="state" invisible="1"/> |
|||
<group string="Export Settings" states="choose" col="6"> |
|||
<group colspan="2"> |
|||
<field name="api_version"/> |
|||
</group> |
|||
<group colspan="4"> |
|||
</group> |
|||
</group> |
|||
<div states="get"> |
|||
<h2>Export Complete</h2> |
|||
<p>Here is the exported module: <field name="data" readonly="1" filename="name"/></p> |
|||
</div> |
|||
<footer states="choose"> |
|||
<button name="act_getfile" string="Export" type="object" class="oe_highlight"/> or |
|||
<button special="cancel" string="Cancel" type="object" class="oe_link"/> |
|||
</footer> |
|||
<footer states="get"> |
|||
<button special="cancel" string="Close" type="object"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="button_module_export_action" model="ir.actions.act_window"> |
|||
<field name="name">Export Module</field> |
|||
<field name="res_model">prototype.module.export</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_id" ref="view_module_export_wizard"/> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue