Merge lp:~vauxoo/openerp-venezuela-localization/miguel-retencion-iva into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- miguel-retencion-iva
- Merge into 6.0-trunk
Proposed by
Miguel Delgado (Vauxoo)
Status: | Merged |
---|---|
Merged at revision: | 396 |
Proposed branch: | lp:~vauxoo/openerp-venezuela-localization/miguel-retencion-iva |
Merge into: | lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk |
Diff against target: |
760 lines (+647/-8) (has conflicts) 9 files modified
l10n_ve_withholding_iva/__init__.py (+2/-0) l10n_ve_withholding_iva/__openerp__.py (+10/-2) l10n_ve_withholding_iva/generate_txt.py (+263/-0) l10n_ve_withholding_iva/generate_txt_view.xml (+108/-0) l10n_ve_withholding_iva/partner.py (+8/-6) l10n_ve_withholding_iva/report/__init__.py (+30/-0) l10n_ve_withholding_iva/report/list_wh_iva.py (+54/-0) l10n_ve_withholding_iva/report/list_wh_iva_report.rml (+157/-0) l10n_ve_withholding_iva/txt_wh_report.xml (+15/-0) Text conflict in l10n_ve_withholding_iva/__openerp__.py |
To merge this branch: | bzr merge lp:~vauxoo/openerp-venezuela-localization/miguel-retencion-iva |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nhomar - Vauxoo | Pending | ||
Review via email: mp+77951@code.launchpad.net |
Commit message
Description of the change
add to the l10n_ve_
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_iva/__init__.py' | |||
2 | --- l10n_ve_withholding_iva/__init__.py 2011-10-01 01:22:41 +0000 | |||
3 | +++ l10n_ve_withholding_iva/__init__.py 2011-10-03 14:54:19 +0000 | |||
4 | @@ -22,6 +22,8 @@ | |||
5 | 22 | import account | 22 | import account |
6 | 23 | import invoice | 23 | import invoice |
7 | 24 | import partner | 24 | import partner |
8 | 25 | import generate_txt | ||
9 | 26 | import report | ||
10 | 25 | import res_company | 27 | import res_company |
11 | 26 | import installer | 28 | import installer |
12 | 27 | 29 | ||
13 | 28 | 30 | ||
14 | === modified file 'l10n_ve_withholding_iva/__openerp__.py' | |||
15 | --- l10n_ve_withholding_iva/__openerp__.py 2011-10-02 05:41:11 +0000 | |||
16 | +++ l10n_ve_withholding_iva/__openerp__.py 2011-10-03 14:54:19 +0000 | |||
17 | @@ -32,17 +32,25 @@ | |||
18 | 32 | 'init_xml': [], | 32 | 'init_xml': [], |
19 | 33 | "depends" : ["l10n_ve_withholding"], | 33 | "depends" : ["l10n_ve_withholding"], |
20 | 34 | 'update_xml': [ | 34 | 'update_xml': [ |
21 | 35 | |||
22 | 35 | 'security/wh_iva_security.xml', | 36 | 'security/wh_iva_security.xml', |
23 | 36 | 'security/ir.model.access.csv', | 37 | 'security/ir.model.access.csv', |
25 | 37 | 'res_company_view.xml', | 38 | 'generate_txt_view.xml', |
26 | 39 | 'txt_wh_report.xml', | ||
27 | 40 | 'res_company_view.xml', | ||
28 | 38 | 'account_invoice_view.xml', | 41 | 'account_invoice_view.xml', |
29 | 39 | 'account_view.xml', | 42 | 'account_view.xml', |
31 | 40 | 'partner_view.xml', | 43 | 'partner_view.xml', |
32 | 41 | 'wh_iva_view.xml', | 44 | 'wh_iva_view.xml', |
33 | 42 | "data/l10n_ve_withholding_data.xml", | 45 | "data/l10n_ve_withholding_data.xml", |
34 | 43 | "wh_iva_workflow.xml", | 46 | "wh_iva_workflow.xml", |
35 | 47 | <<<<<<< TREE | ||
36 | 44 | "account_workflow.xml", | 48 | "account_workflow.xml", |
37 | 45 | "l10n_ve_withholding_iva_installer.xml", | 49 | "l10n_ve_withholding_iva_installer.xml", |
38 | 50 | ======= | ||
39 | 51 | "account_workflow.xml", | ||
40 | 52 | |||
41 | 53 | >>>>>>> MERGE-SOURCE | ||
42 | 46 | ], | 54 | ], |
43 | 47 | 'demo_xml': ["demo/l10n_ve_withholding_iva_demo.xml"], | 55 | 'demo_xml': ["demo/l10n_ve_withholding_iva_demo.xml"], |
44 | 48 | 'test': [], | 56 | 'test': [], |
45 | 49 | 57 | ||
46 | === added file 'l10n_ve_withholding_iva/generate_txt.py' | |||
47 | --- l10n_ve_withholding_iva/generate_txt.py 1970-01-01 00:00:00 +0000 | |||
48 | +++ l10n_ve_withholding_iva/generate_txt.py 2011-10-03 14:54:19 +0000 | |||
49 | @@ -0,0 +1,263 @@ | |||
50 | 1 | #!/usr/bin/python | ||
51 | 2 | # -*- encoding: utf-8 -*- | ||
52 | 3 | ########################################################################### | ||
53 | 4 | # Module Writen to OpenERP, Open Source Management Solution | ||
54 | 5 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
55 | 6 | # All Rights Reserved | ||
56 | 7 | ###############Credits###################################################### | ||
57 | 8 | # Coded by: Humberto Arocha <humberto@openerp.com.ve> | ||
58 | 9 | # Maria Gabriela Quilarque <gabriela@openerp.com.ve> | ||
59 | 10 | # Javier Duran <javier@nvauxoo.com> | ||
60 | 11 | # Planified by: Nhomar Hernandez | ||
61 | 12 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
62 | 13 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
63 | 14 | ############################################################################# | ||
64 | 15 | # This program is free software: you can redistribute it and/or modify | ||
65 | 16 | # it under the terms of the GNU General Public License as published by | ||
66 | 17 | # the Free Software Foundation, either version 3 of the License, or | ||
67 | 18 | # (at your option) any later version. | ||
68 | 19 | # | ||
69 | 20 | # This program is distributed in the hope that it will be useful, | ||
70 | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
71 | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
72 | 23 | # GNU General Public License for more details. | ||
73 | 24 | # | ||
74 | 25 | # You should have received a copy of the GNU General Public License | ||
75 | 26 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
76 | 27 | ############################################################################## | ||
77 | 28 | from osv import osv | ||
78 | 29 | from osv import fields | ||
79 | 30 | from tools.translate import _ | ||
80 | 31 | from tools import config | ||
81 | 32 | import time | ||
82 | 33 | import datetime | ||
83 | 34 | from xml.etree.ElementTree import Element, SubElement, ElementTree, tostring | ||
84 | 35 | import sys | ||
85 | 36 | import base64 | ||
86 | 37 | |||
87 | 38 | class txt_iva(osv.osv): | ||
88 | 39 | _name = "txt.iva" | ||
89 | 40 | |||
90 | 41 | #~ def _get_amount_total(self,cr,uid,ids,name,args,context=None): | ||
91 | 42 | #~ res = {} | ||
92 | 43 | #~ for txt in self.browse(cr,uid,ids,context): | ||
93 | 44 | #~ res[txt.id]=0.0 | ||
94 | 45 | #~ for txt_line in txt.txt_ids: | ||
95 | 46 | #~ res[txt.id] += txt_line.amount_withheld | ||
96 | 47 | #~ | ||
97 | 48 | #~ return res | ||
98 | 49 | |||
99 | 50 | #~ def _get_amount_total_base(self,cr,uid,ids,name,args,context=None): | ||
100 | 51 | #~ res = {} | ||
101 | 52 | #~ for txt in self.browse(cr,uid,ids,context): | ||
102 | 53 | #~ res[txt.id]= 0.0 | ||
103 | 54 | #~ for txt_line in txt.txt_ids: | ||
104 | 55 | #~ print 'result: ',res[txt.id] | ||
105 | 56 | #~ print 'monto: ', txt_line.untaxed | ||
106 | 57 | #~ res[txt.id] += txt_line.untaxed | ||
107 | 58 | #~ | ||
108 | 59 | #~ return res | ||
109 | 60 | |||
110 | 61 | _columns = { | ||
111 | 62 | 'company_id': fields.many2one('res.company', 'Compañía', required=True, readonly=True,states={'draft':[('readonly',False)]}), | ||
112 | 63 | 'state': fields.selection([ | ||
113 | 64 | ('draft','Draft'), | ||
114 | 65 | ('confirmed', 'Confirmed'), | ||
115 | 66 | ('done','Done'), | ||
116 | 67 | ('cancel','Cancelled') | ||
117 | 68 | ],'Estado', select=True, readonly=True, help="Estado del Comprobante"), | ||
118 | 69 | 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Año Fiscal', required=True,readonly=True,states={'draft':[('readonly',False)]}), | ||
119 | 70 | 'period_id':fields.many2one('account.period','Periodo',required=True,readonly=True,states={'draft':[('readonly',False)]}, domain="[('fiscalyear_id','=',fiscalyear_id)]"), | ||
120 | 71 | 'type':fields.boolean('Retención Proveedores?',required=True,states={'draft':[('readonly',False)]}, help="Seleccione el tipo de retencion a realizar"), | ||
121 | 72 | 'date_start': fields.date('Fecha Inicio',required=True,states={'draft':[('readonly',False)]}, help="Fecha de Inicio del periodo"), | ||
122 | 73 | 'date_end': fields.date('Fecha Fin', required=True,states={'draft':[('readonly',False)]}, help="Fecha de Fin del periodo"), | ||
123 | 74 | 'type':fields.boolean('Retención Proveedores?',required=True,states={'draft':[('readonly',False)]}, help="Seleccione el tipo de retencion a realizar"), | ||
124 | 75 | 'txt_ids':fields.one2many('txt.iva.line','txt_id',domain="[('txt_id','=',False)]", readonly=True,states={'draft':[('readonly',False)]}, help='Lineas del archivo txt exigido por el SENIAT, para retención del IVA'), | ||
125 | 76 | #~ 'amount_total_ret':fields.function(_get_amount_total,method=True, digits=(16, 2), readonly=True, string=' Total Monto de Retencion', help="Monto Total Retenido"), | ||
126 | 77 | #~ 'amount_total_base':fields.function(_get_amount_total_base,method=True, digits=(16, 2), readonly=True, string='Total Base Imponible', help="Total de la Base Imponible"), | ||
127 | 78 | } | ||
128 | 79 | _rec_rame = 'company_id' | ||
129 | 80 | _defaults = { | ||
130 | 81 | 'state': lambda *a: 'draft', | ||
131 | 82 | 'company_id': lambda self, cr, uid, context: \ | ||
132 | 83 | self.pool.get('res.users').browse(cr, uid, uid, | ||
133 | 84 | context=context).company_id.id, | ||
134 | 85 | 'type': lambda *a:'True', | ||
135 | 86 | } | ||
136 | 87 | |||
137 | 88 | def action_anular(self, cr, uid, ids, context={}): | ||
138 | 89 | return self.write(cr, uid, ids, {'state':'draft'}) | ||
139 | 90 | |||
140 | 91 | def action_confirm(self, cr, uid, ids, context={}): | ||
141 | 92 | return self.write(cr, uid, ids, {'state':'confirmed'}) | ||
142 | 93 | |||
143 | 94 | def action_generate_lines_txt(self,cr,uid,ids,context={}): | ||
144 | 95 | voucher_obj = self.pool.get('account.wh.iva') | ||
145 | 96 | txt_iva_obj = self.pool.get('txt.iva.line') | ||
146 | 97 | |||
147 | 98 | voucher_ids='' | ||
148 | 99 | txt_brw= self.browse(cr,uid,ids[0]) | ||
149 | 100 | txt_ids = txt_iva_obj.search(cr,uid,[('txt_id','=',txt_brw.id)]) | ||
150 | 101 | if txt_ids: | ||
151 | 102 | txt_iva_obj.unlink(cr,uid,txt_ids) | ||
152 | 103 | |||
153 | 104 | if txt_brw.type: | ||
154 | 105 | voucher_ids = voucher_obj.search(cr,uid,[('date_ret','>=',txt_brw.date_start),('date_ret','<=',txt_brw.date_end),('period_id','=',txt_brw.period_id.id),('state','=','done'),('type','in',['in_invoice','in_refund'])]) | ||
155 | 106 | else: | ||
156 | 107 | voucher_ids = voucher_obj.search(cr,uid,[('date_ret','>=',txt_brw.date_start),('date_ret','<=',txt_brw.date_end),('period_id','=',txt_brw.period_id.id),('state','=','done'),('type','in',['out_invoice','out_refund'])]) | ||
157 | 108 | |||
158 | 109 | for voucher in voucher_obj.browse(cr,uid,voucher_ids): | ||
159 | 110 | |||
160 | 111 | for voucher_lines in voucher.retention_line: | ||
161 | 112 | |||
162 | 113 | if voucher_lines.invoice_id.state in ['open','paid']: | ||
163 | 114 | txt_iva_obj.create(cr,uid, | ||
164 | 115 | {'partner_id':voucher.partner_id.id, | ||
165 | 116 | 'voucher_id':voucher.id, | ||
166 | 117 | 'invoice_id':voucher_lines.invoice_id.id, | ||
167 | 118 | 'txt_id': txt_brw.id, | ||
168 | 119 | 'untaxed': voucher_lines.base_ret, | ||
169 | 120 | 'amount_withheld': voucher_lines.amount_tax_ret, | ||
170 | 121 | }) | ||
171 | 122 | return True | ||
172 | 123 | |||
173 | 124 | def action_done(self, cr, uid, ids, context={}): | ||
174 | 125 | root = self.generate_txt(cr,uid,ids) | ||
175 | 126 | self._write_attachment(cr,uid,ids,root,context) | ||
176 | 127 | self.write(cr, uid, ids, {'state':'done'}) | ||
177 | 128 | return True | ||
178 | 129 | |||
179 | 130 | def get_type_document(self,cr,uid,txt_line): | ||
180 | 131 | type= '03' | ||
181 | 132 | if txt_line.invoice_id.type in ['out_invoice','in_invoice']: | ||
182 | 133 | type= '01' | ||
183 | 134 | elif txt_line.invoice_id.type in ['out_invoice','in_invoice'] and txt_line.invoice_id.parent_id: | ||
184 | 135 | type= '02' | ||
185 | 136 | return type | ||
186 | 137 | |||
187 | 138 | def get_document_affected(self,cr,uid,txt_line,context): | ||
188 | 139 | number='0' | ||
189 | 140 | if txt_line.invoice_id.type in ['in_invoice','in_refund'] and txt_line.invoice_id.parent_id: | ||
190 | 141 | number = txt_line.invoice_id.parent_id.reference | ||
191 | 142 | elif txt_line.invoice_id.parent_id: | ||
192 | 143 | number = txt_line.invoice_id.parent_id.number | ||
193 | 144 | return number | ||
194 | 145 | |||
195 | 146 | def get_number(self,cr,uid,number,inv_type,long): | ||
196 | 147 | if not number: | ||
197 | 148 | return '0' | ||
198 | 149 | result= '' | ||
199 | 150 | for i in number: | ||
200 | 151 | if inv_type=='vou_number' and i.isdigit(): | ||
201 | 152 | if len(result)<long: | ||
202 | 153 | result = i + result | ||
203 | 154 | elif i.isalnum(): | ||
204 | 155 | if len(result)<long: | ||
205 | 156 | result = i + result | ||
206 | 157 | return result[::-1].strip() | ||
207 | 158 | |||
208 | 159 | def get_document_number(self,cr,uid,ids,txt_line,inv_type,context): | ||
209 | 160 | number=0 | ||
210 | 161 | if txt_line.invoice_id.type in ['in_invoice','in_refund']: | ||
211 | 162 | if not txt_line.invoice_id.reference: | ||
212 | 163 | raise osv.except_osv(_('Invalid action !'),_("Imposible realizar archivo txt, debido a que la factura no tiene numero de referencia libre!")) | ||
213 | 164 | else: | ||
214 | 165 | number = self.get_number(cr,uid,txt_line.invoice_id.reference.strip(),inv_type,20) | ||
215 | 166 | elif txt_line.invoice_id.number: | ||
216 | 167 | number = self.get_number(cr,uid,txt_line.invoice_id.number.strip(),inv_type,20) | ||
217 | 168 | return number | ||
218 | 169 | |||
219 | 170 | def get_amount_exempt_document(self,cr,uid,txt_line): | ||
220 | 171 | tax = 0 | ||
221 | 172 | amount_doc = 0 | ||
222 | 173 | for tax_line in txt_line.invoice_id.tax_line: | ||
223 | 174 | if 'SDCF' in tax_line.name: | ||
224 | 175 | tax = tax_line.base + tax | ||
225 | 176 | else: | ||
226 | 177 | amount_doc = tax_line.base + amount_doc | ||
227 | 178 | return (tax,amount_doc) | ||
228 | 179 | |||
229 | 180 | def get_buyer_vendor(self,cr,uid,txt,txt_line): | ||
230 | 181 | if txt_line.invoice_id.type in ['out_invoice','out_refund']: | ||
231 | 182 | vendor = txt.company_id.partner_id.vat[2:] | ||
232 | 183 | buyer = txt_line.partner_id.vat[2:] | ||
233 | 184 | else: | ||
234 | 185 | buyer = txt.company_id.partner_id.vat[2:] | ||
235 | 186 | vendor = txt_line.partner_id.vat[2:] | ||
236 | 187 | return (vendor,buyer) | ||
237 | 188 | |||
238 | 189 | def get_alicuota(self,cr,uid,txt_line): | ||
239 | 190 | list = [] | ||
240 | 191 | for tax_line in txt_line.invoice_id.tax_line: | ||
241 | 192 | if '12' in tax_line.name: | ||
242 | 193 | list.append(12) | ||
243 | 194 | if '8' in tax_line.name: | ||
244 | 195 | list.append(8) | ||
245 | 196 | if '22' in tax_line.name: | ||
246 | 197 | list.append(22) | ||
247 | 198 | if '0' in tax_line.name: | ||
248 | 199 | list.append(0) | ||
249 | 200 | return max(list) | ||
250 | 201 | |||
251 | 202 | def generate_txt(self,cr,uid,ids,context=None): | ||
252 | 203 | txt_string = '' | ||
253 | 204 | for txt in self.browse(cr,uid,ids,context): | ||
254 | 205 | vat = txt.company_id.partner_id.vat[2:] | ||
255 | 206 | for txt_line in txt.txt_ids: | ||
256 | 207 | |||
257 | 208 | vendor,buyer=self.get_buyer_vendor(cr,uid,txt,txt_line) | ||
258 | 209 | period = txt.period_id.name.split('/') | ||
259 | 210 | period2 = period[1]+period[0] | ||
260 | 211 | |||
261 | 212 | operation_type = 'V' if txt_line.invoice_id.type in ['out_invoice','out_refund'] else 'C' | ||
262 | 213 | document_type = self.get_type_document(cr,uid,txt_line) | ||
263 | 214 | document_number=self.get_document_number(cr,uid,ids,txt_line,'inv_number',context) | ||
264 | 215 | control_number = self.get_number(cr,uid,txt_line.invoice_id.nro_ctrl,'inv_ctrl',20) | ||
265 | 216 | document_affected= self.get_document_affected(cr,uid,txt_line,context) | ||
266 | 217 | voucher_number = self.get_number(cr,uid,txt_line.voucher_id.number,'vou_number',14) | ||
267 | 218 | amount_exempt,amount_untaxed = self.get_amount_exempt_document(cr,uid,txt_line) | ||
268 | 219 | alicuota = self.get_alicuota(cr,uid,txt_line) | ||
269 | 220 | |||
270 | 221 | txt_string= txt_string + buyer +'\t'+period2.strip()+'\n' | ||
271 | 222 | #~ +'\t'\ | ||
272 | 223 | #~ +txt_line.invoice_id.date_invoice+'\t'+operation_type+'\t'+document_type+'\t'+vendor+'\t'\ | ||
273 | 224 | #~ +document_number+'\t'+control_number+'\t'+str(round(txt_line.invoice_id.amount_total,2))+'\t'\ | ||
274 | 225 | #~ +str(round(amount_untaxed,2))+'\t'\ | ||
275 | 226 | #~ +str(round(txt_line.amount_withheld,2))+'\t'+document_affected+'\t'+voucher_number+'\t'\ | ||
276 | 227 | #~ +str(round(amount_exempt,2))+'\t'+str(alicuota)+'\t'+'0'\ | ||
277 | 228 | |||
278 | 229 | return txt_string | ||
279 | 230 | |||
280 | 231 | def _write_attachment(self, cr,uid,ids,root,context): | ||
281 | 232 | ''' | ||
282 | 233 | Codificar el txt, para guardarlo en la bd y poder verlo en el cliente como attachment | ||
283 | 234 | ''' | ||
284 | 235 | fecha = time.strftime('%Y_%m_%d') | ||
285 | 236 | name = 'IVA_' + fecha +'.'+ 'txt' | ||
286 | 237 | self.pool.get('ir.attachment').create(cr, uid, { | ||
287 | 238 | 'name': name, | ||
288 | 239 | 'datas': base64.encodestring(root), | ||
289 | 240 | 'datas_fname': name, | ||
290 | 241 | 'res_model': 'txt.iva', | ||
291 | 242 | 'res_id': ids[0], | ||
292 | 243 | }, context=context | ||
293 | 244 | ) | ||
294 | 245 | cr.commit() | ||
295 | 246 | |||
296 | 247 | txt_iva() | ||
297 | 248 | |||
298 | 249 | |||
299 | 250 | class txt_iva_line(osv.osv): | ||
300 | 251 | _name = "txt.iva.line" | ||
301 | 252 | |||
302 | 253 | _columns = { | ||
303 | 254 | 'partner_id':fields.many2one('res.partner','Comprador/Vendedor',help="Persona jurídica ó natural que genera la Factura, Nota de Crédito, Nota de Débito o Certificación (vendedor)"), | ||
304 | 255 | 'invoice_id':fields.many2one('account.invoice','Factura/ND/NC',help="Fecha de la factura, Nota de Crédito, Nota de Débito o Certificación, Declaración de Importación"), | ||
305 | 256 | 'voucher_id':fields.many2one('account.wh.iva','Comprobante de Retencion IVA',help="Comprobante de Retencion de Impuesto al Valor Agregado (IVA)"), | ||
306 | 257 | 'amount_withheld':fields.float('Amount Withheld'), | ||
307 | 258 | 'untaxed':fields.float('Untaxed'), | ||
308 | 259 | 'txt_id':fields.many2one('txt.iva','Documento-Generar txt IVA'), | ||
309 | 260 | } | ||
310 | 261 | _rec_name = 'partner_id' | ||
311 | 262 | |||
312 | 263 | txt_iva_line() | ||
313 | 0 | 264 | ||
314 | === added file 'l10n_ve_withholding_iva/generate_txt_view.xml' | |||
315 | --- l10n_ve_withholding_iva/generate_txt_view.xml 1970-01-01 00:00:00 +0000 | |||
316 | +++ l10n_ve_withholding_iva/generate_txt_view.xml 2011-10-03 14:54:19 +0000 | |||
317 | @@ -0,0 +1,108 @@ | |||
318 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
319 | 2 | <openerp> | ||
320 | 3 | <data> | ||
321 | 4 | |||
322 | 5 | <!-- | ||
323 | 6 | ===================================================== | ||
324 | 7 | XML GENERATE | ||
325 | 8 | ===================================================== | ||
326 | 9 | --> | ||
327 | 10 | |||
328 | 11 | <record id="view_generate_txt_iva_tree" model="ir.ui.view"> | ||
329 | 12 | <field name="name">generate.txt.iva.tree</field> | ||
330 | 13 | <field name="model">txt.iva</field> | ||
331 | 14 | <field name="type">tree</field> | ||
332 | 15 | <field name="arch" type="xml"> | ||
333 | 16 | <tree string="Archivo TXT"> | ||
334 | 17 | <field name="company_id"/> | ||
335 | 18 | <field name="fiscalyear_id"/> | ||
336 | 19 | <field name="period_id"/> | ||
337 | 20 | <field name="type"/> | ||
338 | 21 | </tree> | ||
339 | 22 | </field> | ||
340 | 23 | </record> | ||
341 | 24 | |||
342 | 25 | <record id="view_generate_txt_iva_form" model="ir.ui.view"> | ||
343 | 26 | <field name="name">generate.txt.iva.form</field> | ||
344 | 27 | <field name="model">txt.iva</field> | ||
345 | 28 | <field name="type">form</field> | ||
346 | 29 | <field name="arch" type="xml"> | ||
347 | 30 | <form string="Lineas de Retencion para TXT"> | ||
348 | 31 | <group col="4" colspan="4"> | ||
349 | 32 | <field name="company_id"/> | ||
350 | 33 | <field name="type"/> | ||
351 | 34 | </group> | ||
352 | 35 | <newline/> | ||
353 | 36 | <group col="4" colspan="4"> | ||
354 | 37 | <field name="fiscalyear_id" /> | ||
355 | 38 | <field name="period_id" /> | ||
356 | 39 | </group> | ||
357 | 40 | <newline/> | ||
358 | 41 | <group col="4" colspan="4"> | ||
359 | 42 | <field name="date_start"/> | ||
360 | 43 | <field name="date_end"/> | ||
361 | 44 | </group> | ||
362 | 45 | <notebook colspan="4"> | ||
363 | 46 | <page string="Lineas de Retencion"> | ||
364 | 47 | <field name="txt_ids" nolabel="1" colspan='4' widget="one2many_list"> | ||
365 | 48 | <tree string="Lineas del archivo TXT"> | ||
366 | 49 | <field name="partner_id"/> | ||
367 | 50 | <field name="invoice_id"/> | ||
368 | 51 | <field name="voucher_id"/> | ||
369 | 52 | <field name="untaxed"/> | ||
370 | 53 | <field name="amount_withheld"/> | ||
371 | 54 | </tree> | ||
372 | 55 | </field> | ||
373 | 56 | <group col="4" colspan="2"> | ||
374 | 57 | <field name="state" select="2" colspan="4"/> | ||
375 | 58 | <button name="action_generate_lines_txt" string="Generar Lineas TXT" states="draft" type="object" icon="gtk-go-forward" colspan="4"/> | ||
376 | 59 | <button name="action_confirm" string="Confirmar" states="draft" type="object" icon="gtk-go-forward" colspan="4"/> | ||
377 | 60 | <button name="action_done" string="Realizar TXT" states="confirmed" type="object" icon="gtk-ok"/> | ||
378 | 61 | <button name="action_anular" string="Anular" states="confirmed,done" type="object" icon="gtk-cancel"/> | ||
379 | 62 | </group> | ||
380 | 63 | <!-- | ||
381 | 64 | <group col="2" colspan="2"> | ||
382 | 65 | <field name="amount_total_ret"/> | ||
383 | 66 | <field name="amount_total_base"/> | ||
384 | 67 | </group> | ||
385 | 68 | --> | ||
386 | 69 | </page> | ||
387 | 70 | </notebook> | ||
388 | 71 | </form> | ||
389 | 72 | </field> | ||
390 | 73 | </record> | ||
391 | 74 | |||
392 | 75 | <record model="ir.actions.act_window" id="action_generate_text_iva"> | ||
393 | 76 | <field name="name">Generate TXT</field> | ||
394 | 77 | <field name="res_model">txt.iva</field> | ||
395 | 78 | <field name="type">ir.actions.act_window</field> | ||
396 | 79 | <field name="view_type">form</field> | ||
397 | 80 | <field name="view_mode">tree,form</field> | ||
398 | 81 | </record> | ||
399 | 82 | |||
400 | 83 | <record model="ir.actions.act_window.view" id="action_generate_txt_iva_tree"> | ||
401 | 84 | <field name="sequence" eval="10"/> | ||
402 | 85 | <field name="view_mode">tree</field> | ||
403 | 86 | <field name="view_id" ref="view_generate_txt_iva_tree"/> | ||
404 | 87 | <field name="act_window_id" ref="action_generate_text_iva"/> | ||
405 | 88 | </record> | ||
406 | 89 | |||
407 | 90 | <record model="ir.actions.act_window.view" id="action_generate_txt_iva_form"> | ||
408 | 91 | <field name="sequence" eval="20"/> | ||
409 | 92 | <field name="view_mode">form</field> | ||
410 | 93 | <field name="view_id" ref="view_generate_txt_iva_form"/> | ||
411 | 94 | <field name="act_window_id" ref="action_generate_text_iva"/> | ||
412 | 95 | </record> | ||
413 | 96 | |||
414 | 97 | <menuitem name="Generar TXT" | ||
415 | 98 | id="menu_action_generate_txt_iva" | ||
416 | 99 | parent="l10n_ve_withholding.menu_wh_suppiler" | ||
417 | 100 | action="action_generate_text_iva"/> | ||
418 | 101 | |||
419 | 102 | </data> | ||
420 | 103 | </openerp> | ||
421 | 104 | |||
422 | 105 | |||
423 | 106 | |||
424 | 107 | |||
425 | 108 | |||
426 | 0 | 109 | ||
427 | === modified file 'l10n_ve_withholding_iva/partner.py' | |||
428 | --- l10n_ve_withholding_iva/partner.py 2011-09-28 03:57:04 +0000 | |||
429 | +++ l10n_ve_withholding_iva/partner.py 2011-10-03 14:54:19 +0000 | |||
430 | @@ -55,6 +55,7 @@ | |||
431 | 55 | } | 55 | } |
432 | 56 | 56 | ||
433 | 57 | def _load_url(self,retries,url): | 57 | def _load_url(self,retries,url): |
434 | 58 | print 'load' | ||
435 | 58 | str_error= '404 Not Found' | 59 | str_error= '404 Not Found' |
436 | 59 | while retries > 0: | 60 | while retries > 0: |
437 | 60 | try: | 61 | try: |
438 | @@ -69,12 +70,11 @@ | |||
439 | 69 | return str_error | 70 | return str_error |
440 | 70 | 71 | ||
441 | 71 | def _buscar_porcentaje(self,rif,url): | 72 | def _buscar_porcentaje(self,rif,url): |
442 | 72 | ''' | ||
443 | 73 | Search percent of withholding connecting to SENIAT | ||
444 | 74 | ''' | ||
445 | 75 | context={} | 73 | context={} |
446 | 74 | print"esta pasando por aqui" | ||
447 | 76 | html_data = self._load_url(3,url %rif) | 75 | html_data = self._load_url(3,url %rif) |
448 | 77 | html_data = unicode(html_data, 'ISO-8859-1').encode('utf-8') | 76 | html_data = unicode(html_data, 'ISO-8859-1').encode('utf-8') |
449 | 77 | print "html_data",html_data | ||
450 | 78 | self._eval_seniat_data(html_data,context) | 78 | self._eval_seniat_data(html_data,context) |
451 | 79 | search_str='La condición de este contribuyente requiere la retención del ' | 79 | search_str='La condición de este contribuyente requiere la retención del ' |
452 | 80 | pos = html_data.find(search_str) | 80 | pos = html_data.find(search_str) |
453 | @@ -86,13 +86,13 @@ | |||
454 | 86 | return 0.0 | 86 | return 0.0 |
455 | 87 | 87 | ||
456 | 88 | def _parse_dom(self,dom,rif,url_seniat): | 88 | def _parse_dom(self,dom,rif,url_seniat): |
460 | 89 | ''' | 89 | print 'entrando dom' |
458 | 90 | Parsing data from SENIAT | ||
459 | 91 | ''' | ||
461 | 92 | name = dom.childNodes[0].childNodes[0].firstChild.data | 90 | name = dom.childNodes[0].childNodes[0].firstChild.data |
462 | 93 | wh_agent = dom.childNodes[0].childNodes[1].firstChild.data.upper()=='SI' and True or False | 91 | wh_agent = dom.childNodes[0].childNodes[1].firstChild.data.upper()=='SI' and True or False |
463 | 94 | vat_apply = dom.childNodes[0].childNodes[2].firstChild.data.upper()=='SI' and True or False | 92 | vat_apply = dom.childNodes[0].childNodes[2].firstChild.data.upper()=='SI' and True or False |
464 | 95 | wh_rate = self._buscar_porcentaje(rif,url_seniat) | 93 | wh_rate = self._buscar_porcentaje(rif,url_seniat) |
465 | 94 | print "wh_rate",wh_rate | ||
466 | 95 | print 'nombre: ',name | ||
467 | 96 | return {'name':name, 'wh_iva_agent':wh_agent,'vat_subjected':vat_apply,'wh_iva_rate':wh_rate} | 96 | return {'name':name, 'wh_iva_agent':wh_agent,'vat_subjected':vat_apply,'wh_iva_rate':wh_rate} |
468 | 97 | 97 | ||
469 | 98 | def _print_error(self, error, msg): | 98 | def _print_error(self, error, msg): |
470 | @@ -113,11 +113,13 @@ | |||
471 | 113 | self._print_error(_('No Connection !'),_("Could not connect! Check the URL ")) | 113 | self._print_error(_('No Connection !'),_("Could not connect! Check the URL ")) |
472 | 114 | 114 | ||
473 | 115 | def update_rif(self, cr, uid, ids, context={}): | 115 | def update_rif(self, cr, uid, ids, context={}): |
474 | 116 | print 'entando update' | ||
475 | 116 | for partner in self.browse(cr,uid,ids): | 117 | for partner in self.browse(cr,uid,ids): |
476 | 117 | url1=partner.company_id.url_seniat1_company+'%s' | 118 | url1=partner.company_id.url_seniat1_company+'%s' |
477 | 118 | url2=partner.company_id.url_seniat2_company+'%s' | 119 | url2=partner.company_id.url_seniat2_company+'%s' |
478 | 119 | xml_data = self._load_url(3,url1 %partner.vat[2:]) | 120 | xml_data = self._load_url(3,url1 %partner.vat[2:]) |
479 | 120 | self._eval_seniat_data(xml_data,context) | 121 | self._eval_seniat_data(xml_data,context) |
480 | 122 | print 'xml_data',xml_data | ||
481 | 121 | dom = parseString(xml_data) | 123 | dom = parseString(xml_data) |
482 | 122 | self.write(cr,uid,partner.id,self._parse_dom(dom,partner.vat[2:],url2)) | 124 | self.write(cr,uid,partner.id,self._parse_dom(dom,partner.vat[2:],url2)) |
483 | 123 | return True | 125 | return True |
484 | 124 | 126 | ||
485 | === added directory 'l10n_ve_withholding_iva/report' | |||
486 | === added file 'l10n_ve_withholding_iva/report/__init__.py' | |||
487 | --- l10n_ve_withholding_iva/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
488 | +++ l10n_ve_withholding_iva/report/__init__.py 2011-10-03 14:54:19 +0000 | |||
489 | @@ -0,0 +1,30 @@ | |||
490 | 1 | #!/usr/bin/python | ||
491 | 2 | # -*- encoding: utf-8 -*- | ||
492 | 3 | ########################################################################### | ||
493 | 4 | # Module Writen to OpenERP, Open Source Management Solution | ||
494 | 5 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
495 | 6 | # All Rights Reserved | ||
496 | 7 | ###############Credits###################################################### | ||
497 | 8 | # Coded by: Humberto Arocha <humberto@openerp.com.ve> | ||
498 | 9 | # Maria Gabriela Quilarque <gabriela@openerp.com.ve> | ||
499 | 10 | # Javier Duran <javier@nvauxoo.com> | ||
500 | 11 | # Planified by: Nhomar Hernandez | ||
501 | 12 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
502 | 13 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
503 | 14 | ############################################################################# | ||
504 | 15 | # This program is free software: you can redistribute it and/or modify | ||
505 | 16 | # it under the terms of the GNU General Public License as published by | ||
506 | 17 | # the Free Software Foundation, either version 3 of the License, or | ||
507 | 18 | # (at your option) any later version. | ||
508 | 19 | # | ||
509 | 20 | # This program is distributed in the hope that it will be useful, | ||
510 | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
511 | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
512 | 23 | # GNU General Public License for more details. | ||
513 | 24 | # | ||
514 | 25 | # You should have received a copy of the GNU General Public License | ||
515 | 26 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
516 | 27 | ############################################################################## | ||
517 | 28 | |||
518 | 29 | import list_wh_iva | ||
519 | 30 | |||
520 | 0 | 31 | ||
521 | === added file 'l10n_ve_withholding_iva/report/list_wh_iva.py' | |||
522 | --- l10n_ve_withholding_iva/report/list_wh_iva.py 1970-01-01 00:00:00 +0000 | |||
523 | +++ l10n_ve_withholding_iva/report/list_wh_iva.py 2011-10-03 14:54:19 +0000 | |||
524 | @@ -0,0 +1,54 @@ | |||
525 | 1 | #!/usr/bin/python | ||
526 | 2 | # -*- encoding: utf-8 -*- | ||
527 | 3 | ########################################################################### | ||
528 | 4 | # Module Writen to OpenERP, Open Source Management Solution | ||
529 | 5 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
530 | 6 | # All Rights Reserved | ||
531 | 7 | ###############Credits###################################################### | ||
532 | 8 | # Coded by: Humberto Arocha <humberto@openerp.com.ve> | ||
533 | 9 | # Maria Gabriela Quilarque <gabriela@openerp.com.ve> | ||
534 | 10 | # Javier Duran <javier@nvauxoo.com> | ||
535 | 11 | # Planified by: Nhomar Hernandez | ||
536 | 12 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
537 | 13 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
538 | 14 | ############################################################################# | ||
539 | 15 | # This program is free software: you can redistribute it and/or modify | ||
540 | 16 | # it under the terms of the GNU General Public License as published by | ||
541 | 17 | # the Free Software Foundation, either version 3 of the License, or | ||
542 | 18 | # (at your option) any later version. | ||
543 | 19 | # | ||
544 | 20 | # This program is distributed in the hope that it will be useful, | ||
545 | 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
546 | 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
547 | 23 | # GNU General Public License for more details. | ||
548 | 24 | # | ||
549 | 25 | # You should have received a copy of the GNU General Public License | ||
550 | 26 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
551 | 27 | ############################################################################## | ||
552 | 28 | |||
553 | 29 | import time | ||
554 | 30 | import pooler | ||
555 | 31 | from report import report_sxw | ||
556 | 32 | from tools.translate import _ | ||
557 | 33 | |||
558 | 34 | class list_wh_iva(report_sxw.rml_parse): | ||
559 | 35 | def __init__(self, cr, uid, name, context): | ||
560 | 36 | super(list_wh_iva, self).__init__(cr, uid, name, context=context) | ||
561 | 37 | self.localcontext.update({ | ||
562 | 38 | 'get_type_doc': self._get_type_document, | ||
563 | 39 | }) | ||
564 | 40 | |||
565 | 41 | def _get_type_document(self,line): | ||
566 | 42 | return self.pool.get('txt.iva').get_type_document(self.cr,self.uid,line) | ||
567 | 43 | |||
568 | 44 | #~ def get_type_document(self,cr,uid,txt_line): | ||
569 | 45 | |||
570 | 46 | |||
571 | 47 | |||
572 | 48 | report_sxw.report_sxw( | ||
573 | 49 | 'report.list_report_wh_vat2', | ||
574 | 50 | 'txt.iva', | ||
575 | 51 | 'addons/l10n_ve_withholding_iva/report/list_wh_iva_report.rml', | ||
576 | 52 | parser=list_wh_iva, | ||
577 | 53 | header=False | ||
578 | 54 | ) | ||
579 | 0 | 55 | ||
580 | === added file 'l10n_ve_withholding_iva/report/list_wh_iva_report.rml' | |||
581 | --- l10n_ve_withholding_iva/report/list_wh_iva_report.rml 1970-01-01 00:00:00 +0000 | |||
582 | +++ l10n_ve_withholding_iva/report/list_wh_iva_report.rml 2011-10-03 14:54:19 +0000 | |||
583 | @@ -0,0 +1,157 @@ | |||
584 | 1 | <?xml version="1.0"?> | ||
585 | 2 | <document filename="test.pdf"> | ||
586 | 3 | <template pageSize="(280.0mm,210.0mm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0"> | ||
587 | 4 | <pageTemplate id="first"> | ||
588 | 5 | <pageGraphics> | ||
589 | 6 | <image x="7.0mm" y="175.0mm" height="25mm" width="96mm">[[company.logo and company.logo or removeParentNode('image')]]</image> | ||
590 | 7 | <drawString x="7.0mm" y="175.0mm">[[company.logo and removeParentNode('para') or company.name]]</drawString> | ||
591 | 8 | <place x="7.0mm" y="100.0mm" width="280.0mm" height="100.0mm"> | ||
592 | 9 | <!--TABLA DE TITULOS--> | ||
593 | 10 | <blockTable colWidths="96mm,170mm" style="TITLE"> | ||
594 | 11 | <tr> | ||
595 | 12 | <td><para style="TITLE"></para> | ||
596 | 13 | </td> | ||
597 | 14 | <td> | ||
598 | 15 | <para style="TITLE"><b>DECLARACION INFORMATIVA DE RETENCIONES IVA</b></para> | ||
599 | 16 | </td> | ||
600 | 17 | </tr> | ||
601 | 18 | </blockTable> | ||
602 | 19 | <blockTable colWidths="96mm,170.0mm" style="TITLEGRISCLAROARRIBA"> | ||
603 | 20 | <tr> | ||
604 | 21 | <td><para style="ITEMSCENTER"> </para> | ||
605 | 22 | </td> | ||
606 | 23 | <td> | ||
607 | 24 | <para style="ITEMSCENTER"><b>PERIODO FISCAL</b></para> | ||
608 | 25 | </td> | ||
609 | 26 | </tr> | ||
610 | 27 | </blockTable> | ||
611 | 28 | <blockTable colWidths="96mm,170.0mm" style="TITLEGRISWHITE"> | ||
612 | 29 | <tr> | ||
613 | 30 | <td><para style="ITEMSCENTER"> </para> | ||
614 | 31 | </td> | ||
615 | 32 | <td> | ||
616 | 33 | <para style="ITEMSCENTER"><b>[[ o.period_id.name]]</b></para> | ||
617 | 34 | </td> | ||
618 | 35 | </tr> | ||
619 | 36 | </blockTable> | ||
620 | 37 | </place> | ||
621 | 38 | <setFont name="Helvetica-BoldOblique" size="8.0"/> | ||
622 | 39 | <drawRightString x="270mm" y="5mm">RETENCIONES DE IVA / PAGINA: <pageNumber/> DE <pageCount/> </drawRightString> | ||
623 | 40 | |||
624 | 41 | </pageGraphics> | ||
625 | 42 | <frame id="first" x1="20.0" y1="20.0" width="753" height="480"/> | ||
626 | 43 | </pageTemplate> | ||
627 | 44 | </template> | ||
628 | 45 | |||
629 | 46 | <stylesheet> | ||
630 | 47 | <blockTableStyle id="TITLE"> | ||
631 | 48 | <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> | ||
632 | 49 | <blockValign value="TOP"/> | ||
633 | 50 | </blockTableStyle> | ||
634 | 51 | <blockTableStyle id="TOTAL"> | ||
635 | 52 | <blockValign value="TOP"/> | ||
636 | 53 | <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5" /> | ||
637 | 54 | </blockTableStyle> | ||
638 | 55 | <blockTableStyle id="TITLEGRISCLAROARRIBA"> | ||
639 | 56 | <blockBackground colorName="#e5e2e5" start="1,0" stop="-1,-1"/> | ||
640 | 57 | <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> | ||
641 | 58 | <blockValign value="MIDDLE"/> | ||
642 | 59 | </blockTableStyle> | ||
643 | 60 | <blockTableStyle id="TITLEGRISWHITE"> | ||
644 | 61 | <lineStyle kind="GRID" colorName="black" start="1,0" stop="-1,-1" thickness="0.5"/> | ||
645 | 62 | <blockValign value="MIDDLE"/> | ||
646 | 63 | </blockTableStyle> | ||
647 | 64 | <blockTableStyle id="Tabla3"> | ||
648 | 65 | <blockBackground colorName="#e5e2e5" start="0,0" stop="-1,0"/> | ||
649 | 66 | <blockAlignment value="LEFT"/> | ||
650 | 67 | <blockValign value="TOP"/> | ||
651 | 68 | <lineStyle kind="GRID" colorName="black" start="0,0" stop="-1,-1" thickness="0.5"/> | ||
652 | 69 | <blockValign value="MIDDLE"/> | ||
653 | 70 | </blockTableStyle> | ||
654 | 71 | <blockTableStyle id="Tablatotalgeneral"> | ||
655 | 72 | <blockAlignment value="LEFT"/> | ||
656 | 73 | <blockValign value="TOP"/> | ||
657 | 74 | <lineStyle kind="GRID" colorName="black" start="9,0" stop="-1,-1" thickness="0.5"/> | ||
658 | 75 | <blockValign value="MIDDLE"/> | ||
659 | 76 | </blockTableStyle> | ||
660 | 77 | <initialize> | ||
661 | 78 | <paraStyle name="all" alignment="justify"/> | ||
662 | 79 | </initialize> | ||
663 | 80 | <paraStyle name="TITLE" alignment="CENTER" fontName="Helvetica" fontSize="12.0" leading="20" spaceBefore="-3.0" textColor="black"/> | ||
664 | 81 | <paraStyle name="ITEMSCENTER" alignment="CENTER" fontName="Helvetica-Bold" fontSize="10.0" leading="9" spaceBefore="3.0" textColor="black"/> | ||
665 | 82 | <paraStyle name="ITEMSRIF" alignment="CENTER" fontName="Helvetica-Bold" fontSize="12.0" leading="11" spaceBefore="3.0" textColor="black"/> | ||
666 | 83 | <paraStyle name="P15" fontName="Helvetica-Bold" fontSize="10.0" leading="10" spaceBefore="3.0" alignment="CENTER"/> | ||
667 | 84 | <paraStyle name="P12" fontName="Helvetica" fontSize="10.0" leading="11" alignment="CENTER"/> | ||
668 | 85 | <paraStyle name="P13" fontName="Helvetica" fontSize="10.0" leading="11" alignment="RIGHT"/> | ||
669 | 86 | <paraStyle name="P16" fontName="Helvetica-Bold" fontSize="10.0" leading="11" alignment="RIGHT"/> | ||
670 | 87 | <paraStyle name="P14" fontName="Helvetica" fontSize="10.0" leading="11" alignment="LEFT"/> | ||
671 | 88 | <paraStyle name="P22" fontName="Helvetica" fontSize="9.0" leading="11" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/> | ||
672 | 89 | </stylesheet> | ||
673 | 90 | <images/> | ||
674 | 91 | |||
675 | 92 | <story> | ||
676 | 93 | <para>[[repeatIn(objects,'o')]]</para> | ||
677 | 94 | <para>[[ setLang(company.partner_id.lang) ]]</para> | ||
678 | 95 | <blockTable colWidths="410.0,198.0,50.0,50.0,45.0" repeatRows='1' style="Tabla3"> | ||
679 | 96 | <!-- | ||
680 | 97 | <blockTable colWidths="75.0,335.0,68.0,50.0,80.0,60.0,85.0" repeatRows='1' style="Tabla3"> | ||
681 | 98 | --> | ||
682 | 99 | <tr> | ||
683 | 100 | <td><para style="P15">RIF Contribuyente</para></td> | ||
684 | 101 | <td><para style="P15">Periodo</para></td> | ||
685 | 102 | <td><para style="P15">Fecha Doc.</para></td> | ||
686 | 103 | <td><para style="P15">Tipo Ope.</para></td> | ||
687 | 104 | <td><para style="P15">Tipo Doc.</para></td> | ||
688 | 105 | <!-- | ||
689 | 106 | <td><para style="P15">RIF C/V</para></td> | ||
690 | 107 | <td><para style="P15">Num Doc.</para></td> | ||
691 | 108 | <td><para style="P15">Num Control</para></td> | ||
692 | 109 | <td><para style="P15">Monto Doc.</para></td> | ||
693 | 110 | <td><para style="P15">Base Impo.</para></td> | ||
694 | 111 | <td><para style="P15">Monto IVA</para></td> | ||
695 | 112 | <td><para style="P15">Num.Doc.Afec.</para></td> | ||
696 | 113 | <td><para style="P15">Num.Compro.</para></td> | ||
697 | 114 | <td><para style="P15">Monto Exc. IVA</para></td> | ||
698 | 115 | <td><para style="P15">Alicuota</para></td> | ||
699 | 116 | <td><para style="P15">Expediente</para></td> | ||
700 | 117 | --> | ||
701 | 118 | </tr> | ||
702 | 119 | <tr>[[repeatIn(o.txt_ids,'line')]] | ||
703 | 120 | <td><para style="P12">[[ '98798' ]]</para></td> | ||
704 | 121 | <td><para style="P14">[[ o.period_id.name ]]</para></td> | ||
705 | 122 | <td><para style="P12">[[ line.invoice_id.date_invoice ]]</para></td> | ||
706 | 123 | <td><para style="P12">[[ (line.invoice_id.type in ['out_invoice','out_refund']) and 'V' or 'C' ]]</para></td> | ||
707 | 124 | <td><para style="P13">[[ get_type_doc(line) ]]</para></td> | ||
708 | 125 | |||
709 | 126 | <!-- | ||
710 | 127 | <td><para style="P13">[[ ]]</para></td> | ||
711 | 128 | <td><para style="P13">[[ ]]</para></td> | ||
712 | 129 | <td><para style="P13">[[ ]]</para></td> | ||
713 | 130 | <td><para style="P13">[[ ]]</para></td> | ||
714 | 131 | <td><para style="P13">[[ ]]</para></td> | ||
715 | 132 | <td><para style="P13">[[ ]]</para></td> | ||
716 | 133 | <td><para style="P13">[[ ]]</para></td> | ||
717 | 134 | <td><para style="P13">[[ ]]</para></td> | ||
718 | 135 | <td><para style="P13">[[ ]]</para></td> | ||
719 | 136 | <td><para style="P13">[[ ]]</para></td> | ||
720 | 137 | <td><para style="P13">[[ ]]</para></td> | ||
721 | 138 | --> | ||
722 | 139 | </tr> | ||
723 | 140 | </blockTable> | ||
724 | 141 | <blockTable colWidths="410.0,198.0,145.0" style="TOTAL"> | ||
725 | 142 | <tr> | ||
726 | 143 | <td><para style="P22"><font color="white"></font></para></td> | ||
727 | 144 | <td><para style="P16">TOTAL BASE IMPONIBLE</para></td> | ||
728 | 145 | <td><para style="P16">[[ formatLang(o.amount_total_base) ]]</para></td> | ||
729 | 146 | </tr> | ||
730 | 147 | <tr> | ||
731 | 148 | <td><para style="P22"><font color="white"></font></para></td> | ||
732 | 149 | <td><para style="P16">TOTAL MONTO DE RETENCION</para></td> | ||
733 | 150 | <td><para style="P16">[[ formatLang(o.amount_total_ret) ]]</para></td> | ||
734 | 151 | </tr> | ||
735 | 152 | </blockTable> | ||
736 | 153 | |||
737 | 154 | </story> | ||
738 | 155 | |||
739 | 156 | </document> | ||
740 | 157 | |||
741 | 0 | 158 | ||
742 | === added file 'l10n_ve_withholding_iva/txt_wh_report.xml' | |||
743 | --- l10n_ve_withholding_iva/txt_wh_report.xml 1970-01-01 00:00:00 +0000 | |||
744 | +++ l10n_ve_withholding_iva/txt_wh_report.xml 2011-10-03 14:54:19 +0000 | |||
745 | @@ -0,0 +1,15 @@ | |||
746 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
747 | 2 | <openerp> | ||
748 | 3 | <data> | ||
749 | 4 | <report | ||
750 | 5 | id="list_report_wh_vat" | ||
751 | 6 | menu="True" | ||
752 | 7 | model="txt.iva" | ||
753 | 8 | name="list_report_wh_vat2" | ||
754 | 9 | rml="l10n_ve_withholding_iva/report/list_wh_iva_report.rml" | ||
755 | 10 | string="Retenciones IVA" | ||
756 | 11 | auto = "True" | ||
757 | 12 | header="False"/> | ||
758 | 13 | </data> | ||
759 | 14 | </openerp> | ||
760 | 15 |