mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_reconcile_oca: Open reconcile view when press the name on journal
This commit is contained in:
@@ -31,3 +31,12 @@ class AccountJournal(models.Model):
|
|||||||
if self.get_journal_dashboard_datas()["number_to_reconcile"] > 0:
|
if self.get_journal_dashboard_datas()["number_to_reconcile"] > 0:
|
||||||
return False
|
return False
|
||||||
return _("Well done! Everything has been reconciled")
|
return _("Well done! Everything has been reconciled")
|
||||||
|
|
||||||
|
def open_action(self):
|
||||||
|
self.ensure_one()
|
||||||
|
if self.type not in ["bank", "cash"]:
|
||||||
|
return super().open_action()
|
||||||
|
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||||
|
"account_reconcile_oca.action_bank_statement_line_reconcile_all"
|
||||||
|
)
|
||||||
|
return action
|
||||||
|
|||||||
@@ -356,12 +356,12 @@
|
|||||||
<field
|
<field
|
||||||
name="context"
|
name="context"
|
||||||
>{'default_journal_id': active_id, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field>
|
>{'default_journal_id': active_id, 'view_ref': 'account_reconcile_oca.bank_statement_line_form_reconcile_view'}</field>
|
||||||
<field name="view_mode">tree,kanban</field>
|
<field name="view_mode">kanban,tree</field>
|
||||||
<field
|
<field
|
||||||
name="view_ids"
|
name="view_ids"
|
||||||
eval="[(5, 0, 0),
|
eval="[(5, 0, 0),
|
||||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')}),
|
(0, 0, {'view_mode': 'kanban', 'view_id': ref('bank_statement_line_reconcile_view')}),
|
||||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('bank_statement_line_reconcile_view')})]"
|
(0, 0, {'view_mode': 'tree', 'view_id': ref('account_statement_base.account_bank_statement_line_tree')})]"
|
||||||
/>
|
/>
|
||||||
<field name="help" type="html">
|
<field name="help" type="html">
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<p class="o_view_nocontent_smiling_face">
|
||||||
|
|||||||
Reference in New Issue
Block a user