Browse Source

[IMP] *_online_ponto: Add UI to show ponto buffers

12.0
Ronald Portier (Therp BV) 2 years ago
parent
commit
0f742a137e
No known key found for this signature in database GPG Key ID: A181F8124D7101D3
  1. 3
      account_bank_statement_import_online_ponto/__manifest__.py
  2. 2
      account_bank_statement_import_online_ponto/models/ponto_buffer.py
  3. 2
      account_bank_statement_import_online_ponto/models/ponto_buffer_line.py
  4. 11
      account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml
  5. 13
      account_bank_statement_import_online_ponto/views/ir_ui_menu.xml
  6. 35
      account_bank_statement_import_online_ponto/views/ponto_buffer.xml

3
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",
],
}

2
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",

2
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",

11
account_bank_statement_import_online_ponto/views/ir_actions_act_window.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_ponto_buffer" model="ir.actions.act_window">
<field name="name">Ponto Buffer</field>
<field name="res_model">ponto.buffer</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field eval="False" name="view_id"/>
</record>
</odoo>

13
account_bank_statement_import_online_ponto/views/ir_ui_menu.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<menuitem
id="menu_ponto_buffer"
name="Show Ponto Buffer"
parent="account.account_reports_management_menu"
sequence="90"
action="action_ponto_buffer"
groups="account.group_account_user"
/>
</odoo>

35
account_bank_statement_import_online_ponto/views/ponto_buffer.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="ponto_buffer_tree">
<field name="name">ponto.buffer.tree</field>
<field name="model">ponto.buffer</field>
<field name="arch" type="xml">
<tree>
<field name="provider_id" />
<field name="effective_date" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="ponto_buffer_form">
<field name="name">ponto.buffer.form</field>
<field name="model">ponto.buffer</field>
<field name="arch" type="xml">
<form>
<group name="ponto_buffer_main">
<field name="provider_id" />
<field name="effective_date" />
</group>
<group name="ponto_buffer_lines" string="Buffer Lines">
<field name="buffer_line_ids" mode="tree">
<tree>
<field name="effective_date_time" />
<field name="ponto_id" />
<field name="transaction_data" />
</tree>
</field>
</group>
</form>
</field>
</record>
</odoo>
Loading…
Cancel
Save