diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/__manifest__.py b/__manifest__.py index 47ddefd..e07324e 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -17,6 +17,9 @@ 'web_decimal_style/static/src/views/fields/formatters_patch.js', 'web_decimal_style/static/src/views/fields/float_field.xml', 'web_decimal_style/static/src/views/fields/monetary_field.xml', + 'web_decimal_style/static/src/views/purchase_dashboard.xml', + 'web_decimal_style/static/src/views/purchase_dashboard_patch.js', + 'web_decimal_style/static/src/views/list_pivot_patch.xml', ], 'web.assets_frontend': [ 'web_decimal_style/static/src/css/decimal_style.css', @@ -24,6 +27,7 @@ 'web_decimal_style/static/src/views/fields/formatters_patch.js', 'web_decimal_style/static/src/views/fields/float_field.xml', 'web_decimal_style/static/src/views/fields/monetary_field.xml', + 'web_decimal_style/static/src/views/list_pivot_patch.xml', ], }, 'installable': True, diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..8d962c3 Binary files /dev/null and b/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/models/__pycache__/__init__.cpython-312.pyc b/models/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..daaf761 Binary files /dev/null and b/models/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__pycache__/purchase_order.cpython-312.pyc b/models/__pycache__/purchase_order.cpython-312.pyc new file mode 100644 index 0000000..687fc15 Binary files /dev/null and b/models/__pycache__/purchase_order.cpython-312.pyc differ diff --git a/static/src/views/list_pivot_patch.xml b/static/src/views/list_pivot_patch.xml new file mode 100644 index 0000000..ef91a1c --- /dev/null +++ b/static/src/views/list_pivot_patch.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + getFormattedVariation(cell) + + + + getFormattedValue(cell) + + + diff --git a/static/src/views/purchase_dashboard.xml b/static/src/views/purchase_dashboard.xml new file mode 100644 index 0000000..7ac0a92 --- /dev/null +++ b/static/src/views/purchase_dashboard.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/static/src/views/purchase_dashboard_patch.js b/static/src/views/purchase_dashboard_patch.js new file mode 100644 index 0000000..69bc2a9 --- /dev/null +++ b/static/src/views/purchase_dashboard_patch.js @@ -0,0 +1,11 @@ +/** @odoo-module **/ + +import { PurchaseDashBoard } from "@purchase/views/purchase_dashboard"; +import { patch } from "@web/core/utils/patch"; +import { wrapDecimal } from "@web_decimal_style/core/utils/numbers_patch"; + +patch(PurchaseDashBoard.prototype, { + formatDecimal(value) { + return wrapDecimal(value); + } +});