Skip to content

Commit

Permalink
[FIX] pos_order_to_sale_order: newsfragments is updated and setting d…
Browse files Browse the repository at this point in the history
…efault value for config paramenter is changed.
  • Loading branch information
geomer198 committed Oct 22, 2023
1 parent 0188833 commit c0f0d57
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
10 changes: 9 additions & 1 deletion pos_order_to_sale_order/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Check warning on line 43 in pos_order_to_sale_order/models/res_config_settings.py

View check run for this annotation

Codecov / codecov/patch

pos_order_to_sale_order/models/res_config_settings.py#L39-L43

Added lines #L39 - L43 were not covered by tests
2 changes: 1 addition & 1 deletion pos_order_to_sale_order/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -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

This file was deleted.

5 changes: 5 additions & 0 deletions pos_order_to_sale_order/readme/newsfragments/2928.feature.rst
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c0f0d57

Please sign in to comment.