[FIX] account: readonly bank on posted payment
Field `partner_bank_id` should be readonly like other fields when Payment is not in `Draft` state. closes odoo/odoo#63254 X-original-commit: 366bf51bb07aac6edca668635f49316b21bbb7be Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
@@ -224,7 +224,7 @@
|
||||
required="1"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')], 'invisible': [('hide_payment_method', '=', True)]}"/>
|
||||
<field name="partner_bank_id" context="{'default_partner_id': partner_id}"
|
||||
attrs="{'invisible': [('show_partner_bank_account', '=', False)], 'required': [('require_partner_bank_account', '=', True)]}"/>
|
||||
attrs="{'invisible': [('show_partner_bank_account', '=', False)], 'required': [('require_partner_bank_account', '=', True)], 'readonly': [('state', '!=', 'draft')]}"/>
|
||||
|
||||
<!-- /!\ Required due to the _inherits but must not be required when saving a new
|
||||
record. Using 'required': [('id', '!=', False)] is not working due to the groups set on
|
||||
|
||||
Reference in New Issue
Block a user