Skip to content

Commit

Permalink
Merge pull request #85 from Escodoo/14.0-imp-mis_builder_custom_reports
Browse files Browse the repository at this point in the history
[14.0][IMP] mis_builder_custom_reports: make label optional in report
  • Loading branch information
marcelsavegnago authored Nov 20, 2024
2 parents dac8d4d + 5a6c93d commit a30db54
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 5 deletions.
1 change: 1 addition & 0 deletions mis_builder_custom_reports/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"depends": ["mis_builder"],
"data": [
"views/mis_report.xml",
"views/mis_report_instance.xml",
"report/mis_report_instance_qweb.xml",
],
"demo": [],
Expand Down
5 changes: 5 additions & 0 deletions mis_builder_custom_reports/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ msgstr ""
msgid "Is Profit or Loss?"
msgstr "É Lucro ou Prejuizo?"

#. module: mis_builder_custom_reports
#: model:ir.model.fields,field_description:mis_builder_custom_reports.field_mis_report_instance__is_round_numbers
msgid "Is Round Numbers"
msgstr "Números Arredondados?"

#. module: mis_builder_custom_reports
#: model:ir.model.fields,field_description:mis_builder_custom_reports.field_mis_report_kpi____last_update
msgid "Last Modified on"
Expand Down
1 change: 1 addition & 0 deletions mis_builder_custom_reports/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import kpimatrix
from . import mis_report_instance
from . import mis_report
11 changes: 11 additions & 0 deletions mis_builder_custom_reports/models/mis_report_instance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 - TODAY, Wesley Oliveira <wesley.oliveira@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MisReportInstance(models.Model):

_inherit = "mis.report.instance"

is_round_numbers = fields.Boolean(default=False)
12 changes: 7 additions & 5 deletions mis_builder_custom_reports/report/mis_report_instance_qweb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<img
t-if="company_id.logo"
t-att-src="image_data_uri(company_id.logo)"
style="max-height: 45px; border-right: 1px solid gray;"
style="max-height: 45px;"
alt="Logo"
/>
</div>
Expand All @@ -54,11 +54,13 @@
/>
</div>
</div>
<div class="row">
<div class="col-12">
<span>(In thousands of reais - R$)</span>
<t t-if="o.is_round_numbers">
<div class="row">
<div class="col-12">
<span>(In thousands of reais - R$)</span>
</div>
</div>
</div>
</t>
<div
t-if="company_id.logo or company_id.report_header"
class="row zero_min_height"
Expand Down
19 changes: 19 additions & 0 deletions mis_builder_custom_reports/views/mis_report_instance.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2024 - TODAY, Wesley Oliveira <wesley.oliveira@escodoo.com.br>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

<record model="ir.ui.view" id="mis_report_instance_view_form">
<field
name="name"
>mis.report.instance.view.form (in mis_builder_custom_reports)</field>
<field name="model">mis.report.instance</field>
<field name="inherit_id" ref="mis_builder.mis_report_instance_view_form" />
<field name="arch" type="xml">
<field name="hide_analytic_filters" position="after">
<field name="is_round_numbers" />
</field>
</field>
</record>

</odoo>

0 comments on commit a30db54

Please sign in to comment.