Skip to content

Commit 8574951

Browse files
committed
Fix Pre-commit
1 parent 9ec51b7 commit 8574951

14 files changed

Lines changed: 152 additions & 133 deletions

File tree

web_pivot_computed_measure/README.rst

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Web Pivot Computed Measure
2020
:target: https://github.com/OCA/web/tree/17.0/web_pivot_computed_measure
2121
:alt: OCA/web
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_pivot_computed_measure
23+
:target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_pivot_computed_measure
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
2626
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0
@@ -38,37 +38,48 @@ Adds support for computed measures on the pivot view.
3838
Usage
3939
=====
4040

41-
Go to pivot view and click on the "Measures" menu, you will see
42-
a new option called 'Computed Measure'.
41+
Go to pivot view and click on the "Measures" menu, you will see a new
42+
option called 'Computed Measure'.
4343

4444
You have the follow options to create a 'computed measure':
45-
- Measure 1: Used in 'operation formula' as 'm1'
46-
- Measure 2: Used in 'operation formula' as 'm2'
47-
- Operation: The formula
48-
- Sum: m1 + m2
49-
- Sub: m1 - m2
50-
- Mult: m1 * m2
51-
- Div: m1 / m2 (Format: Float)
52-
- Perc m1 / m2 (Format: Percentage)
53-
- Custom: Special option only visible in debug mode to write a custom formula.
54-
- Name: The name of the new measure (emtpy = auto-generated)
55-
- Format: How will the value be printed
56-
- Integer
57-
- Float
58-
- Percentage (value * 100)
59-
- Formula*: Custom operation formula
60-
These formula is evaluated using 'PY.eval'
61-
62-
These computed measures can be mixed (You can reuse it to make new computed measures) and saved as favorites.
63-
64-
Notice that "measures/computed measures" involved in an active 'computed measure'
65-
can't be deactivated until you have deactivate the 'computed measure'.
45+
46+
- Measure 1: Used in 'operation formula' as 'm1'
47+
48+
- Measure 2: Used in 'operation formula' as 'm2'
49+
50+
- Operation: The formula
51+
52+
- Sum: m1 + m2
53+
- Sub: m1 - m2
54+
- Mult: m1 \* m2
55+
- Div: m1 / m2 (Format: Float)
56+
- Perc m1 / m2 (Format: Percentage)
57+
- Custom: Special option only visible in debug mode to write a custom
58+
formula.
59+
60+
- Name: The name of the new measure (emtpy = auto-generated)
61+
62+
- Format: How will the value be printed
63+
64+
- Integer
65+
- Float
66+
- Percentage (value \* 100)
67+
68+
- | Formula\*: Custom operation formula
69+
| These formula is evaluated using 'PY.eval'
70+
71+
These computed measures can be mixed (You can reuse it to make new
72+
computed measures) and saved as favorites.
73+
74+
Notice that "measures/computed measures" involved in an active 'computed
75+
measure' can't be deactivated until you have deactivate the 'computed
76+
measure'.
6677

6778
Known issues / Roadmap
6879
======================
6980

70-
#. Add support to define a style for a computed measure (ex. colored)
71-
#. Use t-model to data-binding instead of jquery selectors
81+
1. Add support to define a style for a computed measure (ex. colored)
82+
2. Use t-model to data-binding instead of jquery selectors
7283

7384
Bug Tracker
7485
===========
@@ -84,26 +95,22 @@ Credits
8495
=======
8596

8697
Authors
87-
~~~~~~~
98+
-------
8899

89100
* Tecnativa
90101

91102
Contributors
92-
~~~~~~~~~~~~
93-
94-
* `Tecnativa <https://www.tecnativa.com/>`_:
95-
96-
* Alexandre D. Díaz
97-
* Pedro M. Baeza
98-
* Ernesto Tejeda
99-
* Carlos Roca
103+
------------
100104

101-
* `TradeSolutions.Digital GmbH <https://www.tradesolutions.digital/>`_:
105+
- `Tecnativa <https://www.tecnativa.com/>`__:
102106

103-
* Mitul Shah
107+
- Alexandre D. Díaz
108+
- Pedro M. Baeza
109+
- Ernesto Tejeda
110+
- Carlos Roca
104111

105112
Maintainers
106-
~~~~~~~~~~~
113+
-----------
107114

108115
This module is maintained by the OCA.
109116

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- [Tecnativa](https://www.tecnativa.com/):
2+
- Alexandre D. Díaz
3+
- Pedro M. Baeza
4+
- Ernesto Tejeda
5+
- Carlos Roca

web_pivot_computed_measure/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. Add support to define a style for a computed measure (ex. colored)
2+
2. Use t-model to data-binding instead of jquery selectors

web_pivot_computed_measure/readme/ROADMAP.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Go to pivot view and click on the "Measures" menu, you will see a new
2+
option called 'Computed Measure'.
3+
4+
You have the follow options to create a 'computed measure':
5+
- Measure 1: Used in 'operation formula' as 'm1'
6+
7+
- Measure 2: Used in 'operation formula' as 'm2'
8+
9+
- Operation: The formula
10+
- Sum: m1 + m2
11+
- Sub: m1 - m2
12+
- Mult: m1 \* m2
13+
- Div: m1 / m2 (Format: Float)
14+
- Perc m1 / m2 (Format: Percentage)
15+
- Custom: Special option only visible in debug mode to write a custom
16+
formula.
17+
18+
- Name: The name of the new measure (emtpy = auto-generated)
19+
20+
- Format: How will the value be printed
21+
- Integer
22+
- Float
23+
- Percentage (value \* 100)
24+
25+
- Formula\*: Custom operation formula
26+
These formula is evaluated using 'PY.eval'
27+
28+
These computed measures can be mixed (You can reuse it to make new
29+
computed measures) and saved as favorites.
30+
31+
Notice that "measures/computed measures" involved in an active 'computed
32+
measure' can't be deactivated until you have deactivate the 'computed
33+
measure'.

web_pivot_computed_measure/readme/USAGE.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

web_pivot_computed_measure/static/description/index.html

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -9,10 +8,11 @@
98

109
/*
1110
:Author: David Goodger (goodger@python.org)
12-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -369,7 +369,7 @@ <h1 class="title">Web Pivot Computed Measure</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:4cef60dd775467b756ccbacb8c215bba0bc74fd32e1917c8b15c3be9de6302a1
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_pivot_computed_measure"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_pivot_computed_measure"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_pivot_computed_measure"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_pivot_computed_measure"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>Adds support for computed measures on the pivot view.</p>
374374
<p><strong>Table of contents</strong></p>
375375
<div class="contents local topic" id="contents">
@@ -387,48 +387,45 @@ <h1 class="title">Web Pivot Computed Measure</h1>
387387
</div>
388388
<div class="section" id="usage">
389389
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
390-
<p>Go to pivot view and click on the “Measures” menu, you will see
391-
a new option called ‘Computed Measure’.</p>
392-
<dl class="docutils">
393-
<dt>You have the follow options to create a ‘computed measure’:</dt>
394-
<dd><ul class="first last simple">
395-
<li>Measure 1: Used in ‘operation formula’ as ‘m1’</li>
396-
<li>Measure 2: Used in ‘operation formula’ as ‘m2’</li>
397-
<li><dl class="first docutils">
398-
<dt>Operation: The formula</dt>
399-
<dd><ul class="first last">
390+
<p>Go to pivot view and click on the “Measures” menu, you will see a new
391+
option called ‘Computed Measure’.</p>
392+
<p>You have the follow options to create a ‘computed measure’:</p>
393+
<ul>
394+
<li><p class="first">Measure 1: Used in ‘operation formula’ as ‘m1’</p>
395+
</li>
396+
<li><p class="first">Measure 2: Used in ‘operation formula’ as ‘m2’</p>
397+
</li>
398+
<li><p class="first">Operation: The formula</p>
399+
<ul class="simple">
400400
<li>Sum: m1 + m2</li>
401401
<li>Sub: m1 - m2</li>
402402
<li>Mult: m1 * m2</li>
403403
<li>Div: m1 / m2 (Format: Float)</li>
404404
<li>Perc m1 / m2 (Format: Percentage)</li>
405-
<li>Custom: Special option only visible in debug mode to write a custom formula.</li>
405+
<li>Custom: Special option only visible in debug mode to write a custom
406+
formula.</li>
406407
</ul>
407-
</dd>
408-
</dl>
409408
</li>
410-
<li>Name: The name of the new measure (emtpy = auto-generated)</li>
411-
<li><dl class="first docutils">
412-
<dt>Format: How will the value be printed</dt>
413-
<dd><ul class="first last">
409+
<li><p class="first">Name: The name of the new measure (emtpy = auto-generated)</p>
410+
</li>
411+
<li><p class="first">Format: How will the value be printed</p>
412+
<ul class="simple">
414413
<li>Integer</li>
415414
<li>Float</li>
416415
<li>Percentage (value * 100)</li>
417416
</ul>
418-
</dd>
419-
</dl>
420417
</li>
421-
<li><dl class="first docutils">
422-
<dt>Formula*: Custom operation formula</dt>
423-
<dd>These formula is evaluated using ‘PY.eval’</dd>
424-
</dl>
418+
<li><div class="first line-block">
419+
<div class="line">Formula*: Custom operation formula</div>
420+
<div class="line">These formula is evaluated using ‘PY.eval’</div>
421+
</div>
425422
</li>
426423
</ul>
427-
</dd>
428-
</dl>
429-
<p>These computed measures can be mixed (You can reuse it to make new computed measures) and saved as favorites.</p>
430-
<p>Notice that “measures/computed measures” involved in an active ‘computed measure’
431-
can’t be deactivated until you have deactivate the ‘computed measure’.</p>
424+
<p>These computed measures can be mixed (You can reuse it to make new
425+
computed measures) and saved as favorites.</p>
426+
<p>Notice that “measures/computed measures” involved in an active ‘computed
427+
measure’ can’t be deactivated until you have deactivate the ‘computed
428+
measure’.</p>
432429
</div>
433430
<div class="section" id="known-issues-roadmap">
434431
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
@@ -461,16 +458,16 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
461458
<li>Pedro M. Baeza</li>
462459
<li>Ernesto Tejeda</li>
463460
<li>Carlos Roca</li>
464-
<li><a class="reference external" href="https://www.tradesolutions.digital/">TradeSolutions.Digital GmbH</a>:<ul>
465-
<li>Mitul Shah</li>
466461
</ul>
467462
</li>
468463
</ul>
469464
</div>
470465
<div class="section" id="maintainers">
471466
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
472467
<p>This module is maintained by the OCA.</p>
473-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
468+
<a class="reference external image-reference" href="https://odoo-community.org">
469+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
470+
</a>
474471
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
475472
mission is to support the collaborative development of Odoo features and
476473
promote its widespread use.</p>

0 commit comments

Comments
 (0)