-
-
Notifications
You must be signed in to change notification settings - Fork 881
[13.0][ADD] report_dynamic - Lets Odoo users build reports #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 13.0
Are you sure you want to change the base?
Changes from all commits
3953f7f
11c7891
c9daa24
cc36300
bf435c0
617952e
e02dea5
c1b3cd4
a009ce2
e802e5b
246aa7b
b88806a
e316eec
ac925ff
4c9a866
e5ad3d3
d3cdbaf
c60d8f1
affc36a
92d5799
18b3776
ee68255
5fc1ba1
4dbabd9
25722ae
c51fe59
cbd0e90
32785aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
|
thomaspaulb marked this conversation as resolved.
|
||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-3 | ||
|
|
||
| ================= | ||
| Report Dynamic | ||
| ================= | ||
|
|
||
| Generate dynamic contracts based on Building Blocks/Section | ||
|
|
||
| Installation | ||
| ============ | ||
| * Just Install | ||
|
simahawk marked this conversation as resolved.
|
||
|
|
||
| Configuration | ||
| ============= | ||
| * No configurations needed | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| * Sunflower IT <[email protected]> | ||
|
|
||
|
|
||
|
|
||
| Maintainer | ||
| ---------- | ||
|
|
||
| This module is maintained by Sunflower IT <http://sunflowerweb.nl> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
|
||
| from . import models | ||
| from . import utils | ||
| from . import wizards |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright 2022 Sunflower IT <http://sunflowerweb.nl> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
|
||
| { | ||
| "name": "Report Dynamic", | ||
| "version": "13.0.1.0.0", | ||
| "category": "Report", | ||
| "author": "Sunflower IT, Therp BV, Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/reporting-engine", | ||
| "license": "AGPL-3", | ||
|
thomaspaulb marked this conversation as resolved.
|
||
| "development_status": "Alpha", | ||
| "summary": "Dynamic Report Builder", | ||
| "depends": ["base", "web_boolean_button"], | ||
| "data": [ | ||
| "security/res_groups.xml", | ||
| "security/ir_rule.xml", | ||
| "security/ir.model.access.csv", | ||
| "data/res_users.xml", | ||
| "data/report_dynamic_alias.xml", | ||
| "report/report_dynamic_report.xml", | ||
| "views/report_dynamic.xml", | ||
| "views/report_dynamic_section.xml", | ||
| "views/report_dynamic_alias.xml", | ||
| "wizards/wizard_lock_report.xml", | ||
| "wizards/wizard_report_dynamic.xml", | ||
| ], | ||
| "maintainers": ["thomaspaulb"], | ||
| "demo": ["demo/demo.xml"], | ||
| "installable": True, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
| <record id="alias_1" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H1val]</field> | ||
| <field name="expression_to">${h.value}</field> | ||
| </record> | ||
| <record id="alias_2" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H2val]</field> | ||
| <field name="expression_to">${h.child.value}</field> | ||
| </record> | ||
| <record id="alias_3" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H3val]</field> | ||
| <field name="expression_to">${h.child.child.value}</field> | ||
| </record> | ||
| <record id="alias_4" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H1]</field> | ||
| <field name="expression_to">${h.next}</field> | ||
| </record> | ||
| <record id="alias_5" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H2]</field> | ||
| <field name="expression_to">${h.value}.${h.child.next}</field> | ||
| </record> | ||
| <record id="alias_6" model="report.dynamic.alias"> | ||
| <field name="expression_from">[H3]</field> | ||
| <field | ||
| name="expression_to" | ||
| >${h.value}.${h.child.value}.${h.child.child.next}</field> | ||
| </record> | ||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
| <!-- Make admin a report dynamic admin by default--> | ||
| <record id="base.user_admin" model="res.users"> | ||
| <field | ||
| name="groups_id" | ||
| eval="[(4,ref('group_report_dynamic_template_editors'))]" | ||
| /> | ||
| </record> | ||
|
|
||
| </odoo> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo noupdate="1"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure about using noupdate for demo data? |
||
| <!-- template for demo_report_1 --> | ||
| <record id="demo_template_1" model="report.dynamic"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't know it is my problem only, but noupdate flag is ignored and second test fire up is blocked by _constrain_template_status
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. normally demo data is loaded only w/ |
||
| <field name="name">Template for report</field> | ||
| <field name="model_id" ref="base.model_res_partner" /> | ||
| <field name="is_template">True</field> | ||
| </record> | ||
| <!-- Reports --> | ||
| <record id="demo_report_1" model="report.dynamic"> | ||
| <field name="name">Demo report</field> | ||
| <field name="resource_ref" ref="base.res_partner_1" /> | ||
| <field name="template_id" ref="demo_template_1" /> | ||
| </record> | ||
| <!-- Sections --> | ||
| <record id="demo_section_1" model="report.dynamic.section"> | ||
| <field name="name">A paragraph</field> | ||
| <field name="is_paragraph">True</field> | ||
| <field name="content">Some Black content</field> | ||
| <field name="condition_python">object.name.startswith("D")</field> | ||
| <field name="report_id" ref="demo_template_1" /> | ||
| </record> | ||
| <record id="demo_section_2" model="report.dynamic.section"> | ||
| <field name="name">Not a paragraph</field> | ||
| <field name="is_paragraph">False</field> | ||
| <field name="content"> | ||
| ${object.name} | ||
| [H1] # 1 | ||
| ${page} | ||
| [H2] # 1.1 | ||
| ${page} | ||
| [H2] # 1.2 | ||
| ${page} | ||
| [H2] # 1.3 | ||
|
|
||
| [H3] # 1.3.1 | ||
| ${page} | ||
| [H3] # 1.3.2 | ||
| ${page} | ||
| [H3] # 1.3.3 | ||
| ${page} | ||
| [H3] # 1.3.4 | ||
| ${page} | ||
| [H1] # 2 | ||
| ${page} | ||
| [H2] # 2.1 | ||
| ${page} | ||
| [H2] # 2.2 | ||
| ${page} | ||
| [H3] # 2.2.1 | ||
| ${page} | ||
| [H1val].[H2val].[H3val] # 2.2.1 | ||
| </field> | ||
| <field name="condition_python">object.name.endswith("r")</field> | ||
| <field name="report_id" ref="demo_template_1" /> | ||
| </record> | ||
| <!-- Aliases --> | ||
| <record id="demo_alias_1" model="report.dynamic.alias"> | ||
| <field name="expression_from">Black</field> | ||
| <field name="expression_to">White</field> | ||
| </record> | ||
| <record id="demo_alias_2" model="report.dynamic.alias"> | ||
| <field name="expression_from">${object.name}</field> | ||
| <field name="expression_to">Name: ${object.name}</field> | ||
| </record> | ||
| <!-- Make Marc Demo a dynamic report reader--> | ||
| <record id="base.user_demo" model="res.users"> | ||
| <field name="groups_id" eval="[(4,ref('group_report_dynamic_report_users'))]" /> | ||
| </record> | ||
| </odoo> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
| from . import report_dynamic | ||
| from . import report_dynamic_section | ||
| from . import report_dynamic_alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls rebase after #726 is merged and trash this change