From 7b9e13e0911089c2c3dd90b34cb8c1e6d8952dc4 Mon Sep 17 00:00:00 2001 From: Meghna Jaswani Date: Mon, 14 Oct 2019 12:40:26 +0000 Subject: [PATCH] [IMP] account: sale or purchase receipt active from account settings Purpose: If the user is not using receipt functionality in his organization then it's can be hidden. Current behavior before PR: Sale and purchase receipt by default show when the account module is instaled. Desired behavior after PR is merged: Now users can activate Sale or purchase receipt from accounting settings. closes odoo/odoo#44464 Task: 2028813 Signed-off-by: Quentin De Paoli (qdp) --- addons/account/models/res_config_settings.py | 4 ++++ addons/account/security/account_security.xml | 8 +++++++ addons/account/views/account_move_views.xml | 2 ++ .../views/res_config_settings_views.xml | 22 +++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/addons/account/models/res_config_settings.py b/addons/account/models/res_config_settings.py index ee91af9710c..28362a46223 100644 --- a/addons/account/models/res_config_settings.py +++ b/addons/account/models/res_config_settings.py @@ -43,6 +43,10 @@ class ResConfigSettings(models.TransientModel): "Show line subtotals with taxes (B2C)", implied_group='account.group_show_line_subtotals_tax_included', group='base.group_portal,base.group_user,base.group_public') + group_show_sale_receipts = fields.Boolean(string='Sale Receipt', + implied_group='account.group_sale_receipts') + group_show_purchase_receipts = fields.Boolean(string='Purchase Receipt', + implied_group='account.group_purchase_receipts') show_line_subtotals_tax_selection = fields.Selection([ ('tax_excluded', 'Tax-Excluded'), ('tax_included', 'Tax-Included')], string="Line Subtotals Tax Display", diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml index 4fa0ddff157..3f03405a485 100644 --- a/addons/account/security/account_security.xml +++ b/addons/account/security/account_security.xml @@ -66,6 +66,14 @@ + + Sale Receipt + + + + Purchase Receipt + + account.analytic.line.billing.user diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 47321ee5ad0..46703a76814 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -1436,6 +1436,7 @@ if records: id="menu_action_move_out_receipt_type" action="action_move_out_receipt_type" parent="account.menu_finance_receivables" + groups="account.group_sale_receipts" sequence="1"/> +
+
+ +
+
+
+

Customer Payments

@@ -372,6 +383,17 @@
+
+
+ +
+
+
+

Vendor Payments