Skip to content

Commit ac40873

Browse files
committed
[MIG] web_pivot_computed_measure: migrate module
1 parent a41115b commit ac40873

25 files changed

Lines changed: 2109 additions & 0 deletions
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
==========================
2+
Web Pivot Computed Measure
3+
==========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:4cef60dd775467b756ccbacb8c215bba0bc74fd32e1917c8b15c3be9de6302a1
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
20+
:target: https://github.com/OCA/web/tree/17.0/web_pivot_computed_measure
21+
:alt: OCA/web
22+
.. |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
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Adds support for computed measures on the pivot view.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Usage
39+
=====
40+
41+
Go to pivot view and click on the "Measures" menu, you will see
42+
a new option called 'Computed Measure'.
43+
44+
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'.
66+
67+
Known issues / Roadmap
68+
======================
69+
70+
#. Add support to define a style for a computed measure (ex. colored)
71+
#. Use t-model to data-binding instead of jquery selectors
72+
73+
Bug Tracker
74+
===========
75+
76+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
77+
In case of trouble, please check there if your issue has already been reported.
78+
If you spotted it first, help us to smash it by providing a detailed and welcomed
79+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_pivot_computed_measure%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
80+
81+
Do not contact contributors directly about support or help with technical issues.
82+
83+
Credits
84+
=======
85+
86+
Authors
87+
~~~~~~~
88+
89+
* Tecnativa
90+
91+
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
100+
101+
* `TradeSolutions.Digital GmbH <https://www.tradesolutions.digital/>`_:
102+
103+
* Mitul Shah
104+
105+
Maintainers
106+
~~~~~~~~~~~
107+
108+
This module is maintained by the OCA.
109+
110+
.. image:: https://odoo-community.org/logo.png
111+
:alt: Odoo Community Association
112+
:target: https://odoo-community.org
113+
114+
OCA, or the Odoo Community Association, is a nonprofit organization whose
115+
mission is to support the collaborative development of Odoo features and
116+
promote its widespread use.
117+
118+
.. |maintainer-CarlosRoca13| image:: https://github.com/CarlosRoca13.png?size=40px
119+
:target: https://github.com/CarlosRoca13
120+
:alt: CarlosRoca13
121+
122+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
123+
124+
|maintainer-CarlosRoca13|
125+
126+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/17.0/web_pivot_computed_measure>`_ project on GitHub.
127+
128+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

web_pivot_computed_measure/__init__.py

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2020 Tecnativa - Alexandre Díaz
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
3+
{
4+
"name": "Web Pivot Computed Measure",
5+
"category": "web",
6+
"version": "17.0.1.0.0",
7+
"author": "Tecnativa, Odoo Community Association (OCA)",
8+
"license": "AGPL-3",
9+
"website": "https://github.com/OCA/web",
10+
"depends": ["web", "web_tour"],
11+
"auto_install": False,
12+
"installable": True,
13+
"maintainers": ["CarlosRoca13"],
14+
"assets": {
15+
"web.assets_backend": [
16+
"web_pivot_computed_measure/static/src/**/*.esm.js",
17+
"web_pivot_computed_measure/static/src/**/*.scss",
18+
"web_pivot_computed_measure/static/src/**/*.xml",
19+
],
20+
"web.assets_tests": [
21+
"web_pivot_computed_measure/static/src/test/test.esm.js",
22+
],
23+
},
24+
}
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * web_pivot_computed_measure
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 13.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2021-07-05 12:48+0000\n"
10+
"Last-Translator: jabelchi <jabelchi@gmail.com>\n"
11+
"Language-Team: none\n"
12+
"Language: ca\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.3.2\n"
18+
19+
#. module: web_pivot_computed_measure
20+
#. openerp-web
21+
#: code:addons/web_pivot_computed_measure/static/src/view.xml:0
22+
#, python-format
23+
msgid "!measure.startsWith('__computed_')"
24+
msgstr ""
25+
26+
#. module: web_pivot_computed_measure
27+
#. openerp-web
28+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
29+
#, python-format
30+
msgid "Add"
31+
msgstr "Afegir"
32+
33+
#. module: web_pivot_computed_measure
34+
#. openerp-web
35+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
36+
#, python-format
37+
msgid "Can be empty"
38+
msgstr "Pot estar buit"
39+
40+
#. module: web_pivot_computed_measure
41+
#. openerp-web
42+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
43+
#, python-format
44+
msgid "Computed Measure"
45+
msgstr "Mesura calculada"
46+
47+
#. module: web_pivot_computed_measure
48+
#. openerp-web
49+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
50+
#, python-format
51+
msgid "Custom"
52+
msgstr "Personalitat"
53+
54+
#. module: web_pivot_computed_measure
55+
#. openerp-web
56+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
57+
#, python-format
58+
msgid "Div (m1 / m2)"
59+
msgstr "Div (m1 / m2)"
60+
61+
#. module: web_pivot_computed_measure
62+
#. openerp-web
63+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
64+
#, python-format
65+
msgid "Float"
66+
msgstr "Comma flotant"
67+
68+
#. module: web_pivot_computed_measure
69+
#. openerp-web
70+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
71+
#, python-format
72+
msgid "Format"
73+
msgstr "Format"
74+
75+
#. module: web_pivot_computed_measure
76+
#. openerp-web
77+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
78+
#, python-format
79+
msgid "Formula"
80+
msgstr "Fórmula"
81+
82+
#. module: web_pivot_computed_measure
83+
#. openerp-web
84+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
85+
#, python-format
86+
msgid "Integer"
87+
msgstr "Enter"
88+
89+
#. module: web_pivot_computed_measure
90+
#. openerp-web
91+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
92+
#, python-format
93+
msgid "Measure 1"
94+
msgstr "Mesura 1"
95+
96+
#. module: web_pivot_computed_measure
97+
#. openerp-web
98+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
99+
#, python-format
100+
msgid "Measure 2"
101+
msgstr "Mesura 2"
102+
103+
#. module: web_pivot_computed_measure
104+
#. openerp-web
105+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
106+
#, python-format
107+
msgid "Mult (m1 * m2)"
108+
msgstr "Mult (m1 * m2)"
109+
110+
#. module: web_pivot_computed_measure
111+
#. openerp-web
112+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
113+
#, python-format
114+
msgid "Name"
115+
msgstr "Nom"
116+
117+
#. module: web_pivot_computed_measure
118+
#. openerp-web
119+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
120+
#, python-format
121+
msgid "Operation"
122+
msgstr "Operació"
123+
124+
#. module: web_pivot_computed_measure
125+
#. openerp-web
126+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
127+
#, python-format
128+
msgid "Perc (m1 * 100 / m2)"
129+
msgstr "Perc (m1 * 100 / m2)"
130+
131+
#. module: web_pivot_computed_measure
132+
#. openerp-web
133+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
134+
#, python-format
135+
msgid "Percentage"
136+
msgstr "Percentatge"
137+
138+
#. module: web_pivot_computed_measure
139+
#. openerp-web
140+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
141+
#, python-format
142+
msgid "Sub (m1 - m2)"
143+
msgstr "Resta (m1 - m2)"
144+
145+
#. module: web_pivot_computed_measure
146+
#. openerp-web
147+
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0
148+
#, python-format
149+
msgid "Sum (m1 + m2)"
150+
msgstr "Suma (m1 + m2)"
151+
152+
#. module: web_pivot_computed_measure
153+
#. openerp-web
154+
#: code:addons/web_pivot_computed_measure/static/src/pivot/pivot_model.esm.js:0
155+
#, python-format
156+
msgid ""
157+
"This measure is currently used by a 'computed measure'. Please, disable the "
158+
"computed measure first."
159+
msgstr ""
160+
"Aquesta mesura s'usa actualment per una \"mesura calculada\". Si us plau, "
161+
"inhabiliteu primer la mesura calculada."

0 commit comments

Comments
 (0)