Skip to content

Commit 317977e

Browse files
committed
[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#114561 Signed-off-by: John Laterre (jol) <jol@odoo.com>
1 parent bfe8509 commit 317977e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

addons/sale/models/sale_order.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ def _rec_names_search(self):
269269
help="Delivery date you can promise to the customer, computed from the minimum lead time of the order lines.")
270270
is_expired = fields.Boolean(string="Is Expired", compute='_compute_is_expired')
271271
partner_credit_warning = fields.Text(
272-
compute='_compute_partner_credit_warning',
273-
groups='account.group_account_invoice,account.group_account_readonly')
272+
compute='_compute_partner_credit_warning')
274273
tax_country_id = fields.Many2one(
275274
comodel_name='res.country',
276275
compute='_compute_tax_country_id',

addons/sale/views/sale_order_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
<button name="action_draft" states="cancel" type="object" string="Set to Quotation" data-hotkey="w"/>
218218
<field name="state" widget="statusbar" statusbar_visible="draft,sent,sale"/>
219219
</header>
220-
<div groups="account.group_account_invoice,account.group_account_readonly"
220+
<div
221221
class="alert alert-warning mb-0" role="alert"
222222
attrs="{'invisible': [('partner_credit_warning', '=', '')]}">
223223
<field name="partner_credit_warning"/>

0 commit comments

Comments
 (0)