~vauxoo/openerp-venezuela-localization/ovl70-fr-rev-hbto

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

    <!--
    =====================================================
    Withholding Line
    =====================================================
    -->

        <record id="view_wh_muni_line_tree" model="ir.ui.view">
            <field name="name">account.wh.munici.line.tree</field>
            <field name="model">account.wh.munici.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Local Withholding line " editable="bottom">
                    <field name="name"/>
                    <field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('state', '=', 'open'), ('partner_id','=',parent.partner_id), ('wh_local', '=', False)]"/>
                    <field name="wh_loc_rate"/>
                    <field name="amount"/>
                    <field name="move_id"/>
                </tree>
            </field>
        </record>

        <record id="view_wh_muni_line_form" model="ir.ui.view">
            <field name="name">account.wh.munici.line.form</field>
            <field name="model">account.wh.munici.line</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Local Withholding line ">
                    <notebook>
                        <page string="Linea">
                            <field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('state', '=', 'open'), ('partner_id','=',parent.partner_id), ('wh_local', '=', False)]"/>
                            <field colspan="4" name="name" select="1"/>
                            <field name="wh_loc_rate"/>
                            <field name="amount"/>
                            <field name="move_id"/>  
                        </page>
                    </notebook>
                </form>
            </field>
        </record>


    <!--
    =====================================================
    Local Withholding
    =====================================================
    -->


        <record id="view_wh_muni_filter" model="ir.ui.view">
            <field name="name">account.wh.munici.search</field>
            <field name="model">account.wh.munici</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Withholding Local">
                   <group col="10" colspan="4">
                        <filter name="draft" icon="terp-gtk-media-pause" string="Draft" domain="[('state','=','draft')]" help="Draft Withholding Local"/>
                        <filter name="confirmed" icon="terp-gtk-media-pause" string="Confirmed" domain="[('state','=','confirmed')]" help="Draft Withholding Local"/>
                        <filter name="done" icon="terp-check" string="Done" domain="[('state','=','done')]" help="Done Withholding Local"/>
                        <filter name="cancel" icon="terp-dialog-close" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Withholding Local"/>
                        <separator orientation="vertical"/>
                        <field name="code"/>
                        <field name="number"/>
                        <field name="partner_id"/>
                        <field name="journal_id"  widget="selection" string="Journal"/>
                        <field name="date_ret"/>
                    </group>
                    <newline/>
                    <group expand="1" string="Group By...">
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
                        <separator orientation="vertical"/>
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"  context="{'group_by':'state'}"/>
                        <separator orientation="vertical"/>
                        <filter string="Accounting Date of Withhold" icon="terp-go-month" domain="[]"  context="{'group_by':'date_ret'}"/>
                    </group>
               </search>
            </field>
        </record>


        <record id="view_wh_muni_tree" model="ir.ui.view">
            <field name="name">account.wh.munici.tree</field>
            <field name="model">account.wh.munici</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="blue:state=='draft'" string="Local Withholding">
                    <field name="name"/>
                    <field name="type"/>
                    <field name="code"/>
                    <field name="number"/>
                    <field name="partner_id"/>
                    <field name="date_ret"/>
                    <field name="currency_id"/>
                    <field name="period_id"/>
                    <field name="state"/>
                    <field name="amount"/>

                </tree>
            </field>
        </record>


        <record id="view_wh_muni_form" model="ir.ui.view">
            <field name="name">account.wh.munici.form</field>
            <field name="model">account.wh.munici</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Local Withholding">
                    <group colspan="4" col="6">
                        <field name="journal_id" select="2" domain="[('type','=','mun_purchase')]"/>
                        <field name="type"/>
                        <field name="code"/>
                        <field name="partner_id" on_change="onchange_partner_id(type,partner_id)"/>
                        <field name="currency_id"/>
                        <field name="date_ret"/>
                        <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" name="account_id"/>
                        <field name="name"/>
                        <field name="period_id"/>
                        <field name="number" attrs="{'readonly':[('type','=','in_invoice')],'required':[('type','in',['out_invoice','out_refund'])]}"/>
                        <field name="date" />
                        <field name="amount" />
                    </group>
                    <notebook colspan="4">
                        <page string="Withholding">
                            <field name="munici_line_ids" default_get="{'lines': munici_line_ids }" colspan="4" nolabel="1" height="275"/>
                            <group col="4" colspan="2">
                                <field name="state"/>
                                <button name="wh_muni_confirmed" states="draft" string="Confirm" icon="gtk-execute"/>
                                <button name="wh_muni_done" states="confirmed" string="Done" icon="gtk-execute"/>
                            </group>
                        </page>
                        <page string="Other Information">
                            <field name="company_id"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>


        <record model="ir.actions.act_window" id="action_account_wh_muni_customer">
            <field name="name">Local Withholding Customer</field>
            <field name="res_model">account.wh.munici</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('type','=','out_invoice')]</field>
            <field name="context">{'type':'out_invoice'}</field>
            <field name="search_view_id" ref="view_wh_muni_filter"/>
            <field name="help">With Local Withholding Customer you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>
        </record>
        <record model="ir.actions.act_window.view" id="act_wv_account_wh_muni_customer_tree">
            <field name="sequence" eval="10"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_wh_muni_tree"/> 
            <field name="act_window_id" ref="action_account_wh_muni_customer"/>
        </record>
        <record model="ir.actions.act_window.view" id="act_wv_account_wh_muni_customer_form">
            <field name="sequence" eval="20"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_wh_muni_form"/>
            <field name="act_window_id" ref="action_account_wh_muni_customer"/>
        </record>

        <menuitem
            id="menu_action_account_wh_muni_customer"
            name="Local Withholding Customer"
            parent="account.menu_finance_receivables"
            action="action_account_wh_muni_customer"/>



        <record model="ir.actions.act_window" id="action_account_wh_muni_supplier">
            <field name="name">Local Withholding Supplier</field>
            <field name="res_model">account.wh.munici</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('type','=','in_invoice')]</field>
            <field name="context">{'type':'in_invoice'}</field>
            <field name="search_view_id" ref="view_wh_muni_filter"/>
            <field name="help">With Local Withholding Supplier you can create and manage document withholding issued to your customers. OpenERP can also generate document withholding automatically from invoices. For retention must add the invoices, process them and then validate the document.</field>
        </record>
        <record model="ir.actions.act_window.view" id="act_wv_account_wh_muni_supplier_tree">
            <field name="sequence" eval="10"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_wh_muni_tree"/> 
            <field name="act_window_id" ref="action_account_wh_muni_supplier"/>
        </record>
        <record model="ir.actions.act_window.view" id="act_wv_account_wh_muni_supplier_form">
            <field name="sequence" eval="20"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_wh_muni_form"/>
            <field name="act_window_id" ref="action_account_wh_muni_supplier"/>
        </record>

        <menuitem
            id="menu_action_account_wh_muni_supplier"
            name="Local Withholding Supplier"
            parent="account.menu_finance_payables"
            action="action_account_wh_muni_supplier"/>

    </data>
</openerp>