-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1233 from OCA/16.0
Syncing from upstream OCA/web (16.0)
- Loading branch information
Showing
31 changed files
with
1,979 additions
and
1 deletion.
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
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 +1 @@ | ||
16.0.20240227.0 | ||
16.0.20240228.0 |
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
1 change: 1 addition & 0 deletions
1
setup/web_pivot_computed_measure/odoo/addons/web_pivot_computed_measure
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../web_pivot_computed_measure |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
odoo-test-helper |
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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
========================== | ||
Web Pivot Computed Measure | ||
========================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:4cef60dd775467b756ccbacb8c215bba0bc74fd32e1917c8b15c3be9de6302a1 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github | ||
:target: https://github.com/OCA/web/tree/16.0/web_pivot_computed_measure | ||
:alt: OCA/web | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_pivot_computed_measure | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Adds support for computed measures on the pivot view. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Go to pivot view and click on the "Measures" menu, you will see | ||
a new option called 'Computed Measure'. | ||
|
||
You have the follow options to create a 'computed measure': | ||
- Measure 1: Used in 'operation formula' as 'm1' | ||
- Measure 2: Used in 'operation formula' as 'm2' | ||
- Operation: The formula | ||
- Sum: m1 + m2 | ||
- Sub: m1 - m2 | ||
- Mult: m1 * m2 | ||
- Div: m1 / m2 (Format: Float) | ||
- Perc m1 / m2 (Format: Percentage) | ||
- Custom: Special option only visible in debug mode to write a custom formula. | ||
- Name: The name of the new measure (emtpy = auto-generated) | ||
- Format: How will the value be printed | ||
- Integer | ||
- Float | ||
- Percentage (value * 100) | ||
- Formula*: Custom operation formula | ||
These formula is evaluated using 'PY.eval' | ||
|
||
These computed measures can be mixed (You can reuse it to make new computed measures) and saved as favorites. | ||
|
||
Notice that "measures/computed measures" involved in an active 'computed measure' | ||
can't be deactivated until you have deactivate the 'computed measure'. | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
#. Add support to define a style for a computed measure (ex. colored) | ||
#. Use t-model to data-binding instead of jquery selectors | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_pivot_computed_measure%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Tecnativa <https://www.tecnativa.com/>`_: | ||
|
||
* Alexandre D. Díaz | ||
* Pedro M. Baeza | ||
* Ernesto Tejeda | ||
* Carlos Roca | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-CarlosRoca13| image:: https://github.com/CarlosRoca13.png?size=40px | ||
:target: https://github.com/CarlosRoca13 | ||
:alt: CarlosRoca13 | ||
|
||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-CarlosRoca13| | ||
|
||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_pivot_computed_measure>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2020 Tecnativa - Alexandre Díaz | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
{ | ||
"name": "Web Pivot Computed Measure", | ||
"category": "web", | ||
"version": "16.0.1.0.0", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/OCA/web", | ||
"depends": ["web"], | ||
"auto_install": False, | ||
"installable": True, | ||
"maintainers": ["CarlosRoca13"], | ||
"assets": { | ||
"web.assets_backend": [ | ||
"/web_pivot_computed_measure/static/src/**/*.esm.js", | ||
"/web_pivot_computed_measure/static/src/**/*.scss", | ||
("remove", "/web_pivot_computed_measure/static/src/test/*.esm.js"), | ||
"/web_pivot_computed_measure/static/src/**/*.xml", | ||
], | ||
"web.assets_tests": [ | ||
"/web_pivot_computed_measure/static/src/test/test.esm.js", | ||
], | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * web_pivot_computed_measure | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 13.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2021-07-05 12:48+0000\n" | ||
"Last-Translator: jabelchi <[email protected]>\n" | ||
"Language-Team: none\n" | ||
"Language: ca\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/view.xml:0 | ||
#, python-format | ||
msgid "!measure.startsWith('__computed_')" | ||
msgstr "" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Add" | ||
msgstr "Afegir" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Can be empty" | ||
msgstr "Pot estar buit" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Computed Measure" | ||
msgstr "Mesura calculada" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Custom" | ||
msgstr "Personalitat" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Div (m1 / m2)" | ||
msgstr "Div (m1 / m2)" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Float" | ||
msgstr "Comma flotant" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Format" | ||
msgstr "Format" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Formula" | ||
msgstr "Fórmula" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Integer" | ||
msgstr "Enter" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Measure 1" | ||
msgstr "Mesura 1" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Measure 2" | ||
msgstr "Mesura 2" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Mult (m1 * m2)" | ||
msgstr "Mult (m1 * m2)" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Name" | ||
msgstr "Nom" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Operation" | ||
msgstr "Operació" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Perc (m1 * 100 / m2)" | ||
msgstr "Perc (m1 * 100 / m2)" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Percentage" | ||
msgstr "Percentatge" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Sub (m1 - m2)" | ||
msgstr "Resta (m1 - m2)" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/dropdown_item_custom_measure/dropdown_item_custom_measure.xml:0 | ||
#, python-format | ||
msgid "Sum (m1 + m2)" | ||
msgstr "Suma (m1 + m2)" | ||
|
||
#. module: web_pivot_computed_measure | ||
#. openerp-web | ||
#: code:addons/web_pivot_computed_measure/static/src/pivot/pivot_model.esm.js:0 | ||
#, python-format | ||
msgid "" | ||
"This measure is currently used by a 'computed measure'. Please, disable the " | ||
"computed measure first." | ||
msgstr "" | ||
"Aquesta mesura s'usa actualment per una \"mesura calculada\". Si us plau, " | ||
"inhabiliteu primer la mesura calculada." |
Oops, something went wrong.