Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "account_usability: reset to draft the bank statement do not unreconcile items #208

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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