diff --git a/app_product_weight_sale/__manifest__.py b/app_product_weight_sale/__manifest__.py index 5ad48ea6..0982ff0e 100644 --- a/app_product_weight_sale/__manifest__.py +++ b/app_product_weight_sale/__manifest__.py @@ -20,6 +20,8 @@ 'price': 68, 'depends': ['sale_management'], 'data': [ + 'security/res_group.xml', + 'views/sale_config_settings_views.xml', 'views/sale_order_views.xml', 'report/report_sale_order_views.xml', ], diff --git a/app_product_weight_sale/models/__init__.py b/app_product_weight_sale/models/__init__.py index a7f93b67..948cbc1b 100644 --- a/app_product_weight_sale/models/__init__.py +++ b/app_product_weight_sale/models/__init__.py @@ -2,5 +2,6 @@ from . import sale_order from . import sale_order_line +from . import res_config_settings diff --git a/app_product_weight_sale/models/res_config_settings.py b/app_product_weight_sale/models/res_config_settings.py new file mode 100644 index 00000000..4824f3b7 --- /dev/null +++ b/app_product_weight_sale/models/res_config_settings.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + group_sale_weight_print = fields.Boolean("Show Weight in Sale Print", implied_group='app_product_weight_sale.group_sale_weight_print') diff --git a/app_product_weight_sale/report/report_sale_order_views.xml b/app_product_weight_sale/report/report_sale_order_views.xml index a6c7d38a..4ec9a293 100644 --- a/app_product_weight_sale/report/report_sale_order_views.xml +++ b/app_product_weight_sale/report/report_sale_order_views.xml @@ -8,15 +8,15 @@ - Weight Unit - Weight Subtotal + Weight Unit + Weight Subtotal - - + + - -

+ +

Total Weight:

diff --git a/app_product_weight_sale/security/res_group.xml b/app_product_weight_sale/security/res_group.xml new file mode 100644 index 00000000..732dafed --- /dev/null +++ b/app_product_weight_sale/security/res_group.xml @@ -0,0 +1,17 @@ + + + + + + Show Weight in Sale Print + + + + + + + + \ No newline at end of file diff --git a/app_product_weight_sale/views/sale_config_settings_views.xml b/app_product_weight_sale/views/sale_config_settings_views.xml new file mode 100644 index 00000000..d2d9aaf3 --- /dev/null +++ b/app_product_weight_sale/views/sale_config_settings_views.xml @@ -0,0 +1,24 @@ + + + + app.res.config.settings.view.form.inherit.sale + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+ +