-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,316 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,17 @@ repos: | |
rev: "1.19.1" | ||
hooks: | ||
- id: prettier | ||
# TODO Avoid awebdeveloper/pre-commit-prettier if possible | ||
# HACK https://github.com/prettier/prettier/issues/7407 | ||
- repo: https://github.com/awebdeveloper/pre-commit-prettier | ||
rev: v0.0.1 | ||
hooks: | ||
- id: prettier | ||
name: prettier xml plugin | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "@prettier/[email protected]" | ||
files: \.xml$ | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v6.8.0 | ||
hooks: | ||
|
@@ -67,11 +78,11 @@ repos: | |
name: pylint with optional checks | ||
args: ["--rcfile=.pylintrc", "--exit-zero"] | ||
verbose: true | ||
additional_dependencies: ["pylint-odoo==3.0.3"] | ||
additional_dependencies: ["pylint-odoo==3.1.0"] | ||
- id: pylint | ||
name: pylint with mandatory checks | ||
args: ["--rcfile=.pylintrc-mandatory"] | ||
additional_dependencies: ["pylint-odoo==3.0.3"] | ||
additional_dependencies: ["pylint-odoo==3.1.0"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.26.2 | ||
hooks: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ printWidth: 88 | |
proseWrap: always | ||
semi: true | ||
trailingComma: "es5" | ||
xmlWhitespaceSensitivity: "ignore" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo noupdate="1"> | ||
|
||
<record id="ir_cron_vacuum_temp_reports" model="ir.cron"> | ||
<field name="name">Vacuum temporary reports</field> | ||
<field name="interval_number">4</field> | ||
<field name="interval_type">hours</field> | ||
<field name="numbercall">-1</field> | ||
<field eval="False" name="doall"/> | ||
<field ref="model_mis_report_instance" name="model_id"/> | ||
<field name="code">model._vacuum_report()</field> | ||
<field name="active" eval="True" /> | ||
</record> | ||
|
||
<record id="ir_cron_vacuum_temp_reports" model="ir.cron"> | ||
<field name="name">Vacuum temporary reports</field> | ||
<field name="interval_number">4</field> | ||
<field name="interval_type">hours</field> | ||
<field name="numbercall">-1</field> | ||
<field eval="False" name="doall" /> | ||
<field ref="model_mis_report_instance" name="model_id" /> | ||
<field name="code">model._vacuum_report()</field> | ||
<field name="active" eval="True" /> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,118 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
|
||
<record id="qweb_pdf_export" model="ir.actions.report"> | ||
<field name="name">MIS report instance QWEB PDF report</field> | ||
<field name="model">mis.report.instance</field> | ||
<field name="type">ir.actions.report</field> | ||
<field name="report_name">mis_builder.report_mis_report_instance</field> | ||
<field name="report_type">qweb-pdf</field> | ||
<field name="name">MIS report instance QWEB PDF report</field> | ||
<field name="model">mis.report.instance</field> | ||
<field name="type">ir.actions.report</field> | ||
<field name="report_name">mis_builder.report_mis_report_instance</field> | ||
<field name="report_type">qweb-pdf</field> | ||
</record> | ||
|
||
<template id="assets_report" inherit_id="web.report_assets_common"> | ||
<xpath expr="." position="inside"> | ||
<link href="/mis_builder/static/src/css/report.css" rel="stylesheet"/> | ||
<link href="/mis_builder/static/src/css/report.css" rel="stylesheet" /> | ||
</xpath> | ||
</template> | ||
|
||
<!-- | ||
TODO we use divs with css table layout, but this has drawbacks: | ||
(bad layout of first column, no colspan for first header row), | ||
consider getting back to a plain HTML table. | ||
--> | ||
|
||
<template id="report_mis_report_instance"> | ||
<t t-call="web.html_container"> | ||
<t t-foreach="docs" t-as="o"> | ||
<t t-call="web.internal_layout"> | ||
<t t-set="matrix" t-value="o._compute_matrix()"/> | ||
<t t-set="style_obj" t-value="o.env['mis.report.style']"/> | ||
<div class="page"> | ||
<h3><span t-field="o.name" /><span> - </span> | ||
<t t-foreach="o.query_company_ids" t-as="company"> | ||
<span t-field="company.name" /><span t-if="company != o.query_company_ids[-1]">, </span> | ||
</t> | ||
</h3> | ||
<p> | ||
<div class="mis_report_filers"> | ||
<t t-foreach="o.get_filter_descriptions_from_context()" t-as="filter_description"> | ||
<div> | ||
<span t-esc="filter_description"/> | ||
</div> | ||
</t> | ||
</div> | ||
</p> | ||
<div class="mis_table"> | ||
<div class="mis_thead"> | ||
<div class="mis_row"> | ||
<div class="mis_cell mis_collabel"></div> | ||
<t t-foreach="matrix.iter_cols()" t-as="col"> | ||
<div class="mis_cell mis_collabel"> | ||
<t t-esc="col.label"/> | ||
<t t-if="col.description"> | ||
<br/> | ||
<t t-esc="col.description"/> | ||
</t> | ||
</div> | ||
<!-- add empty cells because we have no colspan with css tables --> | ||
<t t-foreach="list(col.iter_subcols())[1:]" t-as="subcol"> | ||
<div class="mis_cell mis_collabel"></div> | ||
</t> | ||
</t> | ||
</div> | ||
<div class="mis_row"> | ||
<div class="mis_cell mis_collabel"></div> | ||
<t t-foreach="matrix.iter_subcols()" t-as="subcol"> | ||
<div class="mis_cell mis_collabel"> | ||
<t t-esc="subcol.label"/> | ||
<t t-if="subcol.description"> | ||
<br/> | ||
<t t-esc="subcol.description"/> | ||
</t> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
<div class="mis_tbody"> | ||
<t t-foreach="matrix.iter_rows()" t-as="row"> | ||
<div t-if="not ((row.style_props.hide_empty and row.is_empty()) or row.style_props.hide_always)" class="mis_row"> | ||
<div t-att-style="style_obj.to_css_style(row.style_props)" class="mis_cell mis_rowlabel"> | ||
<t t-esc="row.label"/> | ||
<t t-if="row.description"> | ||
<br/> | ||
<t t-esc="row.description"/> | ||
</t> | ||
</div> | ||
<t t-foreach="row.iter_cells()" t-as="cell"> | ||
<div t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" class="mis_cell mis_amount"> | ||
<t t-esc="cell and cell.val_rendered or ''"/> | ||
<t t-call="web.html_container"> | ||
<t t-foreach="docs" t-as="o"> | ||
<t t-call="web.internal_layout"> | ||
<t t-set="matrix" t-value="o._compute_matrix()" /> | ||
<t t-set="style_obj" t-value="o.env['mis.report.style']" /> | ||
<div class="page"> | ||
<h3> | ||
<span t-field="o.name" /> | ||
<span> - </span> | ||
<t t-foreach="o.query_company_ids" t-as="company"> | ||
<span t-field="company.name" /> | ||
<span | ||
t-if="company != o.query_company_ids[-1]" | ||
>, </span> | ||
</t> | ||
</h3> | ||
<p> | ||
<div class="mis_report_filers"> | ||
<t | ||
t-foreach="o.get_filter_descriptions_from_context()" | ||
t-as="filter_description" | ||
> | ||
<div> | ||
<span t-esc="filter_description" /> | ||
</div> | ||
</t> | ||
</div> | ||
</p> | ||
<div class="mis_table"> | ||
<div class="mis_thead"> | ||
<div class="mis_row"> | ||
<div class="mis_cell mis_collabel" /> | ||
<t t-foreach="matrix.iter_cols()" t-as="col"> | ||
<div class="mis_cell mis_collabel"> | ||
<t t-esc="col.label" /> | ||
<t t-if="col.description"> | ||
<br /> | ||
<t t-esc="col.description" /> | ||
</t> | ||
</div> | ||
<!-- add empty cells because we have no colspan with css tables --> | ||
<t | ||
t-foreach="list(col.iter_subcols())[1:]" | ||
t-as="subcol" | ||
> | ||
<div class="mis_cell mis_collabel" /> | ||
</t> | ||
</t> | ||
</div> | ||
<div class="mis_row"> | ||
<div class="mis_cell mis_collabel" /> | ||
<t t-foreach="matrix.iter_subcols()" t-as="subcol"> | ||
<div class="mis_cell mis_collabel"> | ||
<t t-esc="subcol.label" /> | ||
<t t-if="subcol.description"> | ||
<br /> | ||
<t t-esc="subcol.description" /> | ||
</t> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
<div class="mis_tbody"> | ||
<t t-foreach="matrix.iter_rows()" t-as="row"> | ||
<div | ||
t-if="not ((row.style_props.hide_empty and row.is_empty()) or row.style_props.hide_always)" | ||
class="mis_row" | ||
> | ||
<div | ||
t-att-style="style_obj.to_css_style(row.style_props)" | ||
class="mis_cell mis_rowlabel" | ||
> | ||
<t t-esc="row.label" /> | ||
<t t-if="row.description"> | ||
<br /> | ||
<t t-esc="row.description" /> | ||
</t> | ||
</div> | ||
<t t-foreach="row.iter_cells()" t-as="cell"> | ||
<div | ||
t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" | ||
class="mis_cell mis_amount" | ||
> | ||
<t | ||
t-esc="cell and cell.val_rendered or ''" | ||
/> | ||
</div> | ||
</t> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
</t> | ||
</div> | ||
</t> | ||
</div> | ||
</div> | ||
</div> | ||
</t> | ||
</t> | ||
</t> | ||
</t> | ||
</t> | ||
</template> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<record id="mis_builder_multi_company_rule" model="ir.rule"> | ||
<field name="name">Mis Report Instance multi company</field> | ||
<field name="model_id" ref="model_mis_report_instance"/> | ||
<field name="domain_force">['|',('company_id','=',False),('company_id','in',company_ids)]</field> | ||
<field name="model_id" ref="model_mis_report_instance" /> | ||
<field | ||
name="domain_force" | ||
>['|',('company_id','=',False),('company_id','in',company_ids)]</field> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.