From 00b75c3a49c4111c1d0ce4fa1c994b090940cc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 26 Jul 2018 14:11:50 +0200 Subject: [PATCH] [REF] point of sale: revert wrong configuration change This commit reverts a configuration update recently done. Tax display configuration was moved from pos config to general company settings. This was a mistake and should not stay as it is. Even if saas 11.4 could be considered as stable this change is necessary and does not impact anybody as this branch is not released. Partially revert e434690fe3adf884222b84e16dac3b3dcc0b12ad . --- addons/point_of_sale/models/__init__.py | 1 - addons/point_of_sale/models/pos_config.py | 2 +- addons/point_of_sale/models/res_company.py | 9 --------- addons/point_of_sale/models/res_config_settings.py | 1 - addons/point_of_sale/views/pos_config_view.xml | 14 ++++++++++++++ .../views/res_config_settings_views.xml | 14 -------------- 6 files changed, 15 insertions(+), 26 deletions(-) delete mode 100644 addons/point_of_sale/models/res_company.py diff --git a/addons/point_of_sale/models/__init__.py b/addons/point_of_sale/models/__init__.py index 1d285b54586..1b55c0be4e8 100644 --- a/addons/point_of_sale/models/__init__.py +++ b/addons/point_of_sale/models/__init__.py @@ -11,5 +11,4 @@ from . import pos_session from . import product from . import res_partner from . import res_users -from . import res_company from . import res_config_settings diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py index b1ee385c0ea..26a194f40d6 100644 --- a/addons/point_of_sale/models/pos_config.py +++ b/addons/point_of_sale/models/pos_config.py @@ -100,7 +100,7 @@ class PosConfig(models.Model): help='The receipt screen will be skipped if the receipt can be printed automatically.') iface_precompute_cash = fields.Boolean(string='Prefill Cash Payment', help='The payment input will behave similarily to bank payment input, and will be prefilled with the exact due amount.') - iface_tax_included = fields.Selection([('subtotal', 'Tax-Excluded Price'), ('total', 'Tax-Included Price')], related="company_id.iface_tax_included", required=True) + iface_tax_included = fields.Selection([('subtotal', 'Tax-Excluded Price'), ('total', 'Tax-Included Price')], string="Tax Display", default='subtotal', required=True) iface_start_categ_id = fields.Many2one('pos.category', string='Initial Category', help='The point of sale will display this product category by default. If no category is specified, all available products will be shown.') iface_display_categ_images = fields.Boolean(string='Display Category Pictures', diff --git a/addons/point_of_sale/models/res_company.py b/addons/point_of_sale/models/res_company.py deleted file mode 100644 index 56d5505e6e6..00000000000 --- a/addons/point_of_sale/models/res_company.py +++ /dev/null @@ -1,9 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import fields, models - - -class ResCompany(models.Model): - _inherit = "res.company" - - iface_tax_included = fields.Selection([('subtotal', 'Tax-Excluded Price'), ('total', 'Tax-Included Price')], default='subtotal', required=True) diff --git a/addons/point_of_sale/models/res_config_settings.py b/addons/point_of_sale/models/res_config_settings.py index 4ed050c63f0..14acf115ba8 100644 --- a/addons/point_of_sale/models/res_config_settings.py +++ b/addons/point_of_sale/models/res_config_settings.py @@ -7,7 +7,6 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax", related='company_id.account_sale_tax_id') - iface_tax_included = fields.Selection([('subtotal', 'Tax-Excluded Price'), ('total', 'Tax-Included Price')], related="company_id.iface_tax_included", required=True) module_pos_mercury = fields.Boolean(string="Integrated Card Payments", help="The transactions are processed by Vantiv. Set your Vantiv credentials on the related payment journal.") pos_sales_price = fields.Boolean("Multiple Product Prices", config_parameter='point_of_sale.pos_sales_price') pos_pricelist_setting = fields.Selection([ diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml index c1f7757e0bc..6edad386082 100644 --- a/addons/point_of_sale/views/pos_config_view.xml +++ b/addons/point_of_sale/views/pos_config_view.xml @@ -211,6 +211,20 @@

Pricing

+
+
+
+
diff --git a/addons/point_of_sale/views/res_config_settings_views.xml b/addons/point_of_sale/views/res_config_settings_views.xml index 78620638c29..31e4c6bb41f 100644 --- a/addons/point_of_sale/views/res_config_settings_views.xml +++ b/addons/point_of_sale/views/res_config_settings_views.xml @@ -29,20 +29,6 @@

Pricing

-
-
-
-