[FIX] account,sale: View crashing when missing permissions.

Domains could not be computed when the user requesting the view don't
have the right permission for accessing the field
`partner_credit_warning`

Reported via p/feedback

closes odoo/odoo#99673

X-original-commit: https://github.com/odoo/odoo/commit/d145b140a077c26a714fa9a8d0542d4584ca7459
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Arnaud Baes
2022-09-11 12:22:40 +02:00
parent 8e81e00813
commit dffa40f744
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -655,7 +655,8 @@
attrs="{'invisible': ['|', '|', ('state', '!=', 'draft'), ('auto_post', '=', 'no'), ('auto_post', '=', 'at_date')]}">
<field name="auto_post" readonly="1"/> auto-posting enabled. Next accounting date: <field name="date" readonly="1"/>.<span attrs="{'invisible': [('auto_post_until', '=', False)]}"> The recurrence will end on <field name="auto_post_until" readonly="1"/> (included).</span>
</div>
<div class="alert alert-warning mb-0" role="alert"
<div groups="account.group_account_invoice,account.group_account_readonly"
class="alert alert-warning mb-0" role="alert"
attrs="{'invisible': [('partner_credit_warning', '=', '')]}">
<field name="partner_credit_warning"/>
</div>
+2 -1
View File
@@ -220,7 +220,8 @@
<field name="partner_credit_warning"
class="alert alert-warning mb-0"
role="alert"
attrs="{'invisible': [('partner_credit_warning', '=', '')]}" />
attrs="{'invisible': [('partner_credit_warning', '=', '')]}"
groups="account.group_account_invoice,account.group_account_readonly"/>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_invoice"