1
<?xml version="1.0" encoding="utf-8"?>
5
<record model="ir.actions.act_window" id="act_attach_invoice_to_expense_wizard">
6
<field name="name">Attach to Expense</field>
7
<field name="res_model">attach.invoice.to.expense.wizard</field>
8
<field name="view_type">form</field>
9
<field name="view_mode">form</field>
10
<field name="target">new</field>
13
<record model="ir.values" id="action_batch_attach_invoices_to_expense">
14
<field name="model_id" ref="account.model_account_invoice" />
15
<field name="name">Attach to Expense</field>
16
<field name="key2">client_action_multi</field>
17
<field name="value" eval="'ir.actions.act_window,' + str(ref('act_attach_invoice_to_expense_wizard'))" />
18
<field name="key">action</field>
19
<field name="model">account.invoice</field>
22
<record id="attach_invoice_to_expense_view" model="ir.ui.view">
23
<field name="name">attach.invoice.to.expense.view</field>
24
<field name="model">attach.invoice.to.expense.wizard</field>
25
<field name="arch" type="xml">
26
<form string="Attach invoice to an Expense" version="7.0">
27
<group colspan="4" col="4">
28
<separator string="Expense"/>
30
<field name="expense_id" nolabel="1" domain="[('state','=','draft')]"/>
32
<p class="oe_view_nocontent">
33
Note: It you already have an expense asociated to the invoice, this wizard will replace the previews expense link and add a new relationship to the expense
34
specified below. If you want to unlink an already related expense only needs to run this wizard with expense field no filled.
38
<button string="Add" type="object" name="add_expense" class="oe_highlight"/>
40
<button string="Cancel" type="special" special="cancel" class="oe_link" icon="terp-gtk-stop"/>