Skip to content

Commit 3e7559a

Browse files
committed
Merge PR #1375 into 15.0
Signed-off-by pedrobaeza
2 parents 4449d96 + d43b9ca commit 3e7559a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

account_banking_mandate/models/account_move.py

-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class AccountMove(models.Model):
1212
"account.banking.mandate",
1313
string="Direct Debit Mandate",
1414
ondelete="restrict",
15-
readonly=True,
1615
check_company=True,
17-
states={"draft": [("readonly", False)]},
1816
)
1917
mandate_required = fields.Boolean(
2018
related="payment_mode_id.payment_method_id.mandate_required", readonly=True

account_banking_mandate/views/account_move_view.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
name="mandate_id"
1515
domain="[('partner_id', '=', commercial_partner_id), ('state', '=', 'valid')]"
1616
attrs="{'required': [('mandate_required', '=', True),('move_type', 'in', ('out_invoice', 'out_refund'))],
17-
'invisible': ['|', ('mandate_required', '=', False),('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
17+
'invisible': ['|', ('mandate_required', '=', False),('move_type', 'not in', ('out_invoice', 'out_refund'))],
18+
'readonly': [('payment_state', '=', 'paid')]
19+
}"
1820
/>
1921
<field name="mandate_required" invisible="1" />
2022
</field>

0 commit comments

Comments
 (0)