Skip to content

Commit

Permalink
Merge PR #1375 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 13, 2024
2 parents 4449d96 + d43b9ca commit 3e7559a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions account_banking_mandate/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class AccountMove(models.Model):
"account.banking.mandate",
string="Direct Debit Mandate",
ondelete="restrict",
readonly=True,
check_company=True,
states={"draft": [("readonly", False)]},
)
mandate_required = fields.Boolean(
related="payment_mode_id.payment_method_id.mandate_required", readonly=True
Expand Down
4 changes: 3 additions & 1 deletion account_banking_mandate/views/account_move_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
name="mandate_id"
domain="[('partner_id', '=', commercial_partner_id), ('state', '=', 'valid')]"
attrs="{'required': [('mandate_required', '=', True),('move_type', 'in', ('out_invoice', 'out_refund'))],
'invisible': ['|', ('mandate_required', '=', False),('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
'invisible': ['|', ('mandate_required', '=', False),('move_type', 'not in', ('out_invoice', 'out_refund'))],
'readonly': [('payment_state', '=', 'paid')]
}"
/>
<field name="mandate_required" invisible="1" />
</field>
Expand Down

0 comments on commit 3e7559a

Please sign in to comment.