Browse Source
[10.0][MIG] Module Prototyper (#634)
[10.0][MIG] Module Prototyper (#634)
* [ADD] Updated manifest and README * [ADD] Version 10.0 template and api_version model * [ADD] Updated license header, updated api call * [FIX] Flake * [FIX] Flake * [FIX] Tests * [FIX] Flake8 * [ADD] Extra test for changed method 'set_jinja_env' * [FIX] Fixed 'Try me on runbot' button12.0-mig-module_prototyper_last
Dennis Sluijk
8 years ago
committed by
Nicolas JEUDY
32 changed files with 549 additions and 346 deletions
-
25module_prototyper/README.rst
-
2module_prototyper/__init__.py
-
10module_prototyper/__manifest__.py
-
54module_prototyper/data/README.rst
-
16module_prototyper/data/module_prototyper_api_version_data.xml
-
3module_prototyper/models/__init__.py
-
21module_prototyper/models/ir_model_fields.py
-
2module_prototyper/models/licenses.py
-
43module_prototyper/models/module_prototyper.py
-
12module_prototyper/models/module_prototyper_api_version.py
-
1module_prototyper/security/ir.model.access.csv
-
7module_prototyper/templates/10.0/__init__.py.template
-
58module_prototyper/templates/10.0/__manifest__.py.template
-
6module_prototyper/templates/10.0/data/model_name.xml.template
-
6module_prototyper/templates/10.0/demo/model_name.xml.template
-
5module_prototyper/templates/10.0/header.template
-
9module_prototyper/templates/10.0/models/__init__.py.template
-
35module_prototyper/templates/10.0/models/model_name.py.template
-
4module_prototyper/templates/10.0/security/ir.model.access.csv.template
-
8module_prototyper/templates/10.0/security/model_name.xml.template
-
27module_prototyper/templates/10.0/views/model_menus.xml.template
-
15module_prototyper/templates/10.0/views/model_views.xml.template
-
4module_prototyper/templates/8.0/__openerp__.py.template
-
24module_prototyper/templates/8.0/header.template
-
2module_prototyper/tests/__init__.py
-
39module_prototyper/tests/test_prototype.py
-
10module_prototyper/tests/test_prototype_module_export.py
-
88module_prototyper/views/ir_model_fields_view.xml
-
264module_prototyper/views/module_prototyper_view.xml
-
2module_prototyper/wizard/__init__.py
-
25module_prototyper/wizard/module_prototyper_module_export.py
-
68module_prototyper/wizard/module_prototyper_module_export_view.xml
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- Copyright 2016 Onestein (<http://www.onestein.eu>) |
||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> |
||||
|
<odoo> |
||||
|
|
||||
|
<record id="api_version_80" model="module_prototyper.api_version"> |
||||
|
<field name="name">8.0</field> |
||||
|
<field name="manifest_file_name">__openerp__</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="api_version_100" model="module_prototyper.api_version"> |
||||
|
<field name="name">10.0</field> |
||||
|
<field name="manifest_file_name">__manifest__</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,12 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2016 Onestein (<http://www.onestein.eu>) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from odoo import models, fields |
||||
|
|
||||
|
|
||||
|
class ModulePrototyperApiVersion(models.Model): |
||||
|
_name = 'module_prototyper.api_version' |
||||
|
|
||||
|
name = fields.Char() |
||||
|
manifest_file_name = fields.Char() |
@ -1,2 +1,3 @@ |
|||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
||||
access_prototype_admin,prototype_system,model_module_prototyper,base.group_system,1,1,1,1 |
access_prototype_admin,prototype_system,model_module_prototyper,base.group_system,1,1,1,1 |
||||
|
access_prototype_api_version_admin,prototype_api_version_system,model_module_prototyper_api_version,base.group_system,1,1,1,1 |
@ -0,0 +1,7 @@ |
|||||
|
{% extends "header.template" %} |
||||
|
{% block body %} |
||||
|
{% if models %} |
||||
|
|
||||
|
from . import models |
||||
|
{% endif %} |
||||
|
{% endblock %} |
@ -0,0 +1,58 @@ |
|||||
|
{% extends "header.template" %} |
||||
|
{% block body %} |
||||
|
|
||||
|
{ |
||||
|
'name': '{{ prototype.human_name }}', |
||||
|
'version': '{{ prototype.version }}', |
||||
|
'author': '{{ prototype.author }}', |
||||
|
'maintainer': '{{ prototype.maintainer }}', |
||||
|
'website': '{{ prototype.website }}', |
||||
|
'license': '{{ prototype.licence }}', |
||||
|
|
||||
|
# Categories can be used to filter modules in modules listing |
||||
|
# Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml # noqa |
||||
|
# for the full list |
||||
|
'category': '{{ prototype.with_context({}).category_id.name }}',{# In english please! #} |
||||
|
'summary': '{{ prototype.summary }}', |
||||
|
'description': """ |
||||
|
{{ prototype.description }} |
||||
|
|
||||
|
* Module exported by the Module Prototyper module for version 10.0. |
||||
|
* If you have any questions, please contact Savoir-faire Linux |
||||
|
(support@savoirfairelinux.com) |
||||
|
""", |
||||
|
|
||||
|
# any module necessary for this one to work correctly |
||||
|
'depends': [ |
||||
|
{% for dependency in prototype.dependency_ids %} |
||||
|
'{{ dependency.name }}', |
||||
|
{% endfor %} |
||||
|
], |
||||
|
'external_dependencies': { |
||||
|
'python': [], |
||||
|
}, |
||||
|
|
||||
|
# always loaded |
||||
|
'data': [ |
||||
|
{% for data_file in data_files %} |
||||
|
'{{ data_file }}', |
||||
|
{% endfor %} |
||||
|
], |
||||
|
# only loaded in demonstration mode |
||||
|
'demo': [ |
||||
|
{% for demo_file in prototype.demo_ids %} |
||||
|
'{{ demo_file.name }}', |
||||
|
{% endfor %} |
||||
|
], |
||||
|
|
||||
|
'js': [], |
||||
|
'css': [], |
||||
|
'qweb': [], |
||||
|
|
||||
|
'installable': True, |
||||
|
# Install this module automatically if all dependency have been previously |
||||
|
# and independently installed. Used for synergetic or glue modules. |
||||
|
'auto_install': {{ prototype.auto_install }}, |
||||
|
'application': {{ prototype.application }}, |
||||
|
} |
||||
|
{% endblock %} |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<odoo> |
||||
|
|
||||
|
{{ data }} |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<odoo> |
||||
|
|
||||
|
{{ demo }} |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,5 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright {{ export_year }} {% if author %}{{ author }}{% endif %} ({% if website %}({{ website }}).{% endif %}) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
|
{% block body %} |
||||
|
{% endblock %} |
@ -0,0 +1,9 @@ |
|||||
|
{% extends "header.template" %} |
||||
|
{% block body %} |
||||
|
{% for model in models %} |
||||
|
{% if loop.first %} |
||||
|
|
||||
|
{% endif %} |
||||
|
from . import {{ model }} |
||||
|
{% endfor %} |
||||
|
{% endblock %} |
@ -0,0 +1,35 @@ |
|||||
|
{% extends "header.template" %} |
||||
|
{% block body %} |
||||
|
|
||||
|
from odoo import models, fields |
||||
|
from odoo.tools.translate import _ |
||||
|
|
||||
|
|
||||
|
class {{ unprefix(name) }}(models.Model): |
||||
|
{% if model.state == 'base' %} |
||||
|
_name = "{{ model.model }}" |
||||
|
{% else %} |
||||
|
_inherit = "{{ model.model }}" |
||||
|
{% endif %} |
||||
|
{% if description %} |
||||
|
_description = "{{ description }}" |
||||
|
{% endif %} |
||||
|
|
||||
|
{% for field in fields %} |
||||
|
{% for line in wrap(field.notes, replace_whitespace=False) %} |
||||
|
# {{line}} |
||||
|
{% endfor %} |
||||
|
{{ unprefix(field.name) }} = fields.{{ field.ttype|capitalize }}( |
||||
|
string=_("{{ field.field_description }}"), |
||||
|
required={{ field.required }}, |
||||
|
translate={{ field.translate }}, |
||||
|
readonly={{ field.readonly }} |
||||
|
{% if field.size %} |
||||
|
size={{ field.size }}, |
||||
|
{% endif %} |
||||
|
{% if field.helper %} |
||||
|
help=_("{{ field.helper }}"), |
||||
|
{% endif %} |
||||
|
) |
||||
|
{% endfor %} |
||||
|
{% endblock %} |
@ -0,0 +1,4 @@ |
|||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
||||
|
{% for rule in access_rules %} |
||||
|
{{ rule.id }},{{ rule.name }},{{ rule.model_id.id }},{{ rule.group_id.id }},{{ rule.perm_write }},{{ rule.perm_write }},{{ rule.perm_create }},{{ rule.perm_unlink }} |
||||
|
{% endfor %} |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<odoo> |
||||
|
|
||||
|
{{ groups }} |
||||
|
|
||||
|
{{ rules }} |
||||
|
|
||||
|
</odoo> |
@ -0,0 +1,27 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<odoo> |
||||
|
{% for menu in menus %} |
||||
|
<record id="action_{{ menu.action.name }}_{{ menu.action.view_type }}_view" model="{{ menu.action.type }}"> |
||||
|
<field name="name">{{ unprefix(menu.action.name) }}</field> |
||||
|
<field name="type">{{ menu.action.type }}</field> |
||||
|
<field name="res_model">{{ unprefix(menu.action.res_model) }}</field> |
||||
|
<field name="view_type">{{ menu.action.view_type }}</field> |
||||
|
<field name="view_mode">{{ menu.action.view_mode }}</field> |
||||
|
{% if menu.action.help %} |
||||
|
<field name="help" type="html">{{ menu.action.help }} |
||||
|
</field> |
||||
|
{% endif %} |
||||
|
</record> |
||||
|
|
||||
|
<menuitem action="action_{{ unprefix(menu.action.name) }}_{{ menu.action.view_type }}_view" |
||||
|
name="{{ menu.name }}" |
||||
|
id="menu_action_{{ unprefix(menu.name)|replace('.', '_') }}_{{ menu.action.view_type }}" |
||||
|
{% if menu.parent_id %}parent="{{ menu.parent_id.get_xml_id().values()[0] }}"{% endif %} |
||||
|
sequence="{{ menu.sequence }}" |
||||
|
groups="{% for group in menu.groups_id %}{{ group.get_xml_id().values()[0] }},{% endfor %}" |
||||
|
/> |
||||
|
{% if not loop.last %} |
||||
|
|
||||
|
{% endif %} |
||||
|
{% endfor %} |
||||
|
</odoo> |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<odoo> |
||||
|
<!-- TODO: put here a reminder on what to do at the first edition --> |
||||
|
{% for view in views %} |
||||
|
<record id="{{ unprefix(view.name)|replace('.', '_')}}_view" model="ir.ui.view"> |
||||
|
<field name="name">{{ unprefix(view.name) }}.view</field> |
||||
|
<field name="model">{{ unprefix(view.model) }}</field> |
||||
|
<field name="view_type">{{ view.type }}</field> |
||||
|
<field name="inherit_id" ref="{{ view.inherit_id.get_xml_id().values()[0] }}"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
{{ fixup_arch(view.arch) }} |
||||
|
</field> |
||||
|
</record> |
||||
|
{% endfor %} |
||||
|
</odoo> |
@ -1,23 +1,5 @@ |
|||||
# -*- encoding: utf-8 -*- |
|
||||
############################################################################## |
|
||||
# |
|
||||
# Odoo, Open Source Management Solution |
|
||||
# This module copyright (C) {{ export_year }} {% if author %}{{ author }}{% endif %} |
|
||||
# {% if website %}({{ website }}).{% endif %} |
|
||||
# |
|
||||
# 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/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright {{ export_year }} {% if author %}{{ author }}{% endif %} ({% if website %}({{ website }}).{% endif %}) |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
||||
{% block body %} |
{% block body %} |
||||
{% endblock %} |
{% endblock %} |
@ -1,50 +1,48 @@ |
|||||
<?xml version="1.0"?> |
<?xml version="1.0"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
|
<odoo> |
||||
|
|
||||
<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="helper"/> |
|
||||
<field name="helper" |
|
||||
placeholder="Text that will be set as the helper of the field..."/> |
|
||||
<label for="notes"/> |
|
||||
<field name="notes" |
|
||||
placeholder="Notes to help developers to understand the work or advanced features that should be added, ie: onchange, etc."/> |
|
||||
</field> |
|
||||
<field name="relation_field" position="after"> |
|
||||
<field name="column1" |
|
||||
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
|
||||
/> |
|
||||
<field name="column2" |
|
||||
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
|
||||
/> |
|
||||
</field> |
|
||||
<field name="translate" position="after"> |
|
||||
<field name="limit" |
|
||||
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
|
||||
/> |
|
||||
<field name="client_context" |
|
||||
attrs="{'invisible': [('ttype', 'not in', ['many2one','one2many','many2many'])]}" |
|
||||
/> |
|
||||
</field> |
|
||||
|
<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="helper"/> |
||||
|
<field name="helper" |
||||
|
placeholder="Text that will be set as the helper of the field..."/> |
||||
|
<label for="notes"/> |
||||
|
<field name="notes" |
||||
|
placeholder="Notes to help developers to understand the work or advanced features that should be added, ie: onchange, etc."/> |
||||
</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="//field[@name='field_id']/form/notebook" position="before"> |
|
||||
<separator string="Notes"/> |
|
||||
<field name="notes"/> |
|
||||
</xpath> |
|
||||
|
<field name="relation_field" position="after"> |
||||
|
<field name="column1" |
||||
|
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
||||
|
/> |
||||
|
<field name="column2" |
||||
|
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
||||
|
/> |
||||
|
</field> |
||||
|
<field name="translate" position="after"> |
||||
|
<field name="limit" |
||||
|
attrs="{'invisible': [('ttype', '!=', 'many2many')]}" |
||||
|
/> |
||||
|
<field name="client_context" |
||||
|
attrs="{'invisible': [('ttype', 'not in', ['many2one','one2many','many2many'])]}" |
||||
|
/> |
||||
</field> |
</field> |
||||
</record> |
|
||||
|
</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="//field[@name='field_id']/form/notebook" position="before"> |
||||
|
<separator string="Notes"/> |
||||
|
<field name="notes"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</odoo> |
@ -1,146 +1,144 @@ |
|||||
<?xml version="1.0"?> |
<?xml version="1.0"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
|
<odoo> |
||||
|
|
||||
<record id="module_prototyper_base_tree_view" model="ir.ui.view"> |
|
||||
<field name="name">Base tree View for module prototypes</field> |
|
||||
<field name="model">module_prototyper</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<tree string="Prototype"> |
|
||||
<field name="human_name"/> |
|
||||
<field name="name"/> |
|
||||
<field name="summary"/> |
|
||||
</tree> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
<record id="module_prototyper_base_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">Base tree View for module prototypes</field> |
||||
|
<field name="model">module_prototyper</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Prototype"> |
||||
|
<field name="human_name"/> |
||||
|
<field name="name"/> |
||||
|
<field name="summary"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
<record id="module_prototyper_base_form_view" model="ir.ui.view"> |
|
||||
<field name="name">Base form view for module prototypes</field> |
|
||||
<field name="model">module_prototyper</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<form string="Module"> |
|
||||
<sheet> |
|
||||
<field name="icon_image" widget="image" |
|
||||
class="oe_avatar oe_left"/> |
|
||||
<div class="oe_title"> |
|
||||
<h1> |
|
||||
<field name="human_name" |
|
||||
placeholder="ex: Module Prototyper"/> |
|
||||
</h1> |
|
||||
<div> |
|
||||
<button name="%(button_module_export_action)d" |
|
||||
string="Export" type="action"/> |
|
||||
</div> |
|
||||
|
<record id="module_prototyper_base_form_view" model="ir.ui.view"> |
||||
|
<field name="name">Base form view for module prototypes</field> |
||||
|
<field name="model">module_prototyper</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Module"> |
||||
|
<sheet> |
||||
|
<field name="icon_image" widget="image" |
||||
|
class="oe_avatar oe_left"/> |
||||
|
<div class="oe_title"> |
||||
|
<h1> |
||||
|
<field name="human_name" |
||||
|
placeholder="ex: Module Prototyper"/> |
||||
|
</h1> |
||||
|
<div> |
||||
|
<button name="%(button_module_export_action)d" |
||||
|
string="Export" type="action"/> |
||||
</div> |
</div> |
||||
|
</div> |
||||
|
<group> |
||||
<group> |
<group> |
||||
<group> |
|
||||
<field name="name" |
|
||||
placeholder="ex: module_prototyper"/> |
|
||||
<field name="summary" |
|
||||
placeholder="ex: Prototype your module."/> |
|
||||
<field name="category_id" |
|
||||
placeholder="ex: Others, Sales, Website"/> |
|
||||
<field name="version"/> |
|
||||
<field name="license"/> |
|
||||
</group> |
|
||||
<group> |
|
||||
<field name="author" |
|
||||
placeholder="ex: Odoo Community Association"/> |
|
||||
<field name="website" widget="url" |
|
||||
placeholder="ex: http://odoo-community.org/"/> |
|
||||
<field name="maintainer" |
|
||||
placeholder="ex: Odoo Community Association"/> |
|
||||
<field name="auto_install"/> |
|
||||
<field name="application"/> |
|
||||
</group> |
|
||||
|
<field name="name" |
||||
|
placeholder="ex: module_prototyper"/> |
||||
|
<field name="summary" |
||||
|
placeholder="ex: Prototype your module."/> |
||||
|
<field name="category_id" |
||||
|
placeholder="ex: Others, Sales, Website"/> |
||||
|
<field name="version"/> |
||||
|
<field name="license"/> |
||||
</group> |
</group> |
||||
<notebook> |
|
||||
<page string="Description"> |
|
||||
<field name="description"/> |
|
||||
</page> |
|
||||
<page string="Dependencies"> |
|
||||
<field name="dependency_ids"/> |
|
||||
</page> |
|
||||
<page string="Fields"> |
|
||||
<label for="field_ids"/> |
|
||||
<field name="field_ids"/> |
|
||||
</page> |
|
||||
<page string="Interface"> |
|
||||
<label for="view_ids"/> |
|
||||
<field name="view_ids"/> |
|
||||
<label for="menu_ids"/> |
|
||||
<field name="menu_ids"/> |
|
||||
</page> |
|
||||
<page string="Data & Demo"> |
|
||||
<label for="data_ids"/> |
|
||||
<field name="data_ids"/> |
|
||||
<label for="demo_ids"/> |
|
||||
<field name="demo_ids"/> |
|
||||
</page> |
|
||||
<page string="Reports"> |
|
||||
<label for="report_ids" /> |
|
||||
<field name="report_ids" /> |
|
||||
</page> |
|
||||
<page string="Security"> |
|
||||
<label for="group_ids"/> |
|
||||
<field name="group_ids"/> |
|
||||
<label for="right_ids"/> |
|
||||
<field name="right_ids"/> |
|
||||
<label for="rule_ids"/> |
|
||||
<field name="rule_ids"/> |
|
||||
</page> |
|
||||
<page string="Workflows"> |
|
||||
<label for="activity_ids" /> |
|
||||
<field name="activity_ids" /> |
|
||||
<label for="transition_ids" /> |
|
||||
<field name="transition_ids" /> |
|
||||
</page> |
|
||||
<page string="Website"> |
|
||||
</page> |
|
||||
</notebook> |
|
||||
</sheet> |
|
||||
</form> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
<group> |
||||
|
<field name="author" |
||||
|
placeholder="ex: Odoo Community Association"/> |
||||
|
<field name="website" widget="url" |
||||
|
placeholder="ex: http://odoo-community.org/"/> |
||||
|
<field name="maintainer" |
||||
|
placeholder="ex: Odoo Community Association"/> |
||||
|
<field name="auto_install"/> |
||||
|
<field name="application"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
<notebook> |
||||
|
<page string="Description"> |
||||
|
<field name="description"/> |
||||
|
</page> |
||||
|
<page string="Dependencies"> |
||||
|
<field name="dependency_ids"/> |
||||
|
</page> |
||||
|
<page string="Fields"> |
||||
|
<label for="field_ids"/> |
||||
|
<field name="field_ids"/> |
||||
|
</page> |
||||
|
<page string="Interface"> |
||||
|
<label for="view_ids"/> |
||||
|
<field name="view_ids"/> |
||||
|
<label for="menu_ids"/> |
||||
|
<field name="menu_ids"/> |
||||
|
</page> |
||||
|
<page string="Data & Demo"> |
||||
|
<label for="data_ids"/> |
||||
|
<field name="data_ids"/> |
||||
|
<label for="demo_ids"/> |
||||
|
<field name="demo_ids"/> |
||||
|
</page> |
||||
|
<page string="Reports"> |
||||
|
<label for="report_ids" /> |
||||
|
<field name="report_ids" /> |
||||
|
</page> |
||||
|
<page string="Security"> |
||||
|
<label for="group_ids"/> |
||||
|
<field name="group_ids"/> |
||||
|
<label for="right_ids"/> |
||||
|
<field name="right_ids"/> |
||||
|
<label for="rule_ids"/> |
||||
|
<field name="rule_ids"/> |
||||
|
</page> |
||||
|
<page string="Workflows"> |
||||
|
<label for="activity_ids" /> |
||||
|
<field name="activity_ids" /> |
||||
|
<label for="transition_ids" /> |
||||
|
<field name="transition_ids" /> |
||||
|
</page> |
||||
|
<page string="Website"> |
||||
|
</page> |
||||
|
</notebook> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
<record id="open_module_prototyper_list" model="ir.actions.act_window"> |
|
||||
<field name="name">Prototypes</field> |
|
||||
<field name="res_model">module_prototyper</field> |
|
||||
<field name="view_type">form</field> |
|
||||
<field name="view_mode">tree,form</field> |
|
||||
<field name="view_id" ref="module_prototyper_base_tree_view"/> |
|
||||
</record> |
|
||||
|
<record id="open_module_prototyper_list" model="ir.actions.act_window"> |
||||
|
<field name="name">Prototypes</field> |
||||
|
<field name="res_model">module_prototyper</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
<field name="view_id" ref="module_prototyper_base_tree_view"/> |
||||
|
</record> |
||||
|
|
||||
<!--Here a menu is created to help user to have all what he needs--> |
|
||||
<!--under his mouse with ease--> |
|
||||
<menuitem id="menu_module_prototyper" |
|
||||
name="Module Prototypes" |
|
||||
parent="base.menu_administration" |
|
||||
sequence="1"/> |
|
||||
|
<!--Here a menu is created to help user to have all what he needs--> |
||||
|
<!--under his mouse with ease--> |
||||
|
<menuitem id="menu_module_prototyper" |
||||
|
name="Module Prototypes" |
||||
|
parent="base.menu_administration" |
||||
|
sequence="1"/> |
||||
|
|
||||
<menuitem id="menu_open_module_prototyper" |
|
||||
action="open_module_prototyper_list" |
|
||||
parent="menu_module_prototyper" |
|
||||
sequence="1" |
|
||||
groups="base.group_system"/> |
|
||||
|
<menuitem id="menu_open_module_prototyper" |
||||
|
action="open_module_prototyper_list" |
||||
|
parent="menu_module_prototyper" |
||||
|
sequence="1" |
||||
|
groups="base.group_system"/> |
||||
|
|
||||
<menuitem action="base.action_ui_view" |
|
||||
id="menu_action_ui_view" |
|
||||
parent="menu_module_prototyper" |
|
||||
sequence="2" |
|
||||
groups="base.group_system"/> |
|
||||
|
<menuitem action="base.action_ui_view" |
||||
|
id="menu_action_ui_view" |
||||
|
parent="menu_module_prototyper" |
||||
|
sequence="2" |
||||
|
groups="base.group_system"/> |
||||
|
|
||||
<menuitem action="base.grant_menu_access" |
|
||||
id="menu_grant_menu_access" |
|
||||
parent="menu_module_prototyper" |
|
||||
sequence="3" |
|
||||
groups="base.group_system"/> |
|
||||
|
<menuitem action="base.grant_menu_access" |
||||
|
id="menu_grant_menu_access" |
||||
|
parent="menu_module_prototyper" |
||||
|
sequence="3" |
||||
|
groups="base.group_system"/> |
||||
|
|
||||
<menuitem action="base.action_model_fields" |
|
||||
id="ir_model_model_fields" |
|
||||
parent="menu_module_prototyper" |
|
||||
sequence="4" |
|
||||
groups="base.group_system"/> |
|
||||
|
<menuitem action="base.action_model_fields" |
||||
|
id="ir_model_model_fields" |
||||
|
parent="menu_module_prototyper" |
||||
|
sequence="4" |
||||
|
groups="base.group_system"/> |
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</odoo> |
@ -1,43 +1,41 @@ |
|||||
<?xml version="1.0"?> |
<?xml version="1.0"?> |
||||
<openerp> |
|
||||
<data> |
|
||||
|
<odoo> |
||||
|
|
||||
<record id="view_module_export_wizard" model="ir.ui.view"> |
<record id="view_module_export_wizard" model="ir.ui.view"> |
||||
<field name="name">Export Module</field> |
|
||||
<field name="model">module_prototyper.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="action_export" 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> |
|
||||
|
<field name="name">Export Module</field> |
||||
|
<field name="model">module_prototyper.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" widget="selection"/> |
||||
|
</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="action_export" 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> |
||||
|
|
||||
<record id="button_module_export_action" model="ir.actions.act_window"> |
<record id="button_module_export_action" model="ir.actions.act_window"> |
||||
<field name="name">Export Module</field> |
|
||||
<field name="res_model">module_prototyper.module.export</field> |
|
||||
<field name="view_type">form</field> |
|
||||
<field name="view_id" ref="view_module_export_wizard"/> |
|
||||
<field name="target">new</field> |
|
||||
|
<field name="name">Export Module</field> |
||||
|
<field name="res_model">module_prototyper.module.export</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_id" ref="view_module_export_wizard"/> |
||||
|
<field name="target">new</field> |
||||
</record> |
</record> |
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue