From f91f8fb7e040d1d4f160c5da5d84d1519ee7f7d6 Mon Sep 17 00:00:00 2001 From: Eduardo De Miguel Date: Wed, 29 Jan 2025 11:17:41 +0100 Subject: [PATCH] [FIX] sale_order_line_price_history: Set discount only if discount group is enabled --- sale_order_line_price_history/README.rst | 3 +++ sale_order_line_price_history/readme/ROADMAP.rst | 3 +++ sale_order_line_price_history/static/description/index.html | 3 +++ .../static/src/js/set_price_to_line_widget.js | 4 +++- sale_order_line_price_history/views/sale_views.xml | 6 ++++++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sale_order_line_price_history/README.rst b/sale_order_line_price_history/README.rst index 121e9ee7fa6..ea288273306 100644 --- a/sale_order_line_price_history/README.rst +++ b/sale_order_line_price_history/README.rst @@ -59,6 +59,9 @@ Known issues / Roadmap ====================== * A backend tour would be nice to have. +* When you are in Kanban View, you can set an historic price from the wizard, + but you need to click on the line and save it from form view instead of + using sale order save button. Bug Tracker =========== diff --git a/sale_order_line_price_history/readme/ROADMAP.rst b/sale_order_line_price_history/readme/ROADMAP.rst index 8aae57b5bb2..2290ca12fa9 100644 --- a/sale_order_line_price_history/readme/ROADMAP.rst +++ b/sale_order_line_price_history/readme/ROADMAP.rst @@ -1 +1,4 @@ * A backend tour would be nice to have. +* When you are in Kanban View, you can set an historic price from the wizard, + but you need to click on the line and save it from form view instead of + using sale order save button. diff --git a/sale_order_line_price_history/static/description/index.html b/sale_order_line_price_history/static/description/index.html index 7226b3f3a38..ffff5f170dd 100644 --- a/sale_order_line_price_history/static/description/index.html +++ b/sale_order_line_price_history/static/description/index.html @@ -409,6 +409,9 @@

Usage

Known issues / Roadmap

diff --git a/sale_order_line_price_history/static/src/js/set_price_to_line_widget.js b/sale_order_line_price_history/static/src/js/set_price_to_line_widget.js index 44c4d06afb6..b1e4fd4cfae 100644 --- a/sale_order_line_price_history/static/src/js/set_price_to_line_widget.js +++ b/sale_order_line_price_history/static/src/js/set_price_to_line_widget.js @@ -15,7 +15,9 @@ export class SetPriceToLineWidget extends Component { type: "ir.actions.act_window_close", infos: { price_unit: this.props.record.data.price_unit, - discount: this.props.record.data.discount, + ...(this.props.record.fields.discount !== undefined && { + discount: this.props.record.data.discount, + }), }, }); } diff --git a/sale_order_line_price_history/views/sale_views.xml b/sale_order_line_price_history/views/sale_views.xml index d1a3fb9f413..595c4037238 100644 --- a/sale_order_line_price_history/views/sale_views.xml +++ b/sale_order_line_price_history/views/sale_views.xml @@ -22,6 +22,12 @@ help="Price History" /> + + +