Skip to content

Commit

Permalink
Merge pull request #208 from akretion/14-account-usability-fix-statem…
Browse files Browse the repository at this point in the history
…ent-back-to-draft

Revert "account_usability: reset to draft the bank statement do not unreconcile items
  • Loading branch information
florian-dacosta authored May 28, 2024
2 parents b252bdf + b867dd6 commit 0e237d2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
13 changes: 0 additions & 13 deletions account_usability/models/account_bank_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ def name_get(self):
res.append((statement.id, name))
return res

def button_reopen(self):
self = self.with_context(skip_undo_reconciliation=True)
return super().button_reopen()

def button_undo_reconciliation(self):
self.line_ids.button_undo_reconciliation()


class AccountBankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
Expand Down Expand Up @@ -96,9 +89,3 @@ def show_account_move(self):
'res_id': self.move_id.id,
})
return action

def button_undo_reconciliation(self):
if self._context.get("skip_undo_reconciliation"):
return
else:
return super().button_undo_reconciliation()
8 changes: 0 additions & 8 deletions account_usability/views/account_bank_statement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
<button name="button_reopen" position="attributes">
<attribute name="confirm">Are you sure ? Don't do 'Reset to New' if you just want to modify the bank journal entry of an existing statement line.</attribute>
</button>
<button name="button_reopen" position="after">
<button
name="button_undo_reconciliation"
type="object"
confirm="Are you sure to unreconcile all the entries of the bank statement?"
states="open"
string="Unreconcile All"/>
</button>
<xpath expr="//field[@name='line_ids']/tree/button[@name='button_undo_reconciliation']" position="after">
<field name="move_id" invisible="1"/>
<button name="show_account_move" type="object"
Expand Down

0 comments on commit 0e237d2

Please sign in to comment.