From 5efbdb0652608a7d748b5e068e9aee210c4fe804 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Tue, 7 Mar 2023 12:01:53 +0000 Subject: [PATCH] [FIX] sale: restriction on partner credit warning In Settings>Accounting set 'Sales Credit Limit' to 10,000 Create a user with sales access but no accounting rights Login with the sale user, create a quotation, set a partner already exceeding the limit No warning shows up. This occurs because the field is restricted to users having account access opw-3202384 closes odoo/odoo#114685 X-original-commit: 317977e97d93f572697585d006b5bca5c7365428 Signed-off-by: John Laterre (jol) --- addons/sale/models/sale_order.py | 3 +-- addons/sale/views/sale_order_views.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/sale/models/sale_order.py b/addons/sale/models/sale_order.py index b7eb66993e7..87612f4b6f0 100644 --- a/addons/sale/models/sale_order.py +++ b/addons/sale/models/sale_order.py @@ -272,8 +272,7 @@ class SaleOrder(models.Model): help="Delivery date you can promise to the customer, computed from the minimum lead time of the order lines.") is_expired = fields.Boolean(string="Is Expired", compute='_compute_is_expired') partner_credit_warning = fields.Text( - compute='_compute_partner_credit_warning', - groups='account.group_account_invoice,account.group_account_readonly') + compute='_compute_partner_credit_warning') tax_calculation_rounding_method = fields.Selection( related='company_id.tax_calculation_rounding_method', depends=['company_id']) diff --git a/addons/sale/views/sale_order_views.xml b/addons/sale/views/sale_order_views.xml index 96b4a63f5bc..0d8beeab6ed 100644 --- a/addons/sale/views/sale_order_views.xml +++ b/addons/sale/views/sale_order_views.xml @@ -219,7 +219,7 @@