From 0f742a137eb7fa4c6fdb290cbe3e7f6efd0023ab Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Wed, 14 Sep 2022 10:52:17 +0200 Subject: [PATCH] [IMP] *_online_ponto: Add UI to show ponto buffers --- .../__manifest__.py | 3 ++ .../models/ponto_buffer.py | 2 ++ .../models/ponto_buffer_line.py | 2 ++ .../views/ir_actions_act_window.xml | 11 ++++++ .../views/ir_ui_menu.xml | 13 +++++++ .../views/ponto_buffer.xml | 35 +++++++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml create mode 100644 account_bank_statement_import_online_ponto/views/ir_ui_menu.xml create mode 100644 account_bank_statement_import_online_ponto/views/ponto_buffer.xml diff --git a/account_bank_statement_import_online_ponto/__manifest__.py b/account_bank_statement_import_online_ponto/__manifest__.py index 76d197cd..c6ede0b6 100644 --- a/account_bank_statement_import_online_ponto/__manifest__.py +++ b/account_bank_statement_import_online_ponto/__manifest__.py @@ -17,5 +17,8 @@ "data/ir_cron.xml", "security/ir.model.access.csv", "views/online_bank_statement_provider.xml", + "views/ponto_buffer.xml", + "views/ir_actions_act_window.xml", + "views/ir_ui_menu.xml", ], } diff --git a/account_bank_statement_import_online_ponto/models/ponto_buffer.py b/account_bank_statement_import_online_ponto/models/ponto_buffer.py index 25157300..f18b92e8 100644 --- a/account_bank_statement_import_online_ponto/models/ponto_buffer.py +++ b/account_bank_statement_import_online_ponto/models/ponto_buffer.py @@ -13,6 +13,8 @@ class PontoBuffer(models.Model): """Define model to hold data retrieved from Ponto.""" _name = "ponto.buffer" _description = "Group transactions retrieved from Ponto." + _order = "effective_date desc" + _rec_name = "effective_date" provider_id = fields.Many2one( comodel_name="online.bank.statement.provider", diff --git a/account_bank_statement_import_online_ponto/models/ponto_buffer_line.py b/account_bank_statement_import_online_ponto/models/ponto_buffer_line.py index fcf0a953..b0f8ef86 100644 --- a/account_bank_statement_import_online_ponto/models/ponto_buffer_line.py +++ b/account_bank_statement_import_online_ponto/models/ponto_buffer_line.py @@ -8,6 +8,8 @@ class PontoBuffer(models.Model): """Define model to hold transactions retrieved from Ponto.""" _name = "ponto.buffer.line" _description = "Hold transactions retrieved from Ponto." + _order = "effective_date_time desc" + _rec_name = "effective_date_time" buffer_id = fields.Many2one( comodel_name="ponto.buffer", diff --git a/account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml b/account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml new file mode 100644 index 00000000..d0e1355a --- /dev/null +++ b/account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml @@ -0,0 +1,11 @@ + + + + Ponto Buffer + ponto.buffer + form + tree,form + + + + diff --git a/account_bank_statement_import_online_ponto/views/ir_ui_menu.xml b/account_bank_statement_import_online_ponto/views/ir_ui_menu.xml new file mode 100644 index 00000000..73a9e936 --- /dev/null +++ b/account_bank_statement_import_online_ponto/views/ir_ui_menu.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/account_bank_statement_import_online_ponto/views/ponto_buffer.xml b/account_bank_statement_import_online_ponto/views/ponto_buffer.xml new file mode 100644 index 00000000..4d64d11e --- /dev/null +++ b/account_bank_statement_import_online_ponto/views/ponto_buffer.xml @@ -0,0 +1,35 @@ + + + + ponto.buffer.tree + ponto.buffer + + + + + + + + + + ponto.buffer.form + ponto.buffer + +
+ + + + + + + + + + + + + +
+
+
+