account_payment_order: payment_mode_id readonly when state != draft

This commit is contained in:
Alexis de Lattre
2021-07-30 23:29:48 +02:00
committed by Marçal Isern
parent 74bed02f0e
commit fd1ec5ab85

View File

@@ -23,6 +23,7 @@ class AccountPaymentOrder(models.Model):
required=True,
ondelete="restrict",
tracking=True,
readonly=True,
states={"draft": [("readonly", False)]},
check_company=True,
)