invoice_view.xml 4.23 KB
Newer Older
santi's avatar
santi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>

    <record model="ir.ui.view" id="invoice_supplier_form_validation_wkfl">
      <field name="name">account.invoice.supplier.form.validation.wkfl</field>
      <field name="model">account.invoice</field>
      <field name="inherit_id" ref="account.invoice_supplier_form"/>
      <field name="arch" type="xml">
        <xpath expr="/form/header" position="replace">
          <header>
            <button name="invoice_cancel" states="draft,to_valid,to_send,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
            <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
            <button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
            <button name="%(account.action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="account.group_account_user"/>
            <button name="invoice_open" states="to_send,proforma2" string="Approve" icon="terp-camera_test"/>
            <button name="invoice_to_valid" states="draft" string="To Validation" icon="terp-camera_test"/>
santi's avatar
santi committed
18
            <button name="invoice_to_send" states="to_valid" string="Invoice to send" icon="terp-camera_test" groups="account.group_account_user"/>
santi's avatar
santi committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
            <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
          </header>
        </xpath>
      </field>
    </record>

    <record model="ir.ui.view" id="invoice_form_validation_wkfl">
      <field name="name">account.invoice.form.validation.wkfl</field>
      <field name="model">account.invoice</field>
      <field name="inherit_id" ref="account.invoice_form"/>
      <field name="arch" type="xml">
        <xpath expr="/form/header" position="replace">
          <header>
            <button name="invoice_cancel" states="to_send,to_valid,draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
            <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
santi's avatar
santi committed
34
            <button name="invoice_to_send" states="to_valid" string="Invoice To Send" icon="gtk-go-forward" groups="account.group_account_user"/>
santi's avatar
santi committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
            <button name="invoice_to_valid" states="draft" string="To Validation" icon="terp-gtk-media-pause"/>
            <button name="%(account.action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
            <button name='%(account.action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="account.group_account_user"/>
            <button name="invoice_proforma2" states="to_send" string="PRO-FORMA" icon="terp-gtk-media-pause" />
            <button name="invoice_open" states="to_send,proforma2" string="Validate" icon="gtk-go-forward"/>
            <button name="invoice_print" string="Print" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
            <button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
            <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
          </header>
        </xpath>
      </field>
    </record>

    <record id="view_account_invoice_filter" model="ir.ui.view">
      <field name="name">account.invoice.valid_wkf.select</field>
      <field name="model">account.invoice</field>
      <field name="inherit_id" ref="account.view_account_invoice_filter" />
      <field name="arch" type="xml">
        <xpath expr="/search/filter[@name='proforma']" position="after">
          <filter name="to_valid" icon="terp-camera_test" string="To Validate" domain="[('state','=','to_valid')]" help="To Validate Invoices"/>
          <filter name="to_send" icon="terp-check" string="To Send" domain="[('state','=','to_send')]" help="To Send Invoices"/>
        </xpath>
      </field>
    </record>

  </data>
</openerp>