Andrea
8 years ago
12 changed files with 650 additions and 549 deletions
-
11bi_view_editor/README.rst
-
3bi_view_editor/__init__.py
-
8bi_view_editor/__openerp__.py
-
14bi_view_editor/hooks.py
-
2bi_view_editor/models/__init__.py
-
338bi_view_editor/models/bve_view.py
-
389bi_view_editor/models/ir_model.py
-
18bi_view_editor/security/rules.xml
-
20bi_view_editor/static/src/css/bve.css
-
285bi_view_editor/static/src/js/bve.js
-
2bi_view_editor/templates/assets_template.xml
-
109bi_view_editor/views/bve_view.xml
@ -1,5 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2015-2016 ONESTEiN BV (<http://www.onestein.eu>) |
|||
# Copyright 2015-2017 Onestein (<http://www.onestein.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
|||
from .hooks import uninstall_hook |
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2015-2017 Onestein (<http://www.onestein.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
|
|||
def uninstall_hook(cr, registry): |
|||
# delete dirty data that could cause problems |
|||
# while re-installing the module |
|||
cr.execute(""" |
|||
delete from ir_model where model like 'x_bve.%' |
|||
""") |
|||
cr.execute(""" |
|||
delete from bve_view where model_name like 'x_bve.%' |
|||
""") |
@ -1,5 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2015-2016 ONESTEiN BV (<http://www.onestein.eu>) |
|||
# Copyright 2015-2017 Onestein (<http://www.onestein.eu>) |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import bve_view |
|||
|
@ -1,13 +1,11 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<data noupdate="0"> |
|||
<odoo> |
|||
|
|||
<record model="ir.rule" id="bve_view_rule"> |
|||
<field name="name">bve_view read access</field> |
|||
<field name="model_id" search="[('model','=','bve.view')]" model="ir.model"/> |
|||
<field name="global" eval="True"/> |
|||
<field name="domain_force"> ['|',('user_ids','=',False),('user_ids','in',user.id)]</field> |
|||
</record> |
|||
<record id="bve_view_rule" model="ir.rule"> |
|||
<field name="name">bve_view read access</field> |
|||
<field name="model_id" search="[('model','=','bve.view')]" model="ir.model"/> |
|||
<field name="global" eval="True"/> |
|||
<field name="domain_force"> ['|',('user_ids','=',False),('user_ids','in',user.id)]</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
</odoo> |
@ -1,70 +1,69 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<openerp> |
|||
<data> |
|||
<odoo> |
|||
|
|||
<record id="view_bi_view_editor_view_tree" model="ir.ui.view"> |
|||
<field name="name">bve.view.tree</field> |
|||
<field name="model">bve.view</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Custom BI View"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="view_bi_view_editor_view_tree" model="ir.ui.view"> |
|||
<field name="model">bve.view</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Custom BI View"> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="view_bi_view_editor_view_form" model="ir.ui.view"> |
|||
<field name="name">bve.view.form</field> |
|||
<field name="model">bve.view</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Custom Object"> |
|||
<header> |
|||
<button name="action_reset" type="object" states="created" string="Reset to Draft"/> |
|||
<button name="action_create" type="object" states="draft" string="Generate BI View" class="oe_highlight" context="{'bve':True}"/> |
|||
<button name="open_view" type="object" states="created" string="Open BI View" class="oe_highlight"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,created" statusbar_colors='{"draft":"blue","created":"blue"}'/> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<record id="view_bi_view_editor_view_form" model="ir.ui.view"> |
|||
<field name="model">bve.view</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Custom Object"> |
|||
<header> |
|||
<button name="action_reset" type="object" states="created" string="Reset to Draft"/> |
|||
<button name="action_create" type="object" states="draft" string="Generate BI View" class="oe_highlight"/> |
|||
<button name="open_view" type="object" states="created" string="Open BI View" class="oe_highlight"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,created" statusbar_colors='{"draft":"blue","created":"blue"}'/> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="name" attrs="{'readonly': [('state','=','created')]}" colspan="4"/> |
|||
</h1> |
|||
<notebook> |
|||
</h1> |
|||
<notebook> |
|||
<page string="Query"> |
|||
<field name="data" widget="BVEEditor" nolabel="1" attrs="{'readonly': [('state','=','created')]}"/> |
|||
<group> |
|||
<field name="data" widget="BVEEditor" nolabel="1" attrs="{'readonly': [('state','=','created')]}"/> |
|||
</group> |
|||
</page> |
|||
<page string="Security"> |
|||
<field nolabel="1" name="group_ids" /> |
|||
<field nolabel="1" name="group_ids" /> |
|||
</page> |
|||
<page string="Notes"> |
|||
<field name="note" nolabel="1" colspan="4"/> |
|||
<field name="note" nolabel="1" colspan="4"/> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="action_bi_view_editor_view_form" model="ir.actions.act_window"> |
|||
<field name="name">Custom BI Views</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">bve.view</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
<record id="action_bi_view_editor_view_form" model="ir.actions.act_window"> |
|||
<field name="name">Custom BI Views</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">bve.view</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to create a Custom Query Object. |
|||
</p><p> |
|||
</p> |
|||
<p> |
|||
|
|||
</p> |
|||
</field> |
|||
</record> |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem id="menu_bi_view_editor_custom_reports" |
|||
name="Custom Reports" |
|||
parent="base.menu_board_root" |
|||
sequence="0"/> |
|||
<menuitem id="menu_bi_view_editor_view" |
|||
parent="menu_bi_view_editor_custom_reports" |
|||
action="action_bi_view_editor_view_form"/> |
|||
<menuitem id="menu_bi_view_editor_custom_reports" |
|||
name="Custom Reports" |
|||
parent="base.menu_board_root" |
|||
sequence="0"/> |
|||
<menuitem id="menu_bi_view_editor_view" |
|||
parent="menu_bi_view_editor_custom_reports" |
|||
action="action_bi_view_editor_view_form"/> |
|||
|
|||
</data> |
|||
</openerp> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue