Pivot View Background Color by Measure Values
by MAC5 https://apps.odoo.com/apps/modules/browse?author=MAC5$ 113.57
Availability |
Odoo Online
Odoo.sh
On Premise
|
Technical Name |
pivot_view_bgcolor_mac5 |
License | OPL-1 |
Website | https://apps.odoo.com/apps/modules/browse?author=MAC5 |
Versions | 14.0 15.0 16.0 17.0 18.0 |
Pivot View Background Color by Measure Values
Configure how red, yellow, and green background colors will be shown in the pivot view based on measure values
Features:
- Background colors in pivot view
- Background colors to be shown as red if below expected value, yellow if it's on the range of expected values and green if above expected value
- Background colors can be added per measure per menu item > action

Configuration
Configuration can be found in Settings > Techinical > User Interface > Menu Items. User must have an Adminstrator access for this.
Select a menu item with pivot view. For this instance, we have selected Invoice Analysis. Then click the internal link for the Action field.


In the Context Value field, add a new key pivot_bgcolor and the value must be a dictionary. Inside the dictionary, the key must be a measure (or an integer / float field) for that model and the value must be the range. For this instance, we have added 'pivot_bgcolor': {'price_margin': [-0.01, 0.01]}
inside the context. You can add more measures with different range values.
Note that the background colors are dependent on the range values you have entered. Red will be shown if below the range, yellow will be shown if between the range and green will be shown if above the range.
Compatibility
This module is compatible with Odoo 17.0 Community and Enterprise Editions
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module