diff --git a/prototype/__init__.py b/prototype/__init__.py new file mode 100644 index 000000000..f01f7f122 --- /dev/null +++ b/prototype/__init__.py @@ -0,0 +1,25 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +from . import ( + models, + wizard +) diff --git a/prototype/__openerp__.py b/prototype/__openerp__.py new file mode 100644 index 000000000..264624e6c --- /dev/null +++ b/prototype/__openerp__.py @@ -0,0 +1,67 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## + +{ + '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 +* Savoir-faire Linux + +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, +} diff --git a/prototype/i18n/fr.po b/prototype/i18n/fr.po new file mode 100644 index 000000000..37c27a4f6 --- /dev/null +++ b/prototype/i18n/fr.po @@ -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 \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" diff --git a/prototype/i18n/prototype.pot b/prototype/i18n/prototype.pot new file mode 100644 index 000000000..027657e2c --- /dev/null +++ b/prototype/i18n/prototype.pot @@ -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 \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 "" diff --git a/prototype/models/__init__.py b/prototype/models/__init__.py new file mode 100644 index 000000000..8c9737d2d --- /dev/null +++ b/prototype/models/__init__.py @@ -0,0 +1,25 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +from . import ( + prototype, + ir_model_fields +) diff --git a/prototype/models/ir_model_fields.py b/prototype/models/ir_model_fields.py new file mode 100644 index 000000000..c70dc4a7c --- /dev/null +++ b/prototype/models/ir_model_fields.py @@ -0,0 +1,30 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +from openerp.osv import fields, osv + + +class ir_model_fields(osv.osv): + _inherit = "ir.model.fields" + + _columns = { + 'notes': fields.text('Notes'), + } diff --git a/prototype/models/prototype.py b/prototype/models/prototype.py new file mode 100644 index 000000000..39a94fb84 --- /dev/null +++ b/prototype/models/prototype.py @@ -0,0 +1,69 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +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', + } diff --git a/prototype/security/ir.model.access.csv b/prototype/security/ir.model.access.csv new file mode 100755 index 000000000..0533abe94 --- /dev/null +++ b/prototype/security/ir.model.access.csv @@ -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 diff --git a/prototype/static/description/icon.png b/prototype/static/description/icon.png new file mode 100644 index 000000000..6a120f9fd Binary files /dev/null and b/prototype/static/description/icon.png differ diff --git a/prototype/templates/7.0/__init__.py b/prototype/templates/7.0/__init__.py new file mode 100644 index 000000000..2a599284e --- /dev/null +++ b/prototype/templates/7.0/__init__.py @@ -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 . +# +############################################################################## +from . import models diff --git a/prototype/templates/7.0/__openerp__.py b/prototype/templates/7.0/__openerp__.py new file mode 100644 index 000000000..b8fbb1760 --- /dev/null +++ b/prototype/templates/7.0/__openerp__.py @@ -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 . +# +############################################################################## + +{ + '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, +} diff --git a/prototype/templates/7.0/data/model_name.xml b/prototype/templates/7.0/data/model_name.xml new file mode 100644 index 000000000..baf4b950c --- /dev/null +++ b/prototype/templates/7.0/data/model_name.xml @@ -0,0 +1,8 @@ + + + + + $data + + + diff --git a/prototype/templates/7.0/demo/model_name.xml b/prototype/templates/7.0/demo/model_name.xml new file mode 100644 index 000000000..45605019c --- /dev/null +++ b/prototype/templates/7.0/demo/model_name.xml @@ -0,0 +1,8 @@ + + + + + $demo + + + diff --git a/prototype/templates/7.0/models/__init__.py b/prototype/templates/7.0/models/__init__.py new file mode 100644 index 000000000..8d436f907 --- /dev/null +++ b/prototype/templates/7.0/models/__init__.py @@ -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 . +# +############################################################################## +from . import ( + $models.py +) diff --git a/prototype/templates/7.0/models/model_name.py b/prototype/templates/7.0/models/model_name.py new file mode 100644 index 000000000..e5d9d0cb8 --- /dev/null +++ b/prototype/templates/7.0/models/model_name.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 . +# +############################################################################## +from openerp.osv import fields, osv + + +class $model_name(osv.osv): + _name = "$model_name" + _inherit = "$model_name" + _description = "$model_description" + + _columns = { + $model_fields + } + + _defaults = { + + } diff --git a/prototype/templates/7.0/security/ir.model.access.csv b/prototype/templates/7.0/security/ir.model.access.csv new file mode 100644 index 000000000..97dd8b917 --- /dev/null +++ b/prototype/templates/7.0/security/ir.model.access.csv @@ -0,0 +1 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink diff --git a/prototype/templates/7.0/security/model_name.xml b/prototype/templates/7.0/security/model_name.xml new file mode 100644 index 000000000..8cd0f5749 --- /dev/null +++ b/prototype/templates/7.0/security/model_name.xml @@ -0,0 +1,10 @@ + + + + + $groups + + $rules + + + diff --git a/prototype/templates/7.0/views/model_name_view.xml b/prototype/templates/7.0/views/model_name_view.xml new file mode 100644 index 000000000..45fa4957e --- /dev/null +++ b/prototype/templates/7.0/views/model_name_view.xml @@ -0,0 +1,8 @@ + + + + + $views + + + diff --git a/prototype/templates/8.0/__init__.py b/prototype/templates/8.0/__init__.py new file mode 100644 index 000000000..2a599284e --- /dev/null +++ b/prototype/templates/8.0/__init__.py @@ -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 . +# +############################################################################## +from . import models diff --git a/prototype/templates/8.0/__openerp__.py b/prototype/templates/8.0/__openerp__.py new file mode 100644 index 000000000..e39d87e5e --- /dev/null +++ b/prototype/templates/8.0/__openerp__.py @@ -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 . +# +############################################################################## + +{ + '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, +} diff --git a/prototype/templates/8.0/data/model_name.xml b/prototype/templates/8.0/data/model_name.xml new file mode 100644 index 000000000..baf4b950c --- /dev/null +++ b/prototype/templates/8.0/data/model_name.xml @@ -0,0 +1,8 @@ + + + + + $data + + + diff --git a/prototype/templates/8.0/demo/model_name.xml b/prototype/templates/8.0/demo/model_name.xml new file mode 100644 index 000000000..45605019c --- /dev/null +++ b/prototype/templates/8.0/demo/model_name.xml @@ -0,0 +1,8 @@ + + + + + $demo + + + diff --git a/prototype/templates/8.0/models/__init__.py b/prototype/templates/8.0/models/__init__.py new file mode 100644 index 000000000..8d436f907 --- /dev/null +++ b/prototype/templates/8.0/models/__init__.py @@ -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 . +# +############################################################################## +from . import ( + $models.py +) diff --git a/prototype/templates/8.0/models/model_name.py b/prototype/templates/8.0/models/model_name.py new file mode 100644 index 000000000..2c94e2f20 --- /dev/null +++ b/prototype/templates/8.0/models/model_name.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 . +# +############################################################################## +from openerp.osv import fields, osv + + +class $model_name(osv.osv): + _name = "$model_name" + _inherit = "$model_name" + _description = "$model_description" + + $model_fields + + _defaults = { + + } diff --git a/prototype/templates/8.0/security/ir.model.access.csv b/prototype/templates/8.0/security/ir.model.access.csv new file mode 100644 index 000000000..97dd8b917 --- /dev/null +++ b/prototype/templates/8.0/security/ir.model.access.csv @@ -0,0 +1 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink diff --git a/prototype/templates/8.0/security/model_name.xml b/prototype/templates/8.0/security/model_name.xml new file mode 100644 index 000000000..8cd0f5749 --- /dev/null +++ b/prototype/templates/8.0/security/model_name.xml @@ -0,0 +1,10 @@ + + + + + $groups + + $rules + + + diff --git a/prototype/templates/8.0/views/model_view.xml b/prototype/templates/8.0/views/model_view.xml new file mode 100644 index 000000000..45fa4957e --- /dev/null +++ b/prototype/templates/8.0/views/model_view.xml @@ -0,0 +1,8 @@ + + + + + $views + + + diff --git a/prototype/views/ir_model_fields_view.xml b/prototype/views/ir_model_fields_view.xml new file mode 100644 index 000000000..e1563449c --- /dev/null +++ b/prototype/views/ir_model_fields_view.xml @@ -0,0 +1,30 @@ + + + + + + view_ir_model_fields_form + ir.model.fields + + + + + + + + view_ir_model_form + ir.model + + + + + + + + + + + diff --git a/prototype/views/prototype_view.xml b/prototype/views/prototype_view.xml new file mode 100644 index 000000000..3573c33fe --- /dev/null +++ b/prototype/views/prototype_view.xml @@ -0,0 +1,97 @@ + + + + + + prototype.tree + prototype + + + + + + + + + + + prototype.form + prototype + +
+ + + +
+

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + Prototype + prototype + form + tree,form + + + + + +
+
diff --git a/prototype/wizard/__init__.py b/prototype/wizard/__init__.py new file mode 100644 index 000000000..1bb4a444c --- /dev/null +++ b/prototype/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +from . import prototype_module_export diff --git a/prototype/wizard/prototype_module_export.py b/prototype/wizard/prototype_module_export.py new file mode 100644 index 000000000..e5abe5775 --- /dev/null +++ b/prototype/wizard/prototype_module_export.py @@ -0,0 +1,67 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2010 - 2014 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## +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', + } diff --git a/prototype/wizard/prototype_module_export_view.xml b/prototype/wizard/prototype_module_export_view.xml new file mode 100644 index 000000000..4370e6114 --- /dev/null +++ b/prototype/wizard/prototype_module_export_view.xml @@ -0,0 +1,43 @@ + + + + + + Export Module + prototype.module.export + +
+ + + + + + + + + +
+

Export Complete

+

Here is the exported module:

+
+
+
+
+
+ +
+
+ + + Export Module + prototype.module.export + form + + new + + +
+