[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) <jol@odoo.com>
This commit is contained in:
@@ -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'])
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
<button name="action_draft" states="cancel" type="object" string="Set to Quotation" data-hotkey="w"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,sent,sale"/>
|
||||
</header>
|
||||
<div groups="account.group_account_invoice,account.group_account_readonly"
|
||||
<div
|
||||
class="alert alert-warning mb-0" role="alert"
|
||||
attrs="{'invisible': [('partner_credit_warning', '=', '')]}">
|
||||
<field name="partner_credit_warning"/>
|
||||
|
||||
Reference in New Issue
Block a user