From c0f0d57062b286dbfc2bd4572e0756eff9d0cb45 Mon Sep 17 00:00:00 2001 From: geomer198 Date: Sun, 22 Oct 2023 21:15:54 +0400 Subject: [PATCH] [FIX] pos_order_to_sale_order: newsfragments is updated and setting default value for config paramenter is changed. --- pos_order_to_sale_order/models/res_config_settings.py | 10 +++++++++- pos_order_to_sale_order/readme/CONFIGURE.rst | 2 +- .../readme/newsfragments/2928.bigfix.rst | 1 - .../readme/newsfragments/2928.feature.rst | 5 +++++ 4 files changed, 15 insertions(+), 3 deletions(-) delete mode 100644 pos_order_to_sale_order/readme/newsfragments/2928.bigfix.rst create mode 100644 pos_order_to_sale_order/readme/newsfragments/2928.feature.rst diff --git a/pos_order_to_sale_order/models/res_config_settings.py b/pos_order_to_sale_order/models/res_config_settings.py index 2be86c4f22..52949aae24 100644 --- a/pos_order_to_sale_order/models/res_config_settings.py +++ b/pos_order_to_sale_order/models/res_config_settings.py @@ -2,7 +2,7 @@ # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import fields, models +from odoo import api, fields, models class ResConfigSettings(models.TransientModel): @@ -33,3 +33,11 @@ class ResConfigSettings(models.TransientModel): default="product_pos", config_parameter="pos_order_to_sale_order.sol_name_mode", ) + + @api.model + def set_values(self): + result = super(ResConfigSettings, self).set_values() + ICPSudo = self.env["ir.config_parameter"].sudo() + value = self.sol_name_mode or "product_pos" + ICPSudo.set_param("pos_order_to_sale_order.sol_name_mode", value) + return result diff --git a/pos_order_to_sale_order/readme/CONFIGURE.rst b/pos_order_to_sale_order/readme/CONFIGURE.rst index 3f53f519bb..41711c0623 100644 --- a/pos_order_to_sale_order/readme/CONFIGURE.rst +++ b/pos_order_to_sale_order/readme/CONFIGURE.rst @@ -1,7 +1,7 @@ * Go to Point Of Sale / Configuration / Point of Sale * Check the box 'Create Sale Orders' * Select the desired default behaviour -* Select the SO Line Name mode +* Select Sales Order Line name composition mode .. figure:: ../static/description/res_config_settings_form.png :width: 800 px diff --git a/pos_order_to_sale_order/readme/newsfragments/2928.bigfix.rst b/pos_order_to_sale_order/readme/newsfragments/2928.bigfix.rst deleted file mode 100644 index 049bbccee5..0000000000 --- a/pos_order_to_sale_order/readme/newsfragments/2928.bigfix.rst +++ /dev/null @@ -1 +0,0 @@ -Sale order line description computed by default with adding Customer note. diff --git a/pos_order_to_sale_order/readme/newsfragments/2928.feature.rst b/pos_order_to_sale_order/readme/newsfragments/2928.feature.rst new file mode 100644 index 0000000000..2152932bf9 --- /dev/null +++ b/pos_order_to_sale_order/readme/newsfragments/2928.feature.rst @@ -0,0 +1,5 @@ +In Settings "Sales Order Line name composition mode" is added. +This mode regulates preparing sale order line description at creating Sale Order from Point of Sale. +Modes: +- Product name + POS Comment +- Sale Multiline Description