Skip to content

Commit

Permalink
l10n_fr_chorus_account: set transmit_method_id in readonly when invoi…
Browse files Browse the repository at this point in the history
…ce is validated
  • Loading branch information
sebastienbeau committed Sep 29, 2024
1 parent a3e89bc commit fc647e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions l10n_fr_chorus_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ class AccountMove(models.Model):
readonly=True,
states={"draft": [("readonly", False)]},
)
# Transmit method is set to readonly to avoid by passing chorus check by changing
# the transmission method after validating the invoice
transmit_method_id = fields.Many2one(
states={"draft": [("readonly", False)]},
readonly=True,
)

def _get_commitment_number(self):
self.ensure_one()
Expand Down

0 comments on commit fc647e6

Please sign in to comment.