[IMP] account_ebics: add draft, done filters on ebics.file search view

This commit is contained in:
Luc De Meyer 2025-01-03 14:28:50 +01:00
parent 825a7bcb28
commit 49c764d7d4

View File

@ -1,75 +1,90 @@
<?xml version="1.0" ?> <?xml version="1.0" ?>
<odoo> <odoo>
<record id="ebics_file_view_search" model="ir.ui.view"> <record id="ebics_file_view_search" model="ir.ui.view">
<field name="name">ebics.file.search</field> <field name="name">ebics.file.search</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Search EBICS Files"> <search string="Search EBICS Files">
<group col="10" colspan="4"> <field name="date_from" />
<field name="date_from" /> <field name="date_to" />
<field name="date_to" /> <field name="name" />
<field name="name" /> <field name="format_id" />
<field name="format_id" /> <field name="user_id" />
<field name="user_id" /> <field
<field name="company_ids"
name="company_ids" widget="selection"
widget="selection" groups="base.group_multi_company"
groups="base.group_multi_company" />
/> <filter
</group> string="Draft"
<newline /> name="draft"
<group expand="0" string="Group By"> domain="[('state', '=', 'draft')]"
<filter />
<filter
string="Done"
name="done"
domain="[('state', '=', 'confirm')]"
/>
<group expand="0" string="Group By">
<filter
string="File Format" string="File Format"
name="file_format" name="file_format"
context="{'group_by':'format_id'}" context="{'group_by':'format_id'}"
/> />
<filter string="State" name="state" context="{'group_by':'state'}" /> <filter
<filter string="User" name="user" context="{'group_by':'user_id'}" /> string="State"
</group> name="state"
</search> context="{'group_by':'state'}"
</field> />
</record> <filter
string="User"
name="user"
context="{'group_by':'user_id'}"
/>
</group>
</search>
</field>
</record>
<!-- Download --> <!-- Download -->
<record id="ebics_file_view_list_download" model="ir.ui.view"> <record id="ebics_file_view_list_download" model="ir.ui.view">
<field name="name">ebics.file.list</field> <field name="name">ebics.file.list</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<list decoration-muted="state=='draft'" create="false"> <list decoration-muted="state=='draft'" create="false">
<field name="date" string="Download Date" /> <field name="date" string="Download Date" />
<field name="name" /> <field name="name" />
<field name="date_from" /> <field name="date_from" />
<field name="date_to" /> <field name="date_to" />
<field name="user_id" /> <field name="user_id" />
<field name="state" /> <field name="state" />
<field name="format_id" /> <field name="format_id" />
<field <field
name="company_ids" name="company_ids"
widget="many2many_tags" widget="many2many_tags"
groups="base.group_multi_company" groups="base.group_multi_company"
/> />
</list> </list>
</field> </field>
</record> </record>
<record id="ebics_file_view_form_download" model="ir.ui.view"> <record id="ebics_file_view_form_download" model="ir.ui.view">
<field name="name">ebics.file.form</field> <field name="name">ebics.file.form</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="priority">1</field> <field name="priority">1</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="EBICS File" create="false"> <form string="EBICS File" create="false">
<header> <header>
<button <button
name="set_to_draft" name="set_to_draft"
invisible="state != 'done'" invisible="state != 'done'"
string="Set to Draft" string="Set to Draft"
type="object" type="object"
groups="account.group_account_manager" groups="account.group_account_manager"
/> />
<button <button
name="process" name="process"
class="oe_highlight" class="oe_highlight"
invisible="state != 'draft'" invisible="state != 'draft'"
@ -78,176 +93,182 @@
groups="account.group_account_invoice" groups="account.group_account_invoice"
help="Process the EBICS File" help="Process the EBICS File"
/> />
<button <button
name="set_to_done" name="set_to_done"
invisible="state != 'draft'" invisible="state != 'draft'"
string="Set to Done" string="Set to Done"
type="object" type="object"
groups="account.group_account_manager" groups="account.group_account_manager"
/> />
<field name="state" widget="statusbar" /> <field name="state" widget="statusbar" />
</header> </header>
<group colspan="4" col="4"> <group colspan="4" col="4">
<field name="date" string="Download Date" /> <field name="date" string="Download Date" />
<field name="name" /> <field name="name" />
<field name="data" filename="name" /> <field name="data" filename="name" />
<field name="format_id" /> <field name="format_id" />
<field name="date_from" /> <field name="date_from" />
<field name="date_to" /> <field name="date_to" />
<field name="user_id" /> <field name="user_id" />
<field name="ebics_userid_id" /> <field name="ebics_userid_id" />
<field <field
name="company_ids" name="company_ids"
widget="many2many_tags" widget="many2many_tags"
groups="base.group_multi_company" groups="base.group_multi_company"
/> />
</group> </group>
<notebook> <notebook>
<page string="Additional Information"> <page string="Additional Information">
<field name="note" nolabel="1" /> <field name="note" nolabel="1" />
</page> </page>
<page string="Bank Statements" invisible="not bank_statement_ids"> <page string="Bank Statements" invisible="not bank_statement_ids">
<field name="bank_statement_ids" nolabel="1" /> <field name="bank_statement_ids" nolabel="1" />
</page> </page>
</notebook> </notebook>
</form> </form>
</field> </field>
</record> </record>
<record id="ebics_file_view_form_result" model="ir.ui.view"> <record id="ebics_file_view_form_result" model="ir.ui.view">
<field name="name">ebics.file.process.result</field> <field name="name">ebics.file.process.result</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="priority">2</field> <field name="priority">2</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Process EBICS File"> <form string="Process EBICS File">
<separator colspan="4" string="Results :" /> <separator colspan="4" string="Results :" />
<field name="note_process" colspan="4" nolabel="1" width="850" height="400" /> <field
<footer> name="note_process"
<button colspan="4"
nolabel="1"
width="850"
height="400"
/>
<footer>
<button
name="action_open_bank_statements" name="action_open_bank_statements"
string="View Bank Statement(s)" string="View Bank Statement(s)"
type="object" type="object"
class="oe_highlight" class="oe_highlight"
invisible="not context.get('statement_ids')" invisible="not context.get('statement_ids')"
/> />
<button name="button_close" type="object" string="Close" /> <button name="button_close" type="object" string="Close" />
</footer> </footer>
</form> </form>
</field> </field>
</record> </record>
<record id="ebics_file_action_download" model="ir.actions.act_window"> <record id="ebics_file_action_download" model="ir.actions.act_window">
<field name="name">EBICS Download Files</field> <field name="name">EBICS Download Files</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.file</field> <field name="res_model">ebics.file</field>
<field name="view_mode">list,form</field> <field name="view_mode">list,form</field>
<field name="view_id" eval="False" /> <field name="view_id" eval="False" />
<field name="domain">[('type','=','down')]</field> <field name="domain">[('type', '=', 'down')]</field>
<field name="search_view_id" ref="ebics_file_view_search" /> <field name="search_view_id" ref="ebics_file_view_search" />
</record> </record>
<record id="ebics_file_action_download_list" model="ir.actions.act_window.view"> <record id="ebics_file_action_download_list" model="ir.actions.act_window.view">
<field eval="1" name="sequence" /> <field eval="1" name="sequence" />
<field name="view_mode">list</field> <field name="view_mode">list</field>
<field name="view_id" ref="ebics_file_view_list_download" /> <field name="view_id" ref="ebics_file_view_list_download" />
<field name="act_window_id" ref="ebics_file_action_download" /> <field name="act_window_id" ref="ebics_file_action_download" />
</record> </record>
<record id="ebics_file_action_download_form" model="ir.actions.act_window.view"> <record id="ebics_file_action_download_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence" /> <field eval="2" name="sequence" />
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="view_id" ref="ebics_file_view_form_download" /> <field name="view_id" ref="ebics_file_view_form_download" />
<field name="act_window_id" ref="ebics_file_action_download" /> <field name="act_window_id" ref="ebics_file_action_download" />
</record> </record>
<!-- Upload --> <!-- Upload -->
<record id="ebics_file_view_list_upload" model="ir.ui.view"> <record id="ebics_file_view_list_upload" model="ir.ui.view">
<field name="name">ebics.file.list</field> <field name="name">ebics.file.list</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<list decoration-muted="state=='draft'" create="false"> <list decoration-muted="state=='draft'" create="false">
<field name="date" string="Upload Date" /> <field name="date" string="Upload Date" />
<field name="name" /> <field name="name" />
<field name="user_id" /> <field name="user_id" />
<field name="state" /> <field name="state" />
<field name="format_id" /> <field name="format_id" />
<field <field
name="company_ids" name="company_ids"
widget="many2many_tags" widget="many2many_tags"
groups="base.group_multi_company" groups="base.group_multi_company"
/> />
</list> </list>
</field> </field>
</record> </record>
<record id="ebics_file_view_form_upload" model="ir.ui.view"> <record id="ebics_file_view_form_upload" model="ir.ui.view">
<field name="name">ebics.file.form</field> <field name="name">ebics.file.form</field>
<field name="model">ebics.file</field> <field name="model">ebics.file</field>
<field name="priority">1</field> <field name="priority">1</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="EBICS File" create="false"> <form string="EBICS File" create="false">
<header> <header>
<button <button
name="set_to_draft" name="set_to_draft"
invisible="state != 'done'" invisible="state != 'done'"
string="Set to Draft" string="Set to Draft"
type="object" type="object"
groups="account.group_account_manager" groups="account.group_account_manager"
/> />
<button <button
name="set_to_done" name="set_to_done"
invisible="state != 'draft'" invisible="state != 'draft'"
string="Set to Done" string="Set to Done"
type="object" type="object"
groups="account.group_account_manager" groups="account.group_account_manager"
/> />
<field name="state" widget="statusbar" /> <field name="state" widget="statusbar" />
</header> </header>
<group colspan="4" col="4"> <group colspan="4" col="4">
<field name="date" string="Upload Date" /> <field name="date" string="Upload Date" />
<field name="name" /> <field name="name" />
<field name="data" filename="name" /> <field name="data" filename="name" />
<field name="format_id" /> <field name="format_id" />
<field name="user_id" /> <field name="user_id" />
<field name="ebics_userid_id" /> <field name="ebics_userid_id" />
<field <field
name="company_ids" name="company_ids"
widget="many2many_tags" widget="many2many_tags"
groups="base.group_multi_company" groups="base.group_multi_company"
/> />
</group> </group>
<notebook> <notebook>
<page string="Additional Information"> <page string="Additional Information">
<field name="note" nolabel="1" /> <field name="note" nolabel="1" />
</page> </page>
</notebook> </notebook>
</form> </form>
</field> </field>
</record> </record>
<record id="ebics_file_action_upload" model="ir.actions.act_window"> <record id="ebics_file_action_upload" model="ir.actions.act_window">
<field name="name">EBICS Upload Files</field> <field name="name">EBICS Upload Files</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">ebics.file</field> <field name="res_model">ebics.file</field>
<field name="view_mode">list,form</field> <field name="view_mode">list,form</field>
<field name="view_id" eval="False" /> <field name="view_id" eval="False" />
<field name="domain">[('type','=','up')]</field> <field name="domain">[('type', '=', 'up')]</field>
<field name="search_view_id" ref="ebics_file_view_search" /> <field name="search_view_id" ref="ebics_file_view_search" />
</record> </record>
<record id="ebics_file_action_upload_list" model="ir.actions.act_window.view"> <record id="ebics_file_action_upload_list" model="ir.actions.act_window.view">
<field eval="1" name="sequence" /> <field eval="1" name="sequence" />
<field name="view_mode">list</field> <field name="view_mode">list</field>
<field name="view_id" ref="ebics_file_view_list_upload" /> <field name="view_id" ref="ebics_file_view_list_upload" />
<field name="act_window_id" ref="ebics_file_action_upload" /> <field name="act_window_id" ref="ebics_file_action_upload" />
</record> </record>
<record id="ebics_file_action_upload_form" model="ir.actions.act_window.view"> <record id="ebics_file_action_upload_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence" /> <field eval="2" name="sequence" />
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="view_id" ref="ebics_file_view_form_upload" /> <field name="view_id" ref="ebics_file_view_form_upload" />
<field name="act_window_id" ref="ebics_file_action_upload" /> <field name="act_window_id" ref="ebics_file_action_upload" />
</record> </record>
</odoo> </odoo>