Skip to content

Commit

Permalink
[REF] account: dead code removal
Browse files Browse the repository at this point in the history
since revision b30fed7 the model account.opening does not exist anymore, that function was deadcode leftover.
  • Loading branch information
qdp-odoo committed Jun 20, 2018
1 parent 5dc9230 commit 2bcff00
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions addons/account/models/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,40 +300,6 @@ def setting_chart_of_accounts_action(self):
'domain': domain,
}

@api.model
def setting_opening_move_action(self):
""" Called by the 'Initial Balances' button of the setup bar."""
company = self.env.user.company_id

# If the opening move has already been posted, we open its form view
if company.opening_move_posted():
form_view_id = self.env.ref('account.setup_posted_move_form').id
return {
'type': 'ir.actions.act_window',
'name': _('Initial Balances'),
'view_mode': 'form',
'res_model': 'account.move',
'target': 'new',
'res_id': company.account_opening_move_id.id,
'views': [[form_view_id, 'form']],
}

# Otherwise, we open a custom wizard to post it.
company.create_op_move_if_non_existant()
new_wizard = self.env['account.opening'].create({'company_id': company.id})
view_id = self.env.ref('account.setup_opening_move_wizard_form').id

return {
'type': 'ir.actions.act_window',
'name': _('Initial Balances'),
'view_mode': 'form',
'res_model': 'account.opening',
'target': 'new',
'res_id': new_wizard.id,
'views': [[view_id, 'form']],
'context': {'check_move_validity': False},
}

@api.model
def setting_hide_setup_bar(self):
""" Called by the cross button of the setup bar, to close it."""
Expand Down

0 comments on commit 2bcff00

Please sign in to comment.