[FIX] account_check_writing: write multi payment
When you pay multiple invoice with one payment, you need the write
permission on account.journal, this had been solved when registering a
payment for one invoice in 91ca84644
In this commit, the same logic is applied on account.register.payments
opw-1835888
opw-1834343
closes #24369
This commit is contained in:
@@ -12,7 +12,7 @@ class AccountRegisterPayments(models.TransientModel):
|
||||
_inherit = "account.register.payments"
|
||||
|
||||
check_amount_in_words = fields.Char(string="Amount in Words")
|
||||
check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing')
|
||||
check_manual_sequencing = fields.Boolean(related='journal_id.check_manual_sequencing', readonly=1)
|
||||
# Note: a check_number == 0 means that it will be attributed when the check is printed
|
||||
check_number = fields.Integer(string="Check Number", readonly=True, copy=False, default=0,
|
||||
help="Number of the check corresponding to this payment. If your pre-printed check are not already numbered, "
|
||||
@@ -35,7 +35,6 @@ class AccountRegisterPayments(models.TransientModel):
|
||||
res = super(AccountRegisterPayments, self).get_payment_vals()
|
||||
if self.payment_method_id == self.env.ref('account_check_printing.account_payment_method_check'):
|
||||
res.update({
|
||||
'check_amount_in_words': self.check_amount_in_words,
|
||||
'check_manual_sequencing': self.check_manual_sequencing,
|
||||
})
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user