1
<?xml version="1.0" encoding="utf-8"?>
8
=====================================================
10
=====================================================
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">
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'])]"/>
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">
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'])]"/>
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"/>
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'])]"/>
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'])]}"/>
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'])]"/>
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'])]}"/>