123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?xml version="1.0" encoding="UTF-8"?>
- <openerp>
- <data>
- <record id="view_filter_inherited" model="ir.ui.view">
- <field name="name">view_filter_inherited</field>
- <field name="model">account.invoice</field>
- <field name="inherit_id" ref="account.view_account_invoice_filter"/>
- <field name="arch" type="xml">
- <field name="number" position="after">
- <filter name="sale_draft" string="Sale Draft" domain="['&',('state','=','draft'),('type','=','out_invoice')]" invisible="1"/>
- <filter name="purchase_draft" string="Purchase Draft" domain="['&',('state','=','draft'),('type','=','in_invoice')]" invisible="1" />
- <filter name="sale_open" string="Sale Open" domain="['&',('state','=','open'),('type','=','out_invoice')]" invisible="1"/>
- <filter name="purchase_open" string="Purchase Open" domain="['&',('state','=','open'),('type','=','in_invoice')]" invisible="1"/>
- </field>
- <filter name="draft" position="attributes">
- <attribute name="invisible">True</attribute>
- </filter>
- <filter name="proforma" position="attributes">
- <attribute name="invisible">True</attribute>
- </filter>
- <filter name="invoices" position="attributes">
- <attribute name="invisible">True</attribute>
- </filter>
- <filter name="unpaid" position="attributes">
- <attribute name="invisible">True</attribute>
- </filter>
- </field>
- </record>
- <!-- -->
- <record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
- <field name="name">account.journal.dashboard.kanban</field>
- <field name="model">account.journal</field>
- <field name="arch" type="xml">
- <kanban class="oe_background_grey" create="0">
- <field name="id"/>
- <field name="name"/>
- <field name="type"/>
- <field name="show_on_dashboard"/>
- <field name="kanban_dashboard"/>
- <templates>
- <t t-name="kanban-box">
- <div t-attf-class="oe_kanban_color_#{kanban_getcolor(3)} oe_kanban_card oe_kanban_invoice">
- <t t-value="JSON.parse(record.kanban_dashboard.raw_value)" t-set="dashboard"/>
- <t t-value="record.type.raw_value" t-set="journal_type"/>
- <t t-value="record.id" t-set="id_graph"/>
- <t t-call="JournalTop"/>
- <div class="o_kanban_card_content o_visible">
- <div class="row">
- <t t-if="(journal_type == 'bank' || journal_type == 'cash')" t-call="JournalBodyBankCash"/>
- <t t-if="journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodySalePurchase"/>
- <div t-if="journal_type == 'general' || journal_type == 'situation'" class="row">
- </div>
- </div>
- <t t-if="journal_type == 'bank' || journal_type == 'cash' || journal_type == 'sale' || journal_type == 'purchase'" t-call="JournalBodyGraph"/>
- </div>
- </div>
- </t>
- <t t-name="JournalTop">
- <div class="o_kanban_card_header">
- <div class="o_kanban_card_header_title">
- <h4 class="text-center">
- <strong><field name="name"/></strong>
- </h4>
- </div>
- </div>
- </t>
- <t t-name="JournalBodyBankCash">
- <!-- On the left, display :
- - A button corresponding to the bank_statements_source, if it wasn't configured, a button for each of them
- - If there are statements to reconcile, a link to reconcile them -->
- <div class="col-xs-6 o_kanban_primary_left">
- <t t-if="dashboard.number_to_reconcile > 0">
- <button type="object" name="action_open_reconcile" class="btn btn-primary btn-sm"> Reconcile <t t-esc="dashboard.number_to_reconcile"/> Items</button>
- </t>
- <t t-if="journal_type == 'bank'">
- <div name="bank_journal_default_cta" t-if="! dashboard.bank_statements_source">
- <button t-if="dashboard.number_to_reconcile == 0" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button>
- <a t-if="dashboard.number_to_reconcile > 0" type="object" name="create_bank_statement" class="oe_inline">New Statement</a>
- </div>
- <div name="bank_journal_cta" t-if="dashboard.bank_statements_source">
- <button t-if="dashboard.bank_statements_source == 'manual' && dashboard.number_to_reconcile == 0" type="object" name="create_bank_statement" class="btn btn-primary btn-sm">New Statement</button>
- <a t-if="dashboard.bank_statements_source == 'manual' && dashboard.number_to_reconcile > 0" type="object" name="create_bank_statement" class="oe_inline">New Statement</a>
- </div>
- </t>
- <t t-if="dashboard.number_to_reconcile > 0">
- <a t-if="journal_type == 'cash'" type="object" name="create_cash_statement" class="oe_inline">New Transactions</a>
- </t>
- <t t-if="dashboard.number_to_reconcile == 0">
- <button t-if="journal_type == 'cash'" type="object" name="create_cash_statement" class="btn btn-primary btn-sm">New Transactions</button>
- </t>
- </div>
- <!-- On the right, show other common informations/actions -->
- <div class="col-xs-6 o_kanban_primary_right">
- <div class="row">
- <div class="col-xs-6">
- <span title="Balance in Odoo">Balance in Odoo</span>
- </div>
- <div class="col-xs-6 text-right">
- <span><t t-esc="dashboard.account_balance"/></span>
- </div>
- </div>
- <div class="row" name="latest_statement" t-if="dashboard.last_balance != dashboard.account_balance">
- <div class="col-xs-6">
- <span title="Latest Statement">Latest Statement</span>
- </div>
- <div class="col-xs-6 text-right">
- <span><t t-esc="dashboard.last_balance"/></span>
- </div>
- </div>
- </div>
- </t>
- <t t-name="JournalBodySalePurchase">
- <div class="col-xs-5 o_kanban_primary_left">
- <button type="object" name="action_create_new" class="btn btn-sm">
- <t t-if="journal_type == 'sale'"><span>Nueva Venta</span></t>
- <t t-if="journal_type == 'purchase'"><span>Nueva Compra</span></t>
- </button>
- </div>
- <div class="col-xs-7 o_kanban_primary_right">
- <div class="row">
- <div class="col-xs-6">
- <a type="object" name="open_action" context="{'search_default_sale_draft': '1'}">
- <span t-if="journal_type == 'sale'" title="Facturas por validar"><t t-esc="dashboard.number_draft"/> Facturas por validar</span>
- </a>
- <a type="object" name="open_action" context="{'search_default_purchase_draft': '1'}">
- <span t-if="journal_type == 'purchase'" title="Facturas en borrador"><t t-esc="dashboard.number_draft"/> Facturas en borrador</span>
- </a>
- </div>
- <div class="col-xs-6 text-right">
- <span><t t-esc="dashboard.currency_id"/></span>
- <span><t t-esc="dashboard.sum_draft"/></span>
- </div>
- </div>
- <div class="row">
- <div class="col-xs-6">
- <a type="object" name="open_action" context="{'search_default_sale_open':'1'}">
- <span t-if="journal_type == 'sale'" title="Esperando pagos"><t t-esc="dashboard.number_waiting"/> Esperando pagos</span>
- </a>
- <a type="object" name="open_action" context="{'search_default_purchase_open': '1'}">
- <span t-if="journal_type == 'purchase'" title="Pagos a realizar"><t t-esc="dashboard.number_waiting"/> Pagos a realizar</span>
- </a>
- </div>
- <div class="col-xs-6 text-right">
- <span><t t-esc="dashboard.currency_id"/></span>
- <span> <t t-esc="dashboard.sum_waiting"/></span>
- </div>
- </div>
- </div>
- </t>
- <t t-name="JournalBodyGraph">
- <div class="o_kanban_graph_section">
- <field name="kanban_dashboard_graph" t-att-graph_type="_.contains(['cash','bank'],journal_type) ? 'line' : 'bar'" widget="kanban_graph"/>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
- <record id="open_account_journal_dashboard_kanban" model="ir.actions.act_window">
- <field name="name">Control de Mando</field>
- <field name="res_model">account.journal</field>
- <field name="view_type">form</field>
- <field name="view_mode">kanban,form</field>
- <field name="usage">menu</field>
- <field name="context">{}</field>
- <field name="domain">['|',('type', '=', 'sale'),('type', '=', 'purchase')]</field>
- </record>
- <menuitem id="menu_board_journal_1" name="Control de Mando" parent="account.menu_finance" sequence="1"/>
- <menuitem id="submenu_board_journal_1" name="Resumen" action="open_account_journal_dashboard_kanban"
- parent="menu_board_journal_1" sequence="1"/>
- <!-- -->
- </data>
- </openerp>
|