~vauxoo/addons-vauxoo/7.0-addons-vauxoo-send_email_add_follower-dev-julio

« back to all changes in this revision

Viewing changes to debit_credit_note/account_invoice_view.xml

  • Committer: Jose Morales
  • Date: 2013-06-10 22:31:46 UTC
  • mto: (543.25.2 merge_trunk)
  • mto: This revision was merged to the branch mainline in revision 602.
  • Revision ID: jose@vauxoo.com-20130610223146-1ggohda603sph1ml
 
[ADD] Added module to creade debit not and set parent invoice when we create a credit note

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
    <data>
 
4
 
 
5
 
 
6
 
 
7
    <!-- 
 
8
    =====================================================
 
9
    Invoices Extension
 
10
    =====================================================
 
11
    -->  
 
12
 
 
13
        <record id="account_inv_ext_view_form_crdr" model="ir.ui.view">
 
14
            <field name="name">invoice_extended.form.crdr</field>
 
15
            <field name="model">account.invoice</field>
 
16
            <field name="inherit_id" ref="account.invoice_form"/>
 
17
            <field name="arch" type="xml">
 
18
                <notebook>
 
19
                    <page string="Debit-Credit Notes" position="inside">
 
20
                        <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
 
21
                    </page>
 
22
                </notebook>
 
23
            </field>
 
24
        </record>
 
25
 
 
26
 
 
27
 
 
28
        <record id="account_inv_ext_view_supp_form_crdr" model="ir.ui.view">
 
29
            <field name="name">invoice_extended.supplier.form.crdr</field>
 
30
            <field name="model">account.invoice</field>
 
31
            <field name="inherit_id" ref="account.invoice_supplier_form"/>
 
32
            <field name="arch" type="xml">
 
33
                <notebook>
 
34
                    <page string="Debit-Credit Notes" position="inside">
 
35
                        <field name="child_ids" nolabel="1" widget="many2many" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['in_invoice', 'in_refund'])]"/>
 
36
                    </page>
 
37
                </notebook>
 
38
            </field>
 
39
        </record>
 
40
 
 
41
 
 
42
        <record id="account_inv_ext_view_tree_crdr" model="ir.ui.view">
 
43
            <field name="name">invoice_extended.tree.crdr</field>
 
44
            <field name="model">account.invoice</field>
 
45
            <field name="inherit_id" ref="account.invoice_tree"/>
 
46
            <field name="arch" type="xml">
 
47
                <xpath expr="//field[@name='origin']" position="after">
 
48
                    <field name="parent_id"/>
 
49
                </xpath>
 
50
            </field>
 
51
        </record>
 
52
        <record id="account_inv_ext_form_crdrc" model="ir.ui.view">
 
53
            <field name="name">invoice_ext.form.crdrc</field>
 
54
            <field name="model">account.invoice</field>
 
55
            <field name="inherit_id" ref="account.invoice_form"/>
 
56
            <field name="arch" type="xml">
 
57
                <xpath expr="//field[@name='period_id']" position="after">
 
58
                    <field name="parent_id" attrs="{'required':[('type','=','out_refund')]}" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['out_invoice', 'out_refund'])]"/>
 
59
                </xpath>
 
60
                <xpath expr="//button[@string='Refund Invoice']" position="after">
 
61
                    <button name="%(action_account_invoice_debit)d" type='action' string='Debit Note' states='open,paid' icon="gtk-execute" attrs="{'invisible':[('type','in',['in_refund', 'out_refund'])]}"/>
 
62
                </xpath>
 
63
            </field>
 
64
        </record>
 
65
        <record id="account_inv_ext_form_crdrs" model="ir.ui.view">
 
66
            <field name="name">invoice_ext.form.crdrs</field>
 
67
            <field name="model">account.invoice</field>
 
68
            <field name="inherit_id" ref="account.invoice_supplier_form"/>
 
69
            <field name="arch" type="xml">
 
70
                <xpath expr="//field[@name='period_id']" position="after">
 
71
                    <field name="parent_id" attrs="{'required':[('type','=','in_refund')]}" domain="[('partner_id','=',partner_id),('id', '!=', active_id),('type','in',['in_invoice', 'in_refund'])]"/>
 
72
                </xpath>
 
73
                <xpath expr="//button[@string='Ask Refund']" position="after">
 
74
                    <button name="%(action_account_invoice_debit)d" type='action' string='Debit Note' states='open,paid' icon="gtk-execute" attrs="{'invisible':[('type','in',['in_refund', 'out_refund'])]}"/>
 
75
                </xpath>
 
76
            </field>
 
77
        </record>
 
78
    </data>
 
79
</openerp>