Merge lp:~vauxoo/openerp-venezuela-localization/israel-l10n_ve_withholding_islr-config-wiz into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Proposed by Israel Fermin Montilla
Status: Merged
Approved by: Gabriela Quilarque
Approved revision: 478
Merged at revision: 475
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/israel-l10n_ve_withholding_islr-config-wiz
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 627 lines (+306/-38)
5 files modified
l10n_ve_withholding_islr/__init__.py (+1/-1)
l10n_ve_withholding_islr/__openerp__.py (+1/-0)
l10n_ve_withholding_islr/i18n/es_VE.po (+149/-37)
l10n_ve_withholding_islr/installer.py (+96/-0)
l10n_ve_withholding_islr/view/installer.xml (+59/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/israel-l10n_ve_withholding_islr-config-wiz
Reviewer Review Type Date Requested Status
Gabriela Quilarque Pending
Review via email: mp+81220@code.launchpad.net

Description of the change

More info on Blueprint

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_withholding_islr/__init__.py'
2--- l10n_ve_withholding_islr/__init__.py 2011-10-25 20:33:16 +0000
3+++ l10n_ve_withholding_islr/__init__.py 2011-11-03 23:26:52 +0000
4@@ -25,7 +25,7 @@
5 # You should have received a copy of the GNU Affero General Public License
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7 ##############################################################################
8-
9+import installer
10 import islr_wh_concept
11 import rates
12 import invoice
13
14=== modified file 'l10n_ve_withholding_islr/__openerp__.py'
15--- l10n_ve_withholding_islr/__openerp__.py 2011-10-28 17:13:52 +0000
16+++ l10n_ve_withholding_islr/__openerp__.py 2011-11-03 23:26:52 +0000
17@@ -57,6 +57,7 @@
18 "demo/l10n_ve_islr_withholding_demo.xml",
19 ],
20 "update_xml" : [
21+ "view/installer.xml",
22 "security/wh_islr_security.xml",
23 "security/ir.model.access.csv",
24 "data/l10n_ve_islr_withholding_data.xml",
25
26=== modified file 'l10n_ve_withholding_islr/i18n/es_VE.po'
27--- l10n_ve_withholding_islr/i18n/es_VE.po 2011-11-02 16:30:34 +0000
28+++ l10n_ve_withholding_islr/i18n/es_VE.po 2011-11-03 23:26:52 +0000
29@@ -6,8 +6,8 @@
30 msgstr ""
31 "Project-Id-Version: OpenERP Server 6.0.3\n"
32 "Report-Msgid-Bugs-To: support@openerp.com\n"
33-"POT-Creation-Date: 2011-11-02 15:26+0000\n"
34-"PO-Revision-Date: 2011-11-02 15:26+0000\n"
35+"POT-Creation-Date: 2011-11-03 23:04+0000\n"
36+"PO-Revision-Date: 2011-11-03 23:04+0000\n"
37 "Last-Translator: <>\n"
38 "Language-Team: \n"
39 "MIME-Version: 1.0\n"
40@@ -183,6 +183,15 @@
41 msgstr "Concepto de Retención asociado a esta tasa"
42
43 #. module: l10n_ve_withholding_islr
44+#: view:wh.islr.config:0
45+msgid "\n"
46+"Configure your company's withholding ISLR \n"
47+" "
48+msgstr "\n"
49+"Configure las retenciones de ISLR para su compañía \n"
50+" "
51+
52+#. module: l10n_ve_withholding_islr
53 #: field:islr.rates,minimum:0
54 msgid "Min. Amount"
55 msgstr "Monto Mínimo"
56@@ -198,6 +207,11 @@
57 msgstr "Comprobante Contable"
58
59 #. module: l10n_ve_withholding_islr
60+#: help:wh.islr.config,journal_sale:0
61+msgid "Journal for sale operations involving Withholding Income"
62+msgstr "Diario para operaciones de venta que involucran retención de ISLR"
63+
64+#. module: l10n_ve_withholding_islr
65 #: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_pagos_de_servicios_publicitarios
66 msgid "Pagos por Servicios de Publicidad y Propaganda y la Cesión de la Venta de Espacios para tales fines"
67 msgstr "Pagos por Servicios de Publicidad y Propaganda y la Cesión de la Venta de Espacios para tales fines"
68@@ -219,6 +233,11 @@
69 msgstr "Monto"
70
71 #. module: l10n_ve_withholding_islr
72+#: help:wh.islr.config,journal_purchase:0
73+msgid "Journal for purchase operations involving Withholding Income"
74+msgstr "Diario para operaciones de venta que involucran ISLR"
75+
76+#. module: l10n_ve_withholding_islr
77 #: report:islr.wh.doc:0
78 msgid "No. Doc."
79 msgstr "No. Doc."
80@@ -250,16 +269,16 @@
81 msgstr "DIRECCION:"
82
83 #. module: l10n_ve_withholding_islr
84+#: help:islr.xml.wh.line,control_number:0
85+msgid "Reference"
86+msgstr "Referencia"
87+
88+#. module: l10n_ve_withholding_islr
89 #: view:islr.wh.doc:0
90 msgid "Invoices Withhelds"
91 msgstr "Facturas Retenidas"
92
93 #. module: l10n_ve_withholding_islr
94-#: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_demo2
95-msgid "DEMO Cualquier otra Comisión distintas a Remuneraciones accesorias de los sueldos, salarios y demás remuneraciones similares"
96-msgstr "DEMO Cualquier otra Comisión distintas a Remuneraciones accesorias de los sueldos, salarios y demás remuneraciones similares"
97-
98-#. module: l10n_ve_withholding_islr
99 #: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_pago_contratistas
100 msgid "Pagos a Empresas Contratistas o Subcontratistas domiciliadas o no en el país, por la ejecución de obras o de la prestación de servicios en base a valuaciones y ordenes de pago"
101 msgstr "Pagos a Empresas Contratistas o Subcontratistas domiciliadas o no en el país, por la ejecución de obras o de la prestación de servicios en base a valuaciones y ordenes de pago"
102@@ -282,6 +301,11 @@
103 msgstr "Ganancias obtenidas por premios de Loterías y de Hipódromos"
104
105 #. module: l10n_ve_withholding_islr
106+#: field:wh.islr.config,account_purchase:0
107+msgid "Account Withholding Income Purchase"
108+msgstr "Cuenta contable para ISLR (compras)"
109+
110+#. module: l10n_ve_withholding_islr
111 #: help:islr.rates,code:0
112 #: help:islr.xml.wh.line,concept_code:0
113 msgid "Concept code"
114@@ -293,7 +317,7 @@
115 #: field:islr.wh.doc,partner_id:0
116 #: field:islr.xml.wh.line,partner_id:0
117 msgid "Partner"
118-msgstr "Empresa"
119+msgstr "Cliente"
120
121 #. module: l10n_ve_withholding_islr
122 #: help:islr.wh.concept,withholdable:0
123@@ -336,9 +360,9 @@
124 msgstr "Confirmado"
125
126 #. module: l10n_ve_withholding_islr
127-#: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_seguros_prestacion
128-msgid "Pagos de las Empresas de Seguro, las sociedades de corretaje de seguro y las empresas de reaseguros por la prestación de los servicios que le son propios"
129-msgstr "Pagos de las Empresas de Seguro, las sociedades de corretaje de seguro y las empresas de reaseguros por la prestación de los servicios que le son propios"
130+#: view:islr.xml.wh.doc:0
131+msgid "Other information"
132+msgstr "Otra información"
133
134 #. module: l10n_ve_withholding_islr
135 #: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_invoices
136@@ -398,9 +422,9 @@
137 msgstr "Enriquecimientos netos de exhibición de películas, cine o la televisión"
138
139 #. module: l10n_ve_withholding_islr
140-#: field:islr.wh.doc.line,retencion_islr:0
141-msgid "Percentage"
142-msgstr "Porcentaje"
143+#: field:wh.islr.config,journal_sale:0
144+msgid "Journal Wh Income Sale"
145+msgstr "Diario ISLR para ventas"
146
147 #. module: l10n_ve_withholding_islr
148 #: code:addons/l10n_ve_withholding_islr/islr_wh_doc.py:282
149@@ -432,7 +456,7 @@
150 #. module: l10n_ve_withholding_islr
151 #: help:islr.wh.concept,property_retencion_islr_payable:0
152 msgid "This account will be used as the account where the withheld amounts shall be charged in full (Purchase) of income tax for this concept"
153-msgstr "This account will be used as the account where the withheld amounts shall be charged in full (Purchase) of income tax for this concept"
154+msgstr "Esta cuenta será usada como cuenta para cargar los montor retenidos en compras para ISLR en este concepto"
155
156 #. module: l10n_ve_withholding_islr
157 #: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_pagos_administradores_en_el_pais
158@@ -557,6 +581,11 @@
159 msgstr "Pagos a los arrendadores de los bienes inmuebles situados en el país"
160
161 #. module: l10n_ve_withholding_islr
162+#: report:islr.wh.doc:0
163+msgid "TOTAL IMPUESTO RETENIDO"
164+msgstr "TOTAL IMPUESTO RETENIDO"
165+
166+#. module: l10n_ve_withholding_islr
167 #: help:islr.rates,subtract:0
168 msgid "Amount to subtract from the total amount to withhold, Amount Percentage withhold ..... This subtrahend only applied the first time you perform withhold "
169 msgstr "Cantidad a restar del monto total a retener,..Monto Porcentual de Retención... Este sustraendo solo se aplicará la primera vez que se realiza la retención"
170@@ -567,6 +596,11 @@
171 msgstr "Cuenta contable de ISLR (compra)"
172
173 #. module: l10n_ve_withholding_islr
174+#: field:wh.islr.config,config_logo:0
175+msgid "Image"
176+msgstr "Image"
177+
178+#. module: l10n_ve_withholding_islr
179 #: report:islr.wh.doc:0
180 msgid "Tipo Doc."
181 msgstr "Tipo Doc."
182@@ -633,9 +667,10 @@
183 msgstr "Vendedor"
184
185 #. module: l10n_ve_withholding_islr
186-#: help:islr.xml.wh.line,control_number:0
187-msgid "Reference"
188-msgstr "Referencia"
189+#: code:addons/l10n_ve_withholding_islr/installer.py:92
190+#, python-format
191+msgid "Journal Withholding Income Purchase"
192+msgstr "Diario ISLR para compras"
193
194 #. module: l10n_ve_withholding_islr
195 #: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_juegos_y_apuestas
196@@ -648,6 +683,11 @@
197 msgstr "Pagos de las Empresas Emisoras de Tarjetas de Credito o Concumo por la venta de bienes y servicios o cualquier otro concepto"
198
199 #. module: l10n_ve_withholding_islr
200+#: field:wh.islr.config,wh_agent:0
201+msgid "Withholding Income Agent"
202+msgstr "Withholding Income Agent"
203+
204+#. module: l10n_ve_withholding_islr
205 #: model:ir.module.module,shortdesc:l10n_ve_withholding_islr.module_meta_information
206 msgid "Automatically Calculation Withholding Income"
207 msgstr "Calculo Automático de Impuesto Sobre la Renta (ISLR)"
208@@ -669,6 +709,12 @@
209 msgstr "A través de \"Concepto de Retención de ISLR\" usted podrá crear y gestionar los conceptos de retención de ISLR. Por cada concepto se puede crear y gestionar las tasas asociadas."
210
211 #. module: l10n_ve_withholding_islr
212+#: field:islr.rates,name:0
213+#: field:islr.wh.concept,rate_ids:0
214+msgid "Rate"
215+msgstr "Tasa"
216+
217+#. module: l10n_ve_withholding_islr
218 #: model:ir.model,name:l10n_ve_withholding_islr.model_islr_wh_doc_line
219 msgid "Lines of Document Withholding Income"
220 msgstr "Líneas del Documento de Retención de ISLR"
221@@ -703,9 +749,9 @@
222 msgstr "Estatus"
223
224 #. module: l10n_ve_withholding_islr
225-#: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_demo1
226-msgid "DEMO Honorarios Profesionales No Mercantiles"
227-msgstr "DEMO Honorarios Profesionales No Mercantiles"
228+#: field:wh.islr.config,progress:0
229+msgid "Configuration Progress"
230+msgstr "Configuration Progress"
231
232 #. module: l10n_ve_withholding_islr
233 #: field:islr.rates,nature:0
234@@ -739,6 +785,11 @@
235 msgstr "Documento de Retención de ISLR"
236
237 #. module: l10n_ve_withholding_islr
238+#: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_seguros_prestacion
239+msgid "Pagos de las Empresas de Seguro, las sociedades de corretaje de seguro y las empresas de reaseguros por la prestación de los servicios que le son propios"
240+msgstr "Pagos de las Empresas de Seguro, las sociedades de corretaje de seguro y las empresas de reaseguros por la prestación de los servicios que le son propios"
241+
242+#. module: l10n_ve_withholding_islr
243 #: help:product.template,concept_id:0
244 msgid "Concept Withholding Income to apply to the service"
245 msgstr "Concepto de Retención a aplicar para el servicio"
246@@ -749,6 +800,11 @@
247 msgstr "Líneas de Retención para el XML"
248
249 #. module: l10n_ve_withholding_islr
250+#: view:wh.islr.config:0
251+msgid "title"
252+msgstr "title"
253+
254+#. module: l10n_ve_withholding_islr
255 #: help:islr.xml.wh.line,base:0
256 msgid "Taxable"
257 msgstr "Imponible"
258@@ -774,9 +830,9 @@
259 msgstr "% Retención"
260
261 #. module: l10n_ve_withholding_islr
262-#: report:islr.wh.doc:0
263-msgid ">"
264-msgstr ">"
265+#: view:islr.wh.doc.line:0
266+msgid "Detail of the Concept of Withholding Income"
267+msgstr "Detalle del Concepto de Retención de ISLR"
268
269 #. module: l10n_ve_withholding_islr
270 #: report:islr.wh.doc:0
271@@ -817,6 +873,12 @@
272 msgstr "Concepto de Retención"
273
274 #. module: l10n_ve_withholding_islr
275+#: code:addons/l10n_ve_withholding_islr/installer.py:93
276+#, python-format
277+msgid "Journal Withholding Income Sale"
278+msgstr "Diario ISLR para ventas"
279+
280+#. module: l10n_ve_withholding_islr
281 #: help:islr.wh.doc,state:0
282 #: help:islr.xml.wh.doc,state:0
283 msgid "Voucher state"
284@@ -865,6 +927,11 @@
285 msgstr "Código"
286
287 #. module: l10n_ve_withholding_islr
288+#: view:wh.islr.config:0
289+msgid "Withholding ISLR Configuration"
290+msgstr "Withholding ISLR Configuration"
291+
292+#. module: l10n_ve_withholding_islr
293 #: field:islr.wh.doc.line,retention_rate:0
294 msgid "Withholding Rate"
295 msgstr "Tasa de Retención"
296@@ -881,6 +948,11 @@
297 msgstr "Empresa objecto de retención"
298
299 #. module: l10n_ve_withholding_islr
300+#: model:ir.model,name:l10n_ve_withholding_islr.model_wh_islr_config
301+msgid "wh.islr.config"
302+msgstr "wh.islr.config"
303+
304+#. module: l10n_ve_withholding_islr
305 #: field:islr.wh.doc,period_id:0
306 #: view:islr.xml.wh.doc:0
307 #: field:islr.xml.wh.doc,period_id:0
308@@ -909,6 +981,11 @@
309 msgstr "Realizado"
310
311 #. module: l10n_ve_withholding_islr
312+#: field:wh.islr.config,account_sale:0
313+msgid "Account Withholding Income Sale"
314+msgstr "Cuenta contable ISLR (ventas)"
315+
316+#. module: l10n_ve_withholding_islr
317 #: model:ir.model,name:l10n_ve_withholding_islr.model_account_invoice
318 #: field:islr.wh.doc,invoice_id:0
319 #: field:islr.wh.doc.invoices,invoice_id:0
320@@ -929,9 +1006,9 @@
321 msgstr "Cancelar"
322
323 #. module: l10n_ve_withholding_islr
324-#: view:islr.wh.doc.line:0
325-msgid "Detail of the Concept of Withholding Income"
326-msgstr "Detalle del Concepto de Retención de ISLR"
327+#: report:islr.wh.doc:0
328+msgid ">"
329+msgstr ">"
330
331 #. module: l10n_ve_withholding_islr
332 #: constraint:res.partner:0
333@@ -983,6 +1060,11 @@
334 msgstr "Número de Factura"
335
336 #. module: l10n_ve_withholding_islr
337+#: help:wh.islr.config,account_purchase:0
338+msgid "Account for purchase operations involving Withholding Income"
339+msgstr "Cuenta contable para operaciones de compra que involucran ISLR"
340+
341+#. module: l10n_ve_withholding_islr
342 #: report:islr.wh.doc:0
343 msgid "AGENTE DE RETENCION"
344 msgstr "AGENTE DE RETENCION"
345@@ -1003,14 +1085,19 @@
346 msgstr "Monto mínimo a partir del cual se determina si se va a a retener"
347
348 #. module: l10n_ve_withholding_islr
349+#: help:islr.xml.wh.doc,name:0
350+msgid "Description about statement of withholding income"
351+msgstr "Description about statement of withholding income"
352+
353+#. module: l10n_ve_withholding_islr
354 #: report:islr.wh.doc:0
355 msgid "Base Imponible"
356 msgstr "Base Imponible"
357
358 #. module: l10n_ve_withholding_islr
359-#: report:islr.wh.doc:0
360-msgid "TOTAL IMPUESTO RETENIDO"
361-msgstr "TOTAL IMPUESTO RETENIDO"
362+#: view:islr.wh.concept:0
363+msgid "Search Concept of Withholding Income"
364+msgstr "Búsqueda - Concepto de Retención de ISLR"
365
366 #. module: l10n_ve_withholding_islr
367 #: field:res.partner,islr_withholding_agent:0
368@@ -1018,6 +1105,11 @@
369 msgstr "Agente de Retención de ISLR?"
370
371 #. module: l10n_ve_withholding_islr
372+#: field:islr.wh.doc.line,retencion_islr:0
373+msgid "Percentage"
374+msgstr "Porcentaje"
375+
376+#. module: l10n_ve_withholding_islr
377 #: view:islr.wh.doc:0
378 msgid "Other Information"
379 msgstr "Otra Información"
380@@ -1040,10 +1132,16 @@
381 #. module: l10n_ve_withholding_islr
382 #: field:islr.wh.doc,name:0
383 #: field:islr.wh.doc.line,name:0
384+#: field:islr.xml.wh.doc,name:0
385 msgid "Description"
386 msgstr "Descripción"
387
388 #. module: l10n_ve_withholding_islr
389+#: model:ir.actions.act_window,name:l10n_ve_withholding_islr.action_config_wh_islr
390+msgid "Configure ISLR Withholding"
391+msgstr "Configure ISLR Withholding"
392+
393+#. module: l10n_ve_withholding_islr
394 #: help:islr.wh.doc,amount_total_ret:0
395 msgid "Total Withheld amount"
396 msgstr "Monto Total Retenido"
397@@ -1061,10 +1159,9 @@
398 msgstr "No se encontró un periodo fiscal para la fecha: '%s' por favor verificar.!"
399
400 #. module: l10n_ve_withholding_islr
401-#: field:islr.rates,name:0
402-#: field:islr.wh.concept,rate_ids:0
403-msgid "Rate"
404-msgstr "Tasa"
405+#: view:wh.islr.config:0
406+msgid "Configure Venezuelan ISLR Withholding"
407+msgstr "Configure Venezuelan ISLR Withholding"
408
409 #. module: l10n_ve_withholding_islr
410 #: field:islr.rates,base:0
411@@ -1083,6 +1180,11 @@
412 msgstr "Número de Factura"
413
414 #. module: l10n_ve_withholding_islr
415+#: view:wh.islr.config:0
416+msgid "res_config_contents"
417+msgstr "res_config_contents"
418+
419+#. module: l10n_ve_withholding_islr
420 #: field:account.invoice.line,wh_xml_id:0
421 msgid "XML Id"
422 msgstr "Id del XML"
423@@ -1167,6 +1269,11 @@
424 msgstr "Factura afectada para realizar el asiento contable"
425
426 #. module: l10n_ve_withholding_islr
427+#: help:wh.islr.config,account_sale:0
428+msgid "Account for sale operations involving Withholding Income"
429+msgstr "Cuenta para operaciones de ventas que involucran ISLR"
430+
431+#. module: l10n_ve_withholding_islr
432 #: help:islr.wh.doc.invoices,invoice_id:0
433 msgid "Withheld invoice"
434 msgstr "Factura Retenida"
435@@ -1284,9 +1391,9 @@
436 msgstr "Concepto de Retención de ISLR"
437
438 #. module: l10n_ve_withholding_islr
439-#: view:islr.wh.concept:0
440-msgid "Search Concept of Withholding Income"
441-msgstr "Búsqueda - Concepto de Retención de ISLR"
442+#: help:wh.islr.config,wh_agent:0
443+msgid "Check if this company is a withholding income agent"
444+msgstr "Check if this company is a withholding income agent"
445
446 #. module: l10n_ve_withholding_islr
447 #: model:islr.wh.concept,name:l10n_ve_withholding_islr.islr_wh_concept_hprof_jinetes_entrenadores_preparadores
448@@ -1315,6 +1422,11 @@
449 msgstr "Pagos a Propietarios de Animales de Carrera por concepto de Premios"
450
451 #. module: l10n_ve_withholding_islr
452+#: field:wh.islr.config,journal_purchase:0
453+msgid "Journal Wh Income Purchase"
454+msgstr "Diario ISLR para compras"
455+
456+#. module: l10n_ve_withholding_islr
457 #: report:islr.wh.doc:0
458 msgid "I.S.L.R. Retenido"
459 msgstr "I.S.L.R. Retenido"
460
461=== added directory 'l10n_ve_withholding_islr/images'
462=== added file 'l10n_ve_withholding_islr/images/playa-medina.jpg'
463Binary files l10n_ve_withholding_islr/images/playa-medina.jpg 1970-01-01 00:00:00 +0000 and l10n_ve_withholding_islr/images/playa-medina.jpg 2011-11-03 23:26:52 +0000 differ
464=== added file 'l10n_ve_withholding_islr/installer.py'
465--- l10n_ve_withholding_islr/installer.py 1970-01-01 00:00:00 +0000
466+++ l10n_ve_withholding_islr/installer.py 2011-11-03 23:26:52 +0000
467@@ -0,0 +1,96 @@
468+# -*- encoding: utf-8 -*-
469+##############################################################################
470+# Copyright (c) 2011 OpenERP Venezuela (http://openerp.com.ve)
471+# All Rights Reserved.
472+# Programmed by: Israel Fermín Montilla <israel@openerp.com.ve>
473+#
474+# WARNING: This program as such is intended to be used by professional
475+# programmers who take the whole responsability of assessing all potential
476+# consequences resulting from its eventual inadequacies and bugs
477+# End users who are looking for a ready-to-use solution with commercial
478+# garantees and support are strongly adviced to contract a Free Software
479+# Service Company
480+#
481+# This program is Free Software; you can redistribute it and/or
482+# modify it under the terms of the GNU General Public License
483+# as published by the Free Software Foundation; either version 2
484+# of the License, or (at your option) any later version.
485+#
486+# This program is distributed in the hope that it will be useful,
487+# but WITHOUT ANY WARRANTY; without even the implied warranty of
488+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
489+# GNU General Public License for more details.
490+#
491+# You should have received a copy of the GNU General Public License
492+# along with this program; if not, write to the Free Software
493+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
494+###############################################################################
495+from osv import osv
496+from osv import fields
497+from tools.translate import _
498+import base64
499+import addons
500+
501+class wh_islr_config(osv.osv_memory):
502+ _name = 'wh.islr.config'
503+ _inherit = 'res.config'
504+ _description = __doc__
505+
506+ def default_get(self, cr, uid, fields_list=None, context=None):
507+ defaults = super(wh_islr_config, self).default_get(cr, uid, fields_list=fields_list, context=context)
508+ logo = open(addons.get_module_resource('l10n_ve_withholding_islr', 'images', 'playa-medina.jpg'), 'rb')
509+ defaults['config_logo'] = base64.encodestring(logo.read())
510+ return defaults
511+
512+ def _create_journal(self, cr, uid, name, type, code):
513+ self.pool.get("account.journal").create(cr, uid, {
514+ 'name': name,
515+ 'type': type,
516+ 'code': code,
517+ 'view_id': 3,}
518+ )
519+
520+ def _update_concepts(self, cr, uid, sale, purchase):
521+ concept_pool = self.pool.get("islr.wh.concept")
522+ concept_pool.write(cr, uid, concept_pool.search(cr, uid, []), {
523+ 'property_retencion_islr_payable': purchase,
524+ 'property_retencion_islr_receivable': sale
525+ })
526+
527+ def _set_wh_agent(self, cr, uid):
528+ company = self.pool.get('res.users').browse(cr, uid, uid).company_id
529+ self.pool.get('res.partner').write(cr, uid, [company.partner_id.id], {'islr_withholding_agent': True})
530+
531+ def execute(self, cr, uid, ids, context=None):
532+ wiz_data = self.read(cr, uid, ids[0])
533+ if wiz_data['journal_purchase']:
534+ self._create_journal(cr, uid, wiz_data["journal_purchase"], 'islr_purchase', 'ISLRP')
535+ if wiz_data['journal_sale']:
536+ self._create_journal(cr, uid, wiz_data['journal_sale'], 'islr_sale', 'ISLRS')
537+ if wiz_data['account_sale'] or wiz_data['account_purchase']:
538+ self._update_concepts(cr, uid, wiz_data['account_sale'], wiz_data['account_purchase'])
539+ if wiz_data['wh_agent']:
540+ self._set_wh_agent(cr, uid)
541+
542+ _columns = {
543+ 'journal_purchase': fields.char("Journal Wh Income Purchase", 64, help="Journal for purchase operations involving Withholding Income"),
544+ 'journal_sale': fields.char("Journal Wh Income Sale", 64, help="Journal for sale operations involving Withholding Income"),
545+ 'account_purchase': fields.many2one(
546+ "account.account",
547+ "Account Withholding Income Purchase",
548+ help="Account for purchase operations involving Withholding Income"
549+ ),
550+ 'account_sale': fields.many2one(
551+ "account.account",
552+ "Account Withholding Income Sale",
553+ help="Account for sale operations involving Withholding Income",
554+ ),
555+ 'wh_agent': fields.boolean("Withholding Income Agent", help="Check if this company is a withholding income agent"),
556+ }
557+
558+ _defaults = {
559+ 'journal_purchase': _("Journal Withholding Income Purchase"),
560+ 'journal_sale': _("Journal Withholding Income Sale"),
561+ }
562+
563+wh_islr_config()
564
565=== added file 'l10n_ve_withholding_islr/view/installer.xml'
566--- l10n_ve_withholding_islr/view/installer.xml 1970-01-01 00:00:00 +0000
567+++ l10n_ve_withholding_islr/view/installer.xml 2011-11-03 23:26:52 +0000
568@@ -0,0 +1,59 @@
569+<?xml version="1.0"?>
570+<openerp>
571+ <data>
572+ <record id="wh_islr_config_view" model="ir.ui.view">
573+ <field name="name">Configure your ISLR Withholdings</field>
574+ <field name="model">wh.islr.config</field>
575+ <field name="type">form</field>
576+ <field name="inherit_id" ref="base.res_config_view_base"/>
577+ <field name="arch" type="xml">
578+ <data>
579+ <form position="attributes">
580+ <attribute name="string">Withholding ISLR Configuration</attribute>
581+ </form>
582+ <separator string="title" position="attributes">
583+ <attribute name="string">Configure Venezuelan ISLR Withholding</attribute>
584+ </separator>
585+ <xpath expr="//label[@string='description']" position="attributes">
586+ <attribute name="string">
587+Configure your company's withholding ISLR
588+ </attribute>
589+ </xpath>
590+ <xpath expr='//separator[@string="vsep"]' position='attributes'>
591+ <attribute name='rowspan'>15</attribute>
592+ <attribute name='string'></attribute>
593+ </xpath>
594+ <group string="res_config_contents" position="replace">
595+ <field name="journal_purchase" groups="base.group_extended"/>
596+ <newline/>
597+ <field name="journal_sale" groups="base.group_extended"/>
598+ <newline/>
599+ <field name="account_purchase" groups="base.group_extended" />
600+ <newline/>
601+ <field name="account_sale" groups="base.group_extended" />
602+ <newline/>
603+ <field name="wh_agent" groups="base.group_extended" />
604+ </group>
605+ <xpath expr='//button[@name="action_skip"]' position='replace'/>
606+ </data>
607+ </field>
608+ </record>
609+ <record id="action_config_wh_islr" model="ir.actions.act_window">
610+ <field name="name">Configure ISLR Withholding</field>
611+ <field name="type">ir.actions.act_window</field>
612+ <field name="res_model">wh.islr.config</field>
613+ <field name="view_id" ref="wh_islr_config_view"/>
614+ <field name="view_type">form</field>
615+ <field name="view_mode">form</field>
616+ <field name="target">new</field>
617+ </record>
618+ <!-- register configuration wizard -->
619+ <record id="config_wizard_step_wh_islr" model="ir.actions.todo">
620+ <field name="action_id" ref="action_config_wh_islr"/>
621+ <field name="restart">always</field>
622+ <field name="sequence">45</field>
623+ <field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/>
624+ </record>
625+ </data>
626+</openerp>
627+