[13.0][MIG] account_document_reversal

This commit is contained in:
kittiu
2020-03-27 21:23:59 +07:00
committed by OCA Transbot
parent 0cbb026770
commit 351071ae4d
79 changed files with 219 additions and 181 deletions

View File

@@ -8,7 +8,7 @@ class AccountJournal(models.Model):
cancel_method = fields.Selection(
[
("normal", "Normal (delete journal entries if exists)"),
("normal", "Normal (remove journal entries)"),
("reversal", "Reversal (create reversed journal entries)"),
],
string="Cancel Method",
@@ -30,9 +30,6 @@ class AccountJournal(models.Model):
help="Journal in this field will show in reversal wizard as default",
)
@api.multi
def _compute_is_cancel_reversal(self):
for rec in self:
rec.is_cancel_reversal = (
rec.update_posted and rec.cancel_method == "reversal"
)
rec.is_cancel_reversal = rec.cancel_method == "reversal"