~kyon/+junk/servMac

« back to all changes in this revision

Viewing changes to sma_cxp/cxp_view.xml

  • Committer: evilburns at hotmail
  • Date: 2014-04-22 18:46:21 UTC
  • Revision ID: evilburns@hotmail.com-20140422184621-05x1ssvknnzwg9z2
[ADD][sma_cxp] This module will make easier to keep a simple record of the incoming invoices, and will link every invoice to a jobsite.

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
    Entries
 
8
    -->
 
9
        <record id="view_cxp_control_tree" model="ir.ui.view">
 
10
            <field name="name">cxp.control.tree</field>
 
11
            <field name="model">cxp.control</field>
 
12
            <field name="type">tree</field>
 
13
            <field name="arch" type="xml">
 
14
                <tree colors="blue:state == 'draft';green:state == 'paid'; red:30 &gt; datetime.date.today()-date" string="Account payable">
 
15
                    <field name="date"/>
 
16
                    <field name="partner_id"/>
 
17
                    <field name="amount" sum="Total bought"/>
 
18
                    <field name="serial"/>
 
19
                    <field name="folio"/>
 
20
                    <field name="remaining" sum="Total remaining"/>
 
21
                    <field name="state"/>
 
22
                </tree>
 
23
            </field>
 
24
        </record>
 
25
        
 
26
        <record id="view_cxp_control_form" model="ir.ui.view">
 
27
            <field name="name">cxp.control.form</field>
 
28
            <field name="model">cxp.control</field>
 
29
            <field name="type">form</field>
 
30
            <field name="arch" type="xml">
 
31
                <form string="Account payable control">
 
32
                    <separator string="Invoice data" colspan="4"/>
 
33
                    <field name="partner_id" attrs="{'readonly':[('state','=','paid')]}"/>
 
34
                    <field name="date"/>
 
35
                    <group colspan="2" col="2">
 
36
                        <field name="serial" attrs="{'readonly':[('state','=','paid')]}"/>
 
37
                        <field name="folio" attrs="{'readonly':[('state','=','paid')]}"/>
 
38
                    </group>
 
39
                    <field name="amount" attrs="{'readonly':[('state','=','paid')]}"/>
 
40
                    <separator string="Other info" colspan="4"/>
 
41
                    <field name="jobsite_id" attrs="{'readonly':[('state','=','paid')]}"/>
 
42
                    <field name="notes"/>
 
43
                    <separator string="Payment info" colspan="4"/>
 
44
                    <field name="payment_lines" attrs="{'readonly':[('state','=','paid')]}"/>
 
45
                    <field name="remaining"/>
 
46
                    <newline/>
 
47
                    <field name="state"/>
 
48
                    <button string="Pay" icon="gtk-go-forward" name="pay_in" type="object" attrs="{'invisible':[('state','=','paid')]}"/>
 
49
                </form>
 
50
            </field>
 
51
        </record>
 
52
        
 
53
        <record id="view_cxp_control_search" model="ir.ui.view">
 
54
            <field name="name">cxp.control.search</field>
 
55
            <field name="model">cxp.control</field>
 
56
            <field name="type">search</field>
 
57
            <field name="arch" type="xml">
 
58
                <search string="A. Payable">
 
59
                   <field name="partner_id" widget="selection"/>
 
60
                   <field name="date"/>
 
61
                   <field name="amount"/>
 
62
                   <separator orientation="vertical"/>
 
63
                   <separator orientation="vertical"/>
 
64
                   <filter string="Draft" icon="terp-accessories-archiver" domain="[('state','=','draft')]"/>
 
65
                   <newline/>
 
66
                   <group expand="0" string="Group By...">
 
67
                      <filter string="Supplier" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
 
68
                   </group>
 
69
                </search>
 
70
            </field>
 
71
        </record>
 
72
        
 
73
        <record model="ir.actions.act_window" id="action_cxp_control_tree">
 
74
            <field name="name">Account payable of SMA</field>
 
75
            <field name="res_model">cxp.control</field>
 
76
            <field name="view_type">form</field>
 
77
            <field name="view_mode">tree,form</field>
 
78
            <field name="context">{'search_default_draft':1}</field>
 
79
            <field name="search_view_id" ref="view_cxp_control_search"/>-->
 
80
            <field name="limit">200</field>
 
81
            <field name="domain">[]</field>
 
82
        </record>
 
83
        
 
84
    <!--
 
85
    Jobsites
 
86
    -->
 
87
        <record id="view_cxp_jobsites_tree" model="ir.ui.view">
 
88
            <field name="name">cxp.jobsites.tree</field>
 
89
            <field name="model">cxp.jobsites</field>
 
90
            <field name="type">tree</field>
 
91
            <field name="arch" type="xml">
 
92
                <tree string="Jobsites">
 
93
                    <field name="partner_id"/>
 
94
                    <field name="description"/>
 
95
                    <field name="amount"/>
 
96
                    <field name="code"/>
 
97
                </tree>
 
98
            </field>
 
99
        </record>
 
100
        
 
101
    <!--
 
102
    Payments
 
103
    -->
 
104
        <record id="view_cxp_control_payment_line_tree" model="ir.ui.view">
 
105
            <field name="name">cxp.control.payment.lines.tree</field>
 
106
            <field name="model">cxp.control.payment.lines</field>
 
107
            <field name="type">tree</field>
 
108
            <field name="arch" type="xml">
 
109
                <tree string="Payments">
 
110
                    <field name="date"/>
 
111
                    <field name="amount"/>
 
112
                </tree>
 
113
            </field>
 
114
        </record>
 
115
 
 
116
        <menuitem id="menu_main_sma" name="SMA" icon="terp-folder-green"/>
 
117
        <menuitem id="menu_cxp_sma" name="CxP" icon="terp-folder-yellow" parent="menu_main_sma"/>
 
118
        <menuitem id="menu_action_cxp_control_tree" name="Accounts payable" parent="menu_cxp_sma" action="action_cxp_control_tree" icon="terp-dolar"/>
 
119
 
 
120
    </data>
 
121
</openerp>