[FIX] spreadsheet_dashboard_sale : Revenue must be in company's currency
To Reproduce ============ - enable a currency and make it for example = 0.01$ - create pricelist for that currency - make sale order with that pricelist (let's say 1000 = 10$) - on dashboards the Revenue will be 1 000$ Problem ======== on spreadsheet we use the field `amount_untaxed` from `sale.order`, which contains the amount in the currency of the sale order and not the company. Solution ======== as `sale.oder` module doesn't have any field containing the converted amount, we will use the field `price_subtotal` from `sale.report` opw-3527802 closes odoo/odoo#142930 X-original-commit: 99a6389905785ab7cb3a1b2b0d546170caaa28c9 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
This commit is contained in:
@@ -2036,22 +2036,22 @@
|
||||
"content": "=_t(\"Current\")"
|
||||
},
|
||||
"B2": {
|
||||
"content": "=ODOO.PIVOT(11,\"__count\",\"state\",\"draft\")"
|
||||
"content": "=ODOO.PIVOT(11,\"order_reference\",\"state\",\"draft\")"
|
||||
},
|
||||
"B3": {
|
||||
"content": "=ODOO.PIVOT(11,\"__count\",\"state\",\"sent\")"
|
||||
"content": "=ODOO.PIVOT(11,\"order_reference\",\"state\",\"sent\")"
|
||||
},
|
||||
"B4": {
|
||||
"content": "=B2+B3"
|
||||
},
|
||||
"B5": {
|
||||
"content": "=ODOO.PIVOT(11,\"__count\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(11,\"order_reference\",\"state\",\"sale\")"
|
||||
},
|
||||
"B6": {
|
||||
"content": "=ODOO.PIVOT(11,\"__count\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(11,\"order_reference\",\"state\",\"sale\")"
|
||||
},
|
||||
"B7": {
|
||||
"content": "=ODOO.PIVOT(11,\"amount_untaxed\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(11,\"price_subtotal\",\"state\",\"sale\")"
|
||||
},
|
||||
"B8": {
|
||||
"content": "=IFERROR(B7/B6)"
|
||||
@@ -2061,22 +2061,22 @@
|
||||
"content": "=_t(\"Previous\")"
|
||||
},
|
||||
"C2": {
|
||||
"content": "=ODOO.PIVOT(12,\"__count\",\"state\",\"draft\")"
|
||||
"content": "=ODOO.PIVOT(12,\"order_reference\",\"state\",\"draft\")"
|
||||
},
|
||||
"C3": {
|
||||
"content": "=ODOO.PIVOT(12,\"__count\",\"state\",\"sent\")"
|
||||
"content": "=ODOO.PIVOT(12,\"order_reference\",\"state\",\"sent\")"
|
||||
},
|
||||
"C4": {
|
||||
"content": "=C2+C3"
|
||||
},
|
||||
"C5": {
|
||||
"content": "=ODOO.PIVOT(12,\"__count\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(12,\"order_reference\",\"state\",\"sale\")"
|
||||
},
|
||||
"C6": {
|
||||
"content": "=ODOO.PIVOT(12,\"__count\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(12,\"order_reference\",\"state\",\"sale\")"
|
||||
},
|
||||
"C7": {
|
||||
"content": "=ODOO.PIVOT(12,\"amount_untaxed\",\"state\",\"sale\")"
|
||||
"content": "=ODOO.PIVOT(12,\"price_subtotal\",\"state\",\"sale\")"
|
||||
},
|
||||
"C8": {
|
||||
"content": "=IFERROR(C7/C6)"
|
||||
@@ -2765,13 +2765,13 @@
|
||||
"id": "11",
|
||||
"measures": [
|
||||
{
|
||||
"field": "__count"
|
||||
"field": "order_reference"
|
||||
},
|
||||
{
|
||||
"field": "amount_untaxed"
|
||||
"field": "price_subtotal"
|
||||
}
|
||||
],
|
||||
"model": "sale.order",
|
||||
"model": "sale.report",
|
||||
"rowGroupBys": [
|
||||
"state"
|
||||
],
|
||||
@@ -2793,13 +2793,13 @@
|
||||
"id": "12",
|
||||
"measures": [
|
||||
{
|
||||
"field": "__count"
|
||||
"field": "order_reference"
|
||||
},
|
||||
{
|
||||
"field": "amount_untaxed"
|
||||
"field": "price_subtotal"
|
||||
}
|
||||
],
|
||||
"model": "sale.order",
|
||||
"model": "sale.report",
|
||||
"rowGroupBys": [
|
||||
"state"
|
||||
],
|
||||
@@ -2858,12 +2858,12 @@
|
||||
"offset": 0
|
||||
},
|
||||
"11": {
|
||||
"field": "date_order",
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": 0
|
||||
},
|
||||
"12": {
|
||||
"field": "date_order",
|
||||
"field": "date",
|
||||
"type": "datetime",
|
||||
"offset": -1
|
||||
}
|
||||
@@ -2999,11 +2999,11 @@
|
||||
"type": "many2one"
|
||||
},
|
||||
"11": {
|
||||
"field": "order_line.product_id",
|
||||
"field": "product_id",
|
||||
"type": "many2one"
|
||||
},
|
||||
"12": {
|
||||
"field": "order_line.product_id",
|
||||
"field": "product_id",
|
||||
"type": "many2one"
|
||||
}
|
||||
},
|
||||
@@ -3135,11 +3135,11 @@
|
||||
"type": "many2one"
|
||||
},
|
||||
"11": {
|
||||
"field": "order_line.product_id.categ_id",
|
||||
"field": "product_id.categ_id",
|
||||
"type": "many2one"
|
||||
},
|
||||
"12": {
|
||||
"field": "order_line.product_id.categ_id",
|
||||
"field": "product_id.categ_id",
|
||||
"type": "many2one"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user