Merge lp:~vauxoo/openerp-mexico-localization/7.0_oml_pac_id_sequence_id_invoice-dev_luis into lp:openerp-mexico-localization/7.0
- 7.0_oml_pac_id_sequence_id_invoice-dev_luis
- Merge into 7.0
Proposed by
Luis Torres - http://www.vauxoo.com
Status: | Merged |
---|---|
Merged at revision: | 336 |
Proposed branch: | lp:~vauxoo/openerp-mexico-localization/7.0_oml_pac_id_sequence_id_invoice-dev_luis |
Merge into: | lp:openerp-mexico-localization/7.0 |
Diff against target: |
1769 lines (+33/-1553) 16 files modified
l10n_mx_facturae/invoice.py (+1/-0) l10n_mx_facturae_cbb/__init__.py (+0/-1) l10n_mx_facturae_cbb/__openerp__.py (+0/-1) l10n_mx_facturae_cbb/l10n_mx_facturae_report.xml (+0/-18) l10n_mx_facturae_cbb/report/__init__.py (+0/-28) l10n_mx_facturae_cbb/report/invoice_facturae_pdf.py (+0/-303) l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml (+0/-364) l10n_mx_facturae_pac_sf/__init__.py (+0/-1) l10n_mx_facturae_pac_sf/__openerp__.py (+0/-1) l10n_mx_facturae_pac_sf/ir_attachment_facturae.py (+1/-0) l10n_mx_facturae_pac_sf/l10n_mx_facturae_pac_sf_report.xml (+0/-17) l10n_mx_facturae_pac_sf/report/__init__.py (+0/-28) l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.py (+0/-287) l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml (+0/-420) l10n_mx_facturae_report/report/invoice_facturae_html.mako (+31/-35) l10n_mx_facturae_report/report/invoice_facturae_html.py (+0/-49) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-mexico-localization/7.0_oml_pac_id_sequence_id_invoice-dev_luis |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Isaac López Zúñiga | Pending | ||
Review via email: mp+197451@code.launchpad.net |
Commit message
Description of the change
Se agregaron 2 campos a account_invoice para guardar el pac con el que fue firmado, y la secuencia utilizada, ademas el reporte de facturaE ya no tomará estos valores de funciones, sino directos
To post a comment you must log in.
- 336. By Luis Torres - http://www.vauxoo.com
-
[IMP][l10n_
mx_facturae] Remove field for sequense, and used field that already existed - 337. By Luis Torres - http://www.vauxoo.com
-
[IMP]Comment lines that call report that not was used
- 338. By Luis Torres - http://www.vauxoo.com
-
[REF]comments lines in __init__.py that call .py than not was used
- 339. By Luis Torres - http://www.vauxoo.com
-
[REF]comment report in init
- 340. By Luis Torres - http://www.vauxoo.com
-
[REM]Delete reports .rml than not was used in cbb and pac_sf
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'l10n_mx_facturae/invoice.py' |
2 | --- l10n_mx_facturae/invoice.py 2013-11-29 02:08:04 +0000 |
3 | +++ l10n_mx_facturae/invoice.py 2013-12-04 21:35:17 +0000 |
4 | @@ -317,6 +317,7 @@ |
5 | help='Attachment that generated this invoice'), |
6 | 'rate': fields.float('Type of Change', readonly=True, |
7 | help='Rate used in the date of invoice'), |
8 | + 'pac_id': fields.many2one('params.pac', 'Pac', help='Pac used in singned of the invoice'), |
9 | } |
10 | |
11 | _defaults = { |
12 | |
13 | === modified file 'l10n_mx_facturae_cbb/__init__.py' |
14 | --- l10n_mx_facturae_cbb/__init__.py 2013-01-15 00:42:46 +0000 |
15 | +++ l10n_mx_facturae_cbb/__init__.py 2013-12-04 21:35:17 +0000 |
16 | @@ -26,6 +26,5 @@ |
17 | ############################################################################## |
18 | |
19 | import invoice |
20 | -import report |
21 | import ir_sequence_approval |
22 | import ir_attachment_facturae |
23 | |
24 | === modified file 'l10n_mx_facturae_cbb/__openerp__.py' |
25 | --- l10n_mx_facturae_cbb/__openerp__.py 2013-09-11 15:05:59 +0000 |
26 | +++ l10n_mx_facturae_cbb/__openerp__.py 2013-12-04 21:35:17 +0000 |
27 | @@ -56,7 +56,6 @@ |
28 | "data" : [ |
29 | #'security/l10n_mx_facturae_cbb_security.xml', |
30 | 'ir_sequence_view_v6.xml', |
31 | - "l10n_mx_facturae_report.xml", |
32 | ], |
33 | "test" : ["test/account_invoice_cbb.yml"], |
34 | "installable" : True, |
35 | |
36 | === removed file 'l10n_mx_facturae_cbb/l10n_mx_facturae_report.xml' |
37 | --- l10n_mx_facturae_cbb/l10n_mx_facturae_report.xml 2013-06-28 22:52:28 +0000 |
38 | +++ l10n_mx_facturae_cbb/l10n_mx_facturae_report.xml 1970-01-01 00:00:00 +0000 |
39 | @@ -1,18 +0,0 @@ |
40 | -<?xml version="1.0" encoding="utf-8"?> |
41 | -<openerp> |
42 | - <data> |
43 | - |
44 | - <report id="account_invoice_facturae_pdf2" |
45 | - name="account.invoice.facturae.pdf2" |
46 | - string="Electronic Invoice CBB PDF" |
47 | - model="account.invoice" |
48 | - header="False" |
49 | - rml="l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml" |
50 | - attachment_use="1" |
51 | - attachment="(object.state in ('open','paid')) and (object.fname_invoice and (object.fname_invoice + ''))" |
52 | - groups="l10n_mx_facturae_groups.group_l10n_mx_facturae_user" |
53 | - menu="False" |
54 | - /> |
55 | - |
56 | - </data> |
57 | -</openerp> |
58 | |
59 | === removed directory 'l10n_mx_facturae_cbb/report' |
60 | === removed file 'l10n_mx_facturae_cbb/report/__init__.py' |
61 | --- l10n_mx_facturae_cbb/report/__init__.py 2012-02-24 00:42:55 +0000 |
62 | +++ l10n_mx_facturae_cbb/report/__init__.py 1970-01-01 00:00:00 +0000 |
63 | @@ -1,28 +0,0 @@ |
64 | -# -*- encoding: utf-8 -*- |
65 | -########################################################################### |
66 | -# Module Writen to OpenERP, Open Source Management Solution |
67 | -# |
68 | -# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ |
69 | -# All Rights Reserved. |
70 | -# info Vauxoo (info@vauxoo.com) |
71 | -############################################################################ |
72 | -# Coded by: moylop260 (moylop260@vauxoo.com) |
73 | -# Launchpad Project Manager for Publication: Nhomar Hernandez - nhomar@vauxoo.com |
74 | -############################################################################ |
75 | -# |
76 | -# This program is free software: you can redistribute it and/or modify |
77 | -# it under the terms of the GNU Affero General Public License as |
78 | -# published by the Free Software Foundation, either version 3 of the |
79 | -# License, or (at your option) any later version. |
80 | -# |
81 | -# This program is distributed in the hope that it will be useful, |
82 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
83 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
84 | -# GNU Affero General Public License for more details. |
85 | -# |
86 | -# You should have received a copy of the GNU Affero General Public License |
87 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
88 | -# |
89 | -############################################################################## |
90 | - |
91 | -import invoice_facturae_pdf |
92 | |
93 | === removed file 'l10n_mx_facturae_cbb/report/invoice_facturae_pdf.py' |
94 | --- l10n_mx_facturae_cbb/report/invoice_facturae_pdf.py 2013-05-10 17:00:10 +0000 |
95 | +++ l10n_mx_facturae_cbb/report/invoice_facturae_pdf.py 1970-01-01 00:00:00 +0000 |
96 | @@ -1,303 +0,0 @@ |
97 | -# -*- encoding: utf-8 -*- |
98 | -########################################################################### |
99 | -# Module Writen to OpenERP, Open Source Management Solution |
100 | -# |
101 | -# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ |
102 | -# All Rights Reserved. |
103 | -# info Vauxoo (info@vauxoo.com) |
104 | -############################################################################ |
105 | -# Coded by: moylop260 (moylop260@vauxoo.com) |
106 | -# Launchpad Project Manager for Publication: Nhomar Hernandez - nhomar@vauxoo.com |
107 | -############################################################################ |
108 | -# |
109 | -# This program is free software: you can redistribute it and/or modify |
110 | -# it under the terms of the GNU Affero General Public License as |
111 | -# published by the Free Software Foundation, either version 3 of the |
112 | -# License, or (at your option) any later version. |
113 | -# |
114 | -# This program is distributed in the hope that it will be useful, |
115 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
116 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
117 | -# GNU Affero General Public License for more details. |
118 | -# |
119 | -# You should have received a copy of the GNU Affero General Public License |
120 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
121 | -# |
122 | -############################################################################## |
123 | -# Leyendas tomadas el dia 16 de noviembre de 2012 del sitio: |
124 | -# http://www.sat.gob.mx/sitio_internet/asistencia_contribuyente/principiantes/comprobantes_fiscales/66_19207.html |
125 | -# La leyenda “La reproducción apócrifa de este comprobante constituye un delito en los términos de las disposiciones fiscales”, con letra no menor de 5 puntos. |
126 | -# La leyenda "Este comprobante tendrá una vigencia de dos años contados a partir de la fecha de aprobación de la asignación de folios, la cual es dd/mm/aaaa", misma que deberá ser impresa con letra no menor de 5 puntos. |
127 | -############################################################################## |
128 | - |
129 | -from openerp.report import report_sxw |
130 | -from openerp import pooler |
131 | -from openerp import tools |
132 | -import time |
133 | -# from amount_to_text_es import amount_to_text as amount_to_text_class |
134 | - |
135 | -# amount_to_text = amount_to_text_obj.amount_to_text |
136 | -# amount_to_text = amount_to_text_obj.amount_to_text_cheque |
137 | - |
138 | -# sql_delete_report = "DELETE FROM ir_act_report_xml WHERE report_name = |
139 | -# 'account.invoice.facturae.pdf'"--Si no toma la actualizacion del reporte |
140 | -# xml, borrarlo directamente desde la base de datos, con este script. |
141 | - |
142 | - |
143 | -class account_invoice_facturae_pdf2(report_sxw.rml_parse): |
144 | - def __init__(self, cr, uid, name, context): |
145 | - super(account_invoice_facturae_pdf2, self).__init__( |
146 | - cr, uid, name, context=context) |
147 | - self.localcontext.update({ |
148 | - 'set_global_data': self._set_global_data, |
149 | - 'facturae_data_dict': self._facturae_data_dict, |
150 | - #'amount_to_text': self._get_amount_to_text, |
151 | - 'split_string': self._split_string, |
152 | - 'company_address': self._company_address, |
153 | - 'subcompany_address': self._subcompany_address, |
154 | - 'invoice_address': self._invoice_address, |
155 | - 'get_invoice_sequence': self._get_invoice_sequence, |
156 | - 'get_approval': self._get_approval, |
157 | - 'get_taxes': self._get_taxes, |
158 | - 'get_taxes_ret': self._get_taxes_ret, |
159 | - 'float': float, |
160 | - 'exists_key': self._exists_key, |
161 | - 'get_data_partner': self._get_data_partner, |
162 | - }) |
163 | - self.taxes = [] |
164 | - |
165 | - def _exists_key(self, key): |
166 | - return key in self.invoice._columns |
167 | - """ |
168 | - try: |
169 | - str= 'self.invoice.'+key |
170 | - if eval(str): |
171 | - return True |
172 | - except: |
173 | - return False |
174 | - """ |
175 | - |
176 | - def _set_global_data(self, o): |
177 | - try: |
178 | - self.setLang(o.partner_id.lang) |
179 | - except Exception, e: |
180 | - print "exception: %s" % (e) |
181 | - pass |
182 | - try: |
183 | - self._get_company_address(o.id) |
184 | - except Exception, e: |
185 | - print "exception: %s" % (e) |
186 | - pass |
187 | - try: |
188 | - self._get_facturae_data_dict(o) |
189 | - except Exception, e: |
190 | - print "exception: %s" % (e) |
191 | - pass |
192 | - return "" |
193 | - |
194 | - def _get_approval(self): |
195 | - return self.approval |
196 | - |
197 | - def _get_invoice_sequence(self): |
198 | - return self.sequence |
199 | - |
200 | - def _set_invoice_sequence_and_approval(self, invoice_id): |
201 | - context = {} |
202 | - pool = pooler.get_pool(self.cr.dbname) |
203 | - invoice_obj = pool.get('account.invoice') |
204 | - sequence_obj = pool.get('ir.sequence') |
205 | - # approval_obj = pool.get('ir.sequence.approval') |
206 | - invoice = invoice_obj.browse(self.cr, self.uid, [ |
207 | - invoice_id], context=context)[0] |
208 | - context.update({'number_work': invoice.number}) |
209 | - sequence = invoice.invoice_sequence_id or False |
210 | - sequence_id = sequence and sequence.id or False |
211 | - # invoice_obj._get_invoice_sequence(self.cr, self.uid, [invoice_id])[invoice_id] |
212 | - # sequence_obj.browse(self.cr, self.uid, [sequence_id])[0] |
213 | - self.sequence = sequence |
214 | - |
215 | - # invoice = invoice_obj.browse(self.cr, self.uid, [invoice_id])[0] |
216 | - approval = sequence and sequence.approval_id or False |
217 | - approval_id = approval and approval.id or False |
218 | - # approval_id = sequence_obj._get_current_approval(self.cr, self.uid, [sequence_id], context=context)[sequence_id] |
219 | - # approval = approval_obj.browse(self.cr, self.uid, [approval_id])[0] |
220 | - self.approval = approval |
221 | - return sequence, approval |
222 | - |
223 | - def _get_taxes(self): |
224 | - return self.taxes |
225 | - |
226 | - def _get_taxes_ret(self): |
227 | - try: |
228 | - return self.taxes_ret |
229 | - except: |
230 | - pass |
231 | - return [] |
232 | - |
233 | - ''' |
234 | - def _set_taxes(self, invoice_id): |
235 | - """ |
236 | - pool = pooler.get_pool(self.cr.dbname) |
237 | - invoice_obj = pool.get('account.invoice') |
238 | - invoice = invoice_obj.browse(self.cr, self.uid, [invoice_id])[0] |
239 | - taxes = [] |
240 | - for line_tax_id in invoice.tax_line: |
241 | - tax_name = line_tax_id.name.lower().replace('.','').replace( |
242 | - '-','').replace(' ', '') |
243 | - if tax_name in ['iva']: |
244 | - tax_name = 'IVA' |
245 | - elif 'isr' in tax_name: |
246 | - tax_name = 'ISR' |
247 | - elif 'ieps' in tax_name: |
248 | - tax_name = 'IEPS' |
249 | - tax_names.append( tax_name ) |
250 | - taxes.append({ |
251 | - 'name': tax_name, |
252 | - 'rate': "%.2f"%( round( line_tax_id.amount/( |
253 | - invoice.amount_total-line_tax_id.amount)*100, 0) ), |
254 | - 'amount': "%.2f"%( line_tax_id.amount or 0.0), |
255 | - }) |
256 | - """ |
257 | - self.taxes = self.invoice_data_dict['Comprobante']['Impuestos']['Traslados'] |
258 | - #self.taxes = taxes |
259 | - return taxes |
260 | - ''' |
261 | - |
262 | - def _split_string(self, string, length=100): |
263 | - if string: |
264 | - for i in range(0, len(string), length): |
265 | - string = string[:i] + ' ' + string[i:] |
266 | - return string |
267 | - """ |
268 | - def _get_amount_to_text(self, amount, lang, currency=""): |
269 | - if currency.upper() in ('MXP', 'MXN', 'PESOS', 'PESOS MEXICANOS'): |
270 | - sufijo = 'M. N.' |
271 | - currency = 'PESOS' |
272 | - else: |
273 | - sufijo = 'M. E.' |
274 | - #return amount_to_text(amount, lang, currency) |
275 | - amount_text = amount_to_text(amount, currency, sufijo) |
276 | - amount_text = amount_text and amount_text.upper() or '' |
277 | - return amount_text |
278 | - """ |
279 | - def _get_company_address(self, invoice_id): |
280 | - pool = pooler.get_pool(self.cr.dbname) |
281 | - invoice_obj = pool.get('account.invoice') |
282 | - partner_obj = pool.get('res.partner') |
283 | - address_obj = pool.get('res.partner') |
284 | - invoice = invoice_obj.browse(self.cr, self.uid, invoice_id) |
285 | - partner_id = invoice.company_id.parent_id and invoice.company_id.\ |
286 | - parent_id.partner_id.id or invoice.company_id.partner_id.id |
287 | - self.invoice = invoice |
288 | - # print "partner_id",partner_id |
289 | - # invoice = partner_obj.browse(cr, uid, invoice_id) |
290 | - address_id = partner_obj.address_get( |
291 | - self.cr, self.uid, [partner_id], ['invoice'])['invoice'] |
292 | - self.partner_invoice_address = partner_obj.browse( |
293 | - self.cr, self.uid, address_id) |
294 | - self.company_address_invoice = address_obj.browse( |
295 | - self.cr, self.uid, partner_id) |
296 | - |
297 | - subpartner_id = invoice.company_id.partner_id.id |
298 | - if partner_id == subpartner_id: |
299 | - self.subcompany_address_invoice = self.company_address_invoice |
300 | - else: |
301 | - subaddress_id = partner_obj.address_get( |
302 | - self.cr, self.uid, [subpartner_id], ['invoice'])['invoice'] |
303 | - self.subcompany_address_invoice = address_obj.browse( |
304 | - self.cr, self.uid, subaddress_id) |
305 | - # print "self.company_address_invoice",self.company_address_invoice |
306 | - # print "self.company_address_invoice[0]",self.company_address_invoice[0] |
307 | - # self.company_address_invoice = self.company_address_invoice and self.company_address_invoice[0] or False |
308 | - # print "self.company_address_invoice",self.company_address_invoice |
309 | - # return [self.company_address_invoice] |
310 | - return "" |
311 | - |
312 | - def _company_address(self): |
313 | - # print "self.company_address_invoice",self.company_address_invoice |
314 | - return self.company_address_invoice |
315 | - |
316 | - def _subcompany_address(self): |
317 | - return self.subcompany_address_invoice |
318 | - |
319 | - def _invoice_address(self): |
320 | - return self.partner_invoice_address |
321 | - |
322 | - def _facturae_data_dict(self): |
323 | - # print "self.invoice_data_dict",self.invoice_data_dict |
324 | - return self.invoice_data_dict |
325 | - |
326 | - def _get_facturae_data_dict(self, invoice): |
327 | - self._set_invoice_sequence_and_approval(invoice.id) |
328 | - # invoice_obj = pool.get('account.invoice') |
329 | - self.taxes = [ |
330 | - tax for tax in invoice.tax_line if tax.tax_percent > 0.01] |
331 | - self.taxes_ret = [ |
332 | - tax for tax in invoice.tax_line if tax.tax_percent <= 0.01] |
333 | - return "" |
334 | - """ |
335 | - pool = pooler.get_pool(self.cr.dbname) |
336 | - invoice_obj = pool.get('account.invoice') |
337 | - self.invoice_data_dict = invoice_obj._get_facturae_invoice_xml_data( |
338 | - self.cr, self.uid, [invoice_id], context={'type_data': 'dict'}) |
339 | - #print "self.invoice_data_dict['Comprobante']['Impuestos']['Traslados'\ |
340 | - ]",self.invoice_data_dict['Comprobante']['Impuestos']['Traslados'] |
341 | - try: |
342 | - self.taxes = [ traslado['Traslado'] for traslado in self.\ |
343 | - invoice_data_dict['Comprobante']['Impuestos']['Traslados'] if \ |
344 | - float( traslado['Traslado']['tasa'] ) >0.01 ] |
345 | - #self.taxes = [tax for tax in invoice.account_invoice_tax if \ |
346 | - tax.tax_percent > 0.01] |
347 | - #self.taxes.extend( self.taxes_ret ) |
348 | - except Exception, e: |
349 | - print "exception: %s"%( e ) |
350 | - pass |
351 | - |
352 | - #self.taxes_ret = [] |
353 | - for retencion in self.invoice_data_dict['Comprobante']['Impuestos'].\ |
354 | - get('Retenciones', []): |
355 | - amount_untaxed = float( self.invoice_data_dict['Comprobante'][ |
356 | - 'subTotal'] ) |
357 | - tax_ret_amount = float( retencion['Retencion']['importe'] ) |
358 | - tasa = tax_ret_amount and amount_untaxed and tax_ret_amount * \ |
359 | - 100 / amount_untaxed or 0.0 |
360 | - retencion['Retencion'].update({'tasa': tasa}) |
361 | - self.taxes_ret.append( retencion['Retencion'] ) |
362 | - return "" |
363 | - """ |
364 | - |
365 | - def _get_data_partner(self, partner_id): |
366 | - partner_obj = self.pool.get('res.partner') |
367 | - res = {} |
368 | - address_invoice_id = partner_obj.search(self.cr, self.uid, [( |
369 | - 'parent_id', '=', partner_id.id), ('type', '=', 'invoice')]) |
370 | - if address_invoice_id: |
371 | - address_invoice = partner_obj.browse( |
372 | - self.cr, self.uid, address_invoice_id[0]) |
373 | - if address_invoice: |
374 | - res.update({ |
375 | - 'street': address_invoice.street or False, |
376 | - 'street3': address_invoice.l10n_mx_street3 or False, |
377 | - 'street4': address_invoice.l10n_mx_street4 or False, |
378 | - 'street2': address_invoice.street2 or False, |
379 | - 'city': address_invoice.city or False, |
380 | - 'state': address_invoice.state_id and \ |
381 | - address_invoice.state_id.name or False, |
382 | - 'city2': address_invoice.l10n_mx_city2 or False, |
383 | - 'zip': address_invoice.zip or False, |
384 | - 'vat': 'vat_split' in address_invoice._columns and \ |
385 | - address_invoice.vat_split or address_invoice.vat or False, |
386 | - 'phone': address_invoice.phone or False, |
387 | - 'fax': address_invoice.fax or False, |
388 | - 'mobile': address_invoice.mobile or False, |
389 | - }) |
390 | - return res |
391 | - |
392 | -report_sxw.report_sxw( |
393 | - 'report.account.invoice.facturae.pdf2', |
394 | - 'account.invoice', |
395 | - 'addons/l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml', |
396 | - header=False, |
397 | - parser=account_invoice_facturae_pdf2, |
398 | -) |
399 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
400 | |
401 | === removed file 'l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml' |
402 | --- l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml 2013-01-22 19:02:40 +0000 |
403 | +++ l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml 1970-01-01 00:00:00 +0000 |
404 | @@ -1,364 +0,0 @@ |
405 | -<?xml version="1.0"?> |
406 | -<document filename="test.pdf"> |
407 | - <template pageSize="(612.0,792.0)" title="Test" author="Martin Simon" allowSplitting="20"> |
408 | - <pageTemplate id="first"> |
409 | - <frame id="first" x1="57.0" y1="56.0" width="498" height="719"/> |
410 | - </pageTemplate> |
411 | - </template> |
412 | - <stylesheet> |
413 | - <blockTableStyle id="Standard_Outline"> |
414 | - <blockAlignment value="LEFT"/> |
415 | - <blockValign value="TOP"/> |
416 | - </blockTableStyle> |
417 | - <blockTableStyle id="Tabla1"> |
418 | - <blockAlignment value="LEFT"/> |
419 | - <blockValign value="TOP"/> |
420 | - </blockTableStyle> |
421 | - <blockTableStyle id="Tabla2"> |
422 | - <blockAlignment value="LEFT"/> |
423 | - <blockValign value="TOP"/> |
424 | - <lineStyle kind="LINEABOVE" colorName="#000080" start="0,0" stop="0,0"/> |
425 | - <lineStyle kind="LINEABOVE" colorName="#000080" start="1,0" stop="1,0"/> |
426 | - </blockTableStyle> |
427 | - <blockTableStyle id="Tabla3"> |
428 | - <blockAlignment value="LEFT"/> |
429 | - <blockValign value="TOP"/> |
430 | - </blockTableStyle> |
431 | - <blockTableStyle id="Tabla7"> |
432 | - <blockAlignment value="LEFT"/> |
433 | - <blockValign value="TOP"/> |
434 | - </blockTableStyle> |
435 | - <blockTableStyle id="Table1"> |
436 | - <blockAlignment value="LEFT"/> |
437 | - <blockValign value="TOP"/> |
438 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/> |
439 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
440 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
441 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/> |
442 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
443 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
444 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/> |
445 | - <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/> |
446 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
447 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
448 | - </blockTableStyle> |
449 | - <blockTableStyle id="Tabla4"> |
450 | - <blockAlignment value="LEFT"/> |
451 | - <blockValign value="TOP"/> |
452 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/> |
453 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
454 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
455 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
456 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
457 | - <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/> |
458 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
459 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
460 | - </blockTableStyle> |
461 | - <initialize> |
462 | - <paraStyle name="all" alignment="justify"/> |
463 | - </initialize> |
464 | - <paraStyle name="P1" fontName="Helvetica" alignment="RIGHT"/> |
465 | - <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
466 | - <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10"/> |
467 | - <paraStyle name="P4" fontName="Helvetica" fontSize="10.0" leading="13"/> |
468 | - <paraStyle name="P5" fontName="Helvetica-Bold" fontSize="6.0" leading="8" alignment="CENTER"/> |
469 | - <paraStyle name="P6" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/> |
470 | - <paraStyle name="P7" fontName="Helvetica" textColor="#280099"/> |
471 | - <paraStyle name="P8" fontName="Helvetica" alignment="RIGHT" textColor="#280099"/> |
472 | - <paraStyle name="P9" fontName="Helvetica" textColor="#ff3333"/> |
473 | - <paraStyle name="P10" fontName="Helvetica" fontSize="12.0" leading="15" textColor="#800000"/> |
474 | - <paraStyle name="P11" fontName="Helvetica" fontSize="2.0" leading="3" textColor="#800000"/> |
475 | - <paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
476 | - <paraStyle name="P13" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
477 | - <paraStyle name="P14" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
478 | - <paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
479 | - <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
480 | - <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
481 | - <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
482 | - <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="18.0" leading="22" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
483 | - <paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
484 | - <paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
485 | - <paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
486 | - <paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/> |
487 | - <paraStyle name="P24" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
488 | - <paraStyle name="P25" fontName="Helvetica" fontSize="8.0" leading="10" textColor="#280099"/> |
489 | - <paraStyle name="P26" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" textColor="#280099"/> |
490 | - <paraStyle name="P27" fontName="Helvetica" fontSize="8.0" leading="10"/> |
491 | - <paraStyle name="P28" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
492 | - <paraStyle name="Standard" fontName="Helvetica"/> |
493 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
494 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
495 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
496 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
497 | - <paraStyle name="Index" fontName="Helvetica"/> |
498 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
499 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
500 | - <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
501 | - <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
502 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
503 | - <paraStyle name="Quotations" rightIndent="28.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="14.0"/> |
504 | - <images/> |
505 | - </stylesheet> |
506 | - <story> |
507 | - <section> |
508 | - <para style="P16">[[ repeatIn(objects,'o') ]] <font face="Helvetica" size="9.0">[[ set_global_data(o) ]]</font></para> |
509 | - <para style="P19">[[ o.company_id.parent_id and o.company_id.parent_id.partner_id.name or o.company_id.partner_id.name ]]</para> |
510 | - <blockTable colWidths="125.0,207.0,166.0" style="Tabla1"> |
511 | - <tr> |
512 | - <td> |
513 | - <para style="P24">[[ o.company_id.logo and setTag('para','image',{'width':'120.0','height':'80.0'}) ]] [[ o.company_id.logo ]]</para> |
514 | - </td> |
515 | - <td> |
516 | - <para style="P18">[[ company_address()['name'] or o.company_id.partner_id.name ]]</para> |
517 | - <para style="P21"> |
518 | - <font color="white"> </font> |
519 | - </para> |
520 | - <para style="P18">Calle: [[ company_address()['street'] or '' ]] Nro. Ext: [[ company_address()['street3'] or '' ]] Int: [[ company_address()['street4'] or '' ]]</para> |
521 | - <para style="P21"> |
522 | - <font color="white"> </font> |
523 | - </para> |
524 | - <para style="P18">Colonia: [[ company_address()['street2'] or '' ]]</para> |
525 | - <para style="P21"> |
526 | - <font color="white"> </font> |
527 | - </para> |
528 | - <para style="P18">Ciudad: [[ company_address()['city'] or '' ]] Estado: [[ company_address()['state_id'] and company_address()['state_id']['name'] or '' ]]</para> |
529 | - <para style="P22"> |
530 | - <font color="white"> </font> |
531 | - </para> |
532 | - <para style="P18">Localidad: [[ company_address()['city2'] or '' ]]</para> |
533 | - <para style="P21"> |
534 | - <font color="white"> </font> |
535 | - </para> |
536 | - <para style="P18">CP: [[ company_address()['zip'] or '' ]]</para> |
537 | - <para style="P21"> |
538 | - <font color="white"> </font> |
539 | - </para> |
540 | - <para style="P18">RFC: [[ o.company_id.partner_id._columns.has_key('vat_split') and o.company_id.partner_id.vat_split or o.company_id.partner_id.vat ]]</para> |
541 | - <para style="P21"> |
542 | - <font color="white"> </font> |
543 | - </para> |
544 | - <para style="P20">Teléfono(s): </para> |
545 | - <para style="P20">[[ company_address()['phone'] or removeParentNode('para') ]]</para> |
546 | - <para style="P20">[[ company_address()['fax'] or removeParentNode('para') ]]</para> |
547 | - <para style="P20">[[ company_address()['mobile'] or removeParentNode('para') ]]</para> |
548 | - </td> |
549 | - <td> |
550 | - <para style="P9"> |
551 | - <font face="Helvetica" size="18.0">Folio: [[ get_approval() and get_approval().serie or '' ]] [[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and o.number or 'SIN FOLIO O ESTATUS NO VALIDO' ]]</font> |
552 | - </para> |
553 | - <para style="P11"> |
554 | - <font color="white"> </font> |
555 | - </para> |
556 | - <para style="P10">[[ o.state == 'cancel' and 'FACTURA CANCELADA' ]]</para> |
557 | - <para style="P11"> |
558 | - <font color="white"> </font> |
559 | - </para> |
560 | - <para style="Table Contents">[[ company_address()['city'] or '' ]], [[ company_address()['state_id'] and company_address()['state_id']['name'] or '' ]] a</para> |
561 | - <para style="Table Contents">[[ o.date_invoice_tz or '' ]]</para> |
562 | - </td> |
563 | - </tr> |
564 | - </blockTable> |
565 | - <blockTable colWidths="249.0,249.0" style="Tabla2"> |
566 | - <tr> |
567 | - <td> |
568 | - <para style="P7">Receptor</para> |
569 | - <para style="Table Contents"><font face="Helvetica">Nombre: </font>[[ o.partner_id.name ]]</para> |
570 | - <para style="terp_default_8"><font face="Helvetica">Dirección:</font> [[ o.address_invoice_id.street ]] No. Ext: [[ o.address_invoice_id.street3 ]] Int: [[ o.address_invoice_id.street4 ]]</para> |
571 | - <para style="terp_default_8"><font face="Helvetica">Colonia:</font> [[ o.address_invoice_id.street2 or '' ]]</para> |
572 | - <para style="terp_default_8"><font face="Helvetica">Ciudad:</font> [[ o.address_invoice_id.city or '' ]] <font face="Helvetica">Estado: </font>[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para> |
573 | - <para style="terp_default_8"><font face="Helvetica">Localidad: </font>[[ o.address_invoice_id.city2 or '' ]]</para> |
574 | - <para style="terp_default_8"><font face="Helvetica">C.P.:</font> [[ o.address_invoice_id.zip or '' ]] </para> |
575 | - <para style="terp_default_8"><font face="Helvetica">R. F. C. :</font> [[ o.partner_id._columns.has_key('vat_split') and o.partner_id.vat_split or o.partner_id.vat ]]</para> |
576 | - <para style="P23">Teléfono(s): </para> |
577 | - <para style="P17">[[ o.address_invoice_id.phone or removeParentNode('para') ]]</para> |
578 | - <para style="P17">[[ o.address_invoice_id.fax or removeParentNode('para') ]]</para> |
579 | - <para style="P17">[[ o.address_invoice_id.mobile or removeParentNode('para') ]]</para> |
580 | - </td> |
581 | - <td> |
582 | - <para style="Table Contents">Condición de pago: [[ format(o.payment_term and (o.payment_term.note or o.payment_term.name) or removeParentNode('para') ) ]]</para> |
583 | - <para style="P3">Origen: [[ o.origin or removeParentNode('para') ]]</para> |
584 | - <para style="P3">Expedido en:</para> |
585 | - <para style="P3">[[ subcompany_address()['name'] or o.company_id.partner_id.name ]]</para> |
586 | - <para style="P3">Calle: [[ subcompany_address()['street'] or '' ]] Nro. Ext: [[ subcompany_address()['street3'] or '' ]] Int: [[ subcompany_address()['street4'] or '' ]]</para> |
587 | - <para style="P3">Colonia: [[ subcompany_address()['street2'] or '' ]]</para> |
588 | - <para style="P3">Ciudad: [[ subcompany_address()['city'] or '' ]] </para> |
589 | - <para style="P3">Estado: [[ subcompany_address()['state_id'] and subcompany_address()['state_id']['name'] or '' ]]</para> |
590 | - <para style="P3">Localidad: [[ subcompany_address()['city2'] or '' ]]</para> |
591 | - <para style="P3">CP: [[ subcompany_address()['zip'] or '' ]] </para> |
592 | - </td> |
593 | - </tr> |
594 | - </blockTable> |
595 | - <blockTable colWidths="47.0,88.0,160.0,54.0,65.0,85.0" style="Tabla3"> |
596 | - <tr> |
597 | - <td> |
598 | - <para style="P25">Cantidad</para> |
599 | - </td> |
600 | - <td> |
601 | - <para style="P25">Unidad de medida</para> |
602 | - </td> |
603 | - <td> |
604 | - <para style="P25">Descripción</para> |
605 | - </td> |
606 | - <td> |
607 | - <para style="P25">Clave</para> |
608 | - </td> |
609 | - <td> |
610 | - <para style="P26">P.Unitario</para> |
611 | - </td> |
612 | - <td> |
613 | - <para style="P26">Importe</para> |
614 | - </td> |
615 | - </tr> |
616 | - <tr> |
617 | - <td> |
618 | - <para style="Table Contents"> |
619 | - <font face="Helvetica" size="8.0">[[ repeatIn(o.invoice_line,'l') ]] [[ formatLang(l.quantity) ]]</font> |
620 | - </para> |
621 | - </td> |
622 | - <td> |
623 | - <para style="P2">[[ (l.uos_id and l.uos_id.name) or '' ]]</para> |
624 | - </td> |
625 | - <td> |
626 | - <para style="P2">[[ l.name ]]</para> |
627 | - </td> |
628 | - <td> |
629 | - <para style="P2">[[ l.product_id and l.product_id.default_code ]]</para> |
630 | - </td> |
631 | - <td> |
632 | - <para style="P28">[[ formatLang(l.price_unit) ]]</para> |
633 | - </td> |
634 | - <td> |
635 | - <para style="P28">[[ exists_key('global_discount_percent') and (formatLang(l.quantity * l.price_unit)) or formatLang(l.price_subtotal) ]]</para> |
636 | - </td> |
637 | - </tr> |
638 | - </blockTable> |
639 | - <blockTable colWidths="427.0,71.0" style="Tabla7"> |
640 | - <tr> |
641 | - <td> |
642 | - <para style="P8">Suma $</para> |
643 | - </td> |
644 | - <td> |
645 | - <para style="P1">[[formatLang( ( exists_key('global_discount_percent') and o.global_discount_amount or 0.0 ) + (o.amount_untaxed or 0.0) )]]</para> |
646 | - </td> |
647 | - </tr> |
648 | - <tr> |
649 | - <td> |
650 | - <para style="P8">Descuento: [[ exists_key('global_discount_percent') and o.global_discount_percent or removeParentNode('tr')]] %</para> |
651 | - </td> |
652 | - <td> |
653 | - <para style="P1">[[o.global_discount_amount and formatLang( o.global_discount_amount) or '']]</para> |
654 | - </td> |
655 | - </tr> |
656 | - <tr> |
657 | - <td> |
658 | - <para style="P8">Sub Total $</para> |
659 | - </td> |
660 | - <td> |
661 | - <para style="P1">[[ formatLang(o.amount_untaxed) ]]</para> |
662 | - </td> |
663 | - </tr> |
664 | - <tr> |
665 | - <td> |
666 | - <para style="P8"> |
667 | - <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes(), 'tax' ) ]]</font> |
668 | - <font face="Helvetica">[[ tax['name2'] ]] ([[ round( float( tax['tax_percent'] ) ) ]]%) $</font> |
669 | - </para> |
670 | - </td> |
671 | - <td> |
672 | - <para style="P1">[[ formatLang( float( tax['amount'] ) ) ]]</para> |
673 | - </td> |
674 | - </tr> |
675 | - <tr> |
676 | - <td> |
677 | - <para style="P8"> |
678 | - <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes_ret(), 'tax_ret' ) ]]</font> |
679 | - <font face="Helvetica">[[ tax_ret['name2'] ]] Ret ([[ round( float( tax_ret['tax_percent'] ),2 )*-1 ]]%) $</font> |
680 | - </para> |
681 | - </td> |
682 | - <td> |
683 | - <para style="P1">[[ formatLang( float( tax_ret['amount'] )*-1 ) ]]</para> |
684 | - </td> |
685 | - </tr> |
686 | - <tr> |
687 | - <td> |
688 | - <para style="P8">Total $</para> |
689 | - </td> |
690 | - <td> |
691 | - <para style="P1">[[ formatLang(o.amount_total) ]]</para> |
692 | - </td> |
693 | - </tr> |
694 | - <tr> |
695 | - <td> |
696 | - <para style="P14">IMPORTE CON LETRA:</para> |
697 | - <para style="P13">[[ o.amount_to_text ]]</para> |
698 | - </td> |
699 | - <td> |
700 | - <para style="P1"> |
701 | - <font color="white"> </font> |
702 | - </para> |
703 | - </td> |
704 | - </tr> |
705 | - </blockTable> |
706 | - <para style="P12"> |
707 | - <font color="white"> </font> |
708 | - </para> |
709 | - <para style="P12"> |
710 | - <font color="white"> </font> |
711 | - </para> |
712 | - <blockTable colWidths="166.0,166.0,166.0" style="Table1"> |
713 | - <tr> |
714 | - <td> |
715 | - <para style="P5">Régimen Fiscal:</para> |
716 | - <para style="P6">[[o.company_id.partner_id.regimen_fiscal_id and o.company_id.partner_id.regimen_fiscal_id.name or 'No identificado']]</para> |
717 | - </td> |
718 | - <td> |
719 | - <para style="P5">Método de Pago:</para> |
720 | - <para style="P6">[[o.pay_method_id.name or 'No identificado']]</para> |
721 | - </td> |
722 | - <td> |
723 | - <para style="P5">Últimos 4 dígitos de la cuenta bancaria:</para> |
724 | - <para style="P6">[[o.acc_payment.last_acc_number or 'No identificado']]</para> |
725 | - </td> |
726 | - </tr> |
727 | - </blockTable> |
728 | - <para style="P12"> |
729 | - <font color="white"> </font> |
730 | - </para> |
731 | - <blockTable colWidths="106.0,257.0,135.0" style="Tabla4"> |
732 | - <tr> |
733 | - <td> |
734 | - <para style="P2">[[ get_approval() and get_approval().cbb_image and setTag('para','image',{'width':'104.0','height':'104.0'}) ]] [[ get_approval().cbb_image ]]</para> |
735 | - </td> |
736 | - <td> |
737 | - <para style="P2">Número de aprobación SICOFI: [[ get_approval() and get_approval().approval_number or '' ]]</para> |
738 | - <para style="P2"> |
739 | - <font color="white"> </font> |
740 | - </para> |
741 | - <para style="P2">Pago en una sola exhibición</para> |
742 | - <para style="P2"> |
743 | - <font color="white"> </font> |
744 | - </para> |
745 | - <para style="P2">Efectos fiscales al pago</para> |
746 | - <para style="P2"> |
747 | - <font color="white"> </font> |
748 | - </para> |
749 | - <para style="P2">La reproducción apócrifa de este comprobante constituye un delito en los términos de las disposiciones fiscales.</para> |
750 | - <para style="P2"> |
751 | - <font color="white"> </font> |
752 | - </para> |
753 | - <para style="P2">Este comprobante tendrá una vigencia de dos años contados a partir de la fecha de aprobación de la asignación de folios, la cual es: [[ get_approval() and time.strftime('%d-%m-%Y',time.strptime(get_approval().date_start,'%Y-%m-%d')) or '' ]]</para> |
754 | - </td> |
755 | - <td> |
756 | - <para style="P2">[[ o.company_id.cif_file and setTag('para','image',{'width':'98.0','height':'161.0'}) ]] [[ o.company_id.cif_file ]]</para> |
757 | - </td> |
758 | - </tr> |
759 | - </blockTable> |
760 | - <para style="terp_default_9"> |
761 | - <font color="white"> </font> |
762 | - </para> |
763 | - <para style="P15">Vendedor: [[o.user_id.name]]</para> |
764 | - <para style="terp_default_9">[[ format(o.comment or '') ]]</para> |
765 | - </section> |
766 | - </story> |
767 | -</document> |
768 | - |
769 | |
770 | === removed file 'l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw' |
771 | Binary files l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw 2013-01-22 19:02:40 +0000 and l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw 1970-01-01 00:00:00 +0000 differ |
772 | === modified file 'l10n_mx_facturae_pac_sf/__init__.py' |
773 | --- l10n_mx_facturae_pac_sf/__init__.py 2013-01-15 00:42:46 +0000 |
774 | +++ l10n_mx_facturae_pac_sf/__init__.py 2013-12-04 21:35:17 +0000 |
775 | @@ -25,7 +25,6 @@ |
776 | # |
777 | ############################################################################## |
778 | import invoice |
779 | -import report |
780 | import wizard |
781 | import params_pac |
782 | import ir_sequence_approval |
783 | |
784 | === modified file 'l10n_mx_facturae_pac_sf/__openerp__.py' |
785 | --- l10n_mx_facturae_pac_sf/__openerp__.py 2013-09-10 22:43:39 +0000 |
786 | +++ l10n_mx_facturae_pac_sf/__openerp__.py 2013-12-04 21:35:17 +0000 |
787 | @@ -51,7 +51,6 @@ |
788 | ], |
789 | "data" : [ |
790 | #"security/l10n_mx_facturae_pac_sf_security.xml", |
791 | - "l10n_mx_facturae_pac_sf_report.xml", |
792 | "wizard/wizard_cancel_invoice_pac_sf_view.xml", |
793 | "wizard/wizard_export_invoice_pac_sf_view_v6.xml", |
794 | ], |
795 | |
796 | === modified file 'l10n_mx_facturae_pac_sf/ir_attachment_facturae.py' |
797 | --- l10n_mx_facturae_pac_sf/ir_attachment_facturae.py 2013-09-06 00:03:45 +0000 |
798 | +++ l10n_mx_facturae_pac_sf/ir_attachment_facturae.py 2013-12-04 21:35:17 +0000 |
799 | @@ -268,6 +268,7 @@ |
800 | 'cfdi_xml': base64.decodestring(resultado[ |
801 | 'resultados']['cfdiTimbrado'] or ''), # este se necesita en uno que no es base64 |
802 | 'cfdi_folio_fiscal': resultado['resultados']['uuid'] or '', |
803 | + 'pac_id': pac_params.id, |
804 | } |
805 | msg += mensaje + "." + resultados_mensaje + \ |
806 | " Folio Fiscal: " + folio_fiscal + "." |
807 | |
808 | === removed file 'l10n_mx_facturae_pac_sf/l10n_mx_facturae_pac_sf_report.xml' |
809 | --- l10n_mx_facturae_pac_sf/l10n_mx_facturae_pac_sf_report.xml 2013-09-03 01:21:44 +0000 |
810 | +++ l10n_mx_facturae_pac_sf/l10n_mx_facturae_pac_sf_report.xml 1970-01-01 00:00:00 +0000 |
811 | @@ -1,17 +0,0 @@ |
812 | -<?xml version="1.0" encoding="utf-8"?> |
813 | -<openerp> |
814 | - <data> |
815 | - |
816 | - <report id="account_invoice_facturae_pac_sf_pdf" |
817 | - name="account.invoice.facturae.pac.sf.pdf" |
818 | - string="Factura Electronica PDF PAC SF" |
819 | - model="account.invoice" |
820 | - header="False" |
821 | - rml="l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml" |
822 | - attachment_use="1" |
823 | - attachment="(object.state in ('open','paid')) and (object.cfdi_folio_fiscal) and (object.fname_invoice and (object.fname_invoice + ''))" |
824 | - groups="l10n_mx_facturae_groups.group_l10n_mx_facturae_user" |
825 | - menu="False"/> |
826 | - |
827 | - </data> |
828 | -</openerp> |
829 | |
830 | === removed directory 'l10n_mx_facturae_pac_sf/report' |
831 | === removed file 'l10n_mx_facturae_pac_sf/report/__init__.py' |
832 | --- l10n_mx_facturae_pac_sf/report/__init__.py 2012-02-13 21:19:14 +0000 |
833 | +++ l10n_mx_facturae_pac_sf/report/__init__.py 1970-01-01 00:00:00 +0000 |
834 | @@ -1,28 +0,0 @@ |
835 | -# -*- encoding: utf-8 -*- |
836 | -########################################################################### |
837 | -# Module Writen to OpenERP, Open Source Management Solution |
838 | -# |
839 | -# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com |
840 | -# All Rights Reserved. |
841 | -# info Vauxoo (info@vauxoo.com) |
842 | -############################################################################ |
843 | -# Coded by: moylop260 (moylop260@vauxoo.com) |
844 | -# Financed by: http://www.sfsoluciones.com (aef@sfsoluciones.com) |
845 | -############################################################################ |
846 | -# |
847 | -# This program is free software: you can redistribute it and/or modify |
848 | -# it under the terms of the GNU Affero General Public License as |
849 | -# published by the Free Software Foundation, either version 3 of the |
850 | -# License, or (at your option) any later version. |
851 | -# |
852 | -# This program is distributed in the hope that it will be useful, |
853 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
854 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
855 | -# GNU Affero General Public License for more details. |
856 | -# |
857 | -# You should have received a copy of the GNU Affero General Public License |
858 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
859 | -# |
860 | -############################################################################## |
861 | - |
862 | -import invoice_facturae_pac_sf_pdf |
863 | |
864 | === removed file 'l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.py' |
865 | --- l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.py 2013-05-15 16:09:43 +0000 |
866 | +++ l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.py 1970-01-01 00:00:00 +0000 |
867 | @@ -1,287 +0,0 @@ |
868 | -# -*- encoding: utf-8 -*- |
869 | -########################################################################### |
870 | -# Module Writen to OpenERP, Open Source Management Solution |
871 | -# |
872 | -# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com |
873 | -# All Rights Reserved. |
874 | -# info Vauxoo (info@vauxoo.com) |
875 | -############################################################################ |
876 | -# Coded by: moylop260 (moylop260@vauxoo.com) |
877 | -# Financed by: http://www.sfsoluciones.com (aef@sfsoluciones.com) |
878 | -############################################################################ |
879 | -# |
880 | -# This program is free software: you can redistribute it and/or modify |
881 | -# it under the terms of the GNU Affero General Public License as |
882 | -# published by the Free Software Foundation, either version 3 of the |
883 | -# License, or (at your option) any later version. |
884 | -# |
885 | -# This program is distributed in the hope that it will be useful, |
886 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
887 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
888 | -# GNU Affero General Public License for more details. |
889 | -# |
890 | -# You should have received a copy of the GNU Affero General Public License |
891 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
892 | -# |
893 | -############################################################################## |
894 | - |
895 | -from openerp.report import report_sxw |
896 | -from openerp import pooler |
897 | -from openerp import tools |
898 | -# from amount_to_text_es import amount_to_text as amount_to_text_class |
899 | - |
900 | -# amount_to_text = amount_to_text_obj.amount_to_text |
901 | -# amount_to_text = amount_to_text_obj.amount_to_text_cheque |
902 | - |
903 | -# sql_delete_report = "DELETE FROM ir_act_report_xml WHERE report_name = |
904 | -# 'account.invoice.facturae.pdf'"--Si no toma la actualizacion del reporte |
905 | -# xml, borrarlo directamente desde la base de datos, con este script. |
906 | - |
907 | - |
908 | -class account_invoice_facturae_pac_sf_pdf(report_sxw.rml_parse): |
909 | - def __init__(self, cr, uid, name, context): |
910 | - super(account_invoice_facturae_pac_sf_pdf, self).__init__( |
911 | - cr, uid, name, context=context) |
912 | - self.localcontext.update({ |
913 | - 'set_global_data': self._set_global_data, |
914 | - 'facturae_data_dict': self._facturae_data_dict, |
915 | - #'amount_to_text': self._get_amount_to_text, |
916 | - 'split_string': self._split_string, |
917 | - 'company_address': self._company_address, |
918 | - 'subcompany_address': self._subcompany_address, |
919 | - 'get_invoice_sequence': self._get_invoice_sequence, |
920 | - 'get_approval': self._get_approval, |
921 | - 'get_taxes': self._get_taxes, |
922 | - 'get_taxes_ret': self._get_taxes_ret, |
923 | - 'float': float, |
924 | - 'exists_key': self._exists_key, |
925 | - 'get_data_partner': self._get_data_partner, |
926 | - }) |
927 | - self.taxes = [] |
928 | - |
929 | - def _exists_key(self, key): |
930 | - return key in self.invoice._columns |
931 | - """ |
932 | - try: |
933 | - str= 'self.invoice.'+key |
934 | - if eval(str): |
935 | - return True |
936 | - except: |
937 | - return False |
938 | - """ |
939 | - |
940 | - def _set_global_data(self, o): |
941 | - try: |
942 | - self.setLang(o.partner_id.lang) |
943 | - except Exception, e: |
944 | - print "exception: %s" % (e) |
945 | - pass |
946 | - try: |
947 | - self._get_company_address(o.id) |
948 | - except Exception, e: |
949 | - print "exception: %s" % (e) |
950 | - pass |
951 | - try: |
952 | - self._get_facturae_data_dict(o) |
953 | - except Exception, e: |
954 | - print "exception: %s" % (e) |
955 | - pass |
956 | - return "" |
957 | - |
958 | - def _get_approval(self): |
959 | - return self.approval |
960 | - |
961 | - def _get_invoice_sequence(self): |
962 | - return self.sequence |
963 | - |
964 | - def _set_invoice_sequence_and_approval(self, invoice_id): |
965 | - # TinyERP Compatibility |
966 | - context = {} |
967 | - pool = pooler.get_pool(self.cr.dbname) |
968 | - invoice_obj = pool.get('account.invoice') |
969 | - sequence_obj = pool.get('ir.sequence') |
970 | - approval_obj = pool.get('ir.sequence.approval') |
971 | - # invoice = invoice_obj.browse(self.cr, self.uid, invoice_id) |
972 | - sequence_id = invoice_obj._get_invoice_sequence( |
973 | - self.cr, self.uid, [invoice_id])[invoice_id] |
974 | - sequence = sequence_obj.browse(self.cr, self.uid, [sequence_id])[0] |
975 | - self.sequence = sequence |
976 | - |
977 | - invoice = invoice_obj.browse(self.cr, self.uid, [invoice_id])[0] |
978 | - context.update({'number_work': invoice.number}) |
979 | - approval_id = sequence_obj._get_current_approval( |
980 | - self.cr, self.uid, [sequence_id], context=context)[sequence_id] |
981 | - approval = approval_obj.browse(self.cr, self.uid, [approval_id])[0] |
982 | - self.approval = approval |
983 | - return sequence, approval |
984 | - |
985 | - def _get_taxes(self): |
986 | - return self.taxes |
987 | - |
988 | - def _get_taxes_ret(self): |
989 | - try: |
990 | - return self.taxes_ret |
991 | - except: |
992 | - pass |
993 | - return [] |
994 | - |
995 | - ''' |
996 | - def _set_taxes(self, invoice_id): |
997 | - """ |
998 | - pool = pooler.get_pool(self.cr.dbname) |
999 | - invoice_obj = pool.get('account.invoice') |
1000 | - invoice = invoice_obj.browse(self.cr, self.uid, [invoice_id])[0] |
1001 | - taxes = [] |
1002 | - for line_tax_id in invoice.tax_line: |
1003 | - tax_name = line_tax_id.name.lower().replace('.','').replace( |
1004 | - '-','').replace(' ', '') |
1005 | - if tax_name in ['iva']: |
1006 | - tax_name = 'IVA' |
1007 | - elif 'isr' in tax_name: |
1008 | - tax_name = 'ISR' |
1009 | - elif 'ieps' in tax_name: |
1010 | - tax_name = 'IEPS' |
1011 | - tax_names.append( tax_name ) |
1012 | - taxes.append({ |
1013 | - 'name': tax_name, |
1014 | - 'rate': "%.2f"%( round( line_tax_id.amount/( |
1015 | - invoice.amount_total-line_tax_id.amount)*100, 0) ), |
1016 | - 'amount': "%.2f"%( line_tax_id.amount or 0.0), |
1017 | - }) |
1018 | - """ |
1019 | - self.taxes = self.invoice_data_dict['Comprobante']['Impuestos']['Traslados'] |
1020 | - #self.taxes = taxes |
1021 | - return taxes |
1022 | - ''' |
1023 | - |
1024 | - def _split_string(self, string, length=75): |
1025 | - if string: |
1026 | - for i in range(0, len(string), length): |
1027 | - string = string[:i] + ' ' + string[i:] |
1028 | - return string |
1029 | - """ |
1030 | - def _get_amount_to_text(self, amount, lang, currency=""): |
1031 | - if currency.upper() in ('MXP', 'MXN', 'PESOS', 'PESOS MEXICANOS'): |
1032 | - sufijo = 'M. N.' |
1033 | - currency = 'PESOS' |
1034 | - else: |
1035 | - sufijo = 'M. E.' |
1036 | - #return amount_to_text(amount, lang, currency) |
1037 | - amount_text = amount_to_text(amount, currency, sufijo) |
1038 | - amount_text = amount_text and amount_text.upper() or '' |
1039 | - return amount_text |
1040 | - """ |
1041 | - def _get_company_address(self, invoice_id): |
1042 | - pool = pooler.get_pool(self.cr.dbname) |
1043 | - invoice_obj = pool.get('account.invoice') |
1044 | - partner_obj = pool.get('res.partner') |
1045 | - address_obj = pool.get('res.partner') |
1046 | - invoice = invoice_obj.browse(self.cr, self.uid, invoice_id) |
1047 | - partner_id = invoice.company_id.parent_id and invoice.company_id.\ |
1048 | - parent_id.partner_id.id or invoice.company_id.partner_id.id |
1049 | - self.invoice = invoice |
1050 | - # print "partner_id",partner_id |
1051 | - # invoice = partner_obj.browse(cr, uid, invoice_id) |
1052 | - address_id = partner_obj.address_get( |
1053 | - self.cr, self.uid, [partner_id], ['invoice'])['invoice'] |
1054 | - self.company_address_invoice = address_obj.browse( |
1055 | - self.cr, self.uid, partner_id) |
1056 | - |
1057 | - subpartner_id = invoice.company_id.partner_id.id |
1058 | - if partner_id == subpartner_id: |
1059 | - self.subcompany_address_invoice = self.company_address_invoice |
1060 | - else: |
1061 | - subaddress_id = partner_obj.address_get( |
1062 | - self.cr, self.uid, [subpartner_id], ['invoice'])['invoice'] |
1063 | - self.subcompany_address_invoice = address_obj.browse( |
1064 | - self.cr, self.uid, subaddress_id) |
1065 | - # print "self.company_address_invoice",self.company_address_invoice |
1066 | - # print "self.company_address_invoice[0]",self.company_address_invoice[0] |
1067 | - # self.company_address_invoice = self.company_address_invoice and self.company_address_invoice[0] or False |
1068 | - # print "self.company_address_invoice",self.company_address_invoice |
1069 | - # return [self.company_address_invoice] |
1070 | - return "" |
1071 | - |
1072 | - def _company_address(self): |
1073 | - # print "self.company_address_invoice",self.company_address_invoice |
1074 | - return self.company_address_invoice |
1075 | - |
1076 | - def _subcompany_address(self): |
1077 | - return self.subcompany_address_invoice |
1078 | - |
1079 | - def _facturae_data_dict(self): |
1080 | - # print "self.invoice_data_dict",self.invoice_data_dict |
1081 | - return self.invoice_data_dict |
1082 | - |
1083 | - def _get_facturae_data_dict(self, invoice): |
1084 | - self._set_invoice_sequence_and_approval(invoice.id) |
1085 | - self.taxes = [ |
1086 | - tax for tax in invoice.tax_line if tax.tax_percent >= 0.0] |
1087 | - self.taxes_ret = [ |
1088 | - tax for tax in invoice.tax_line if tax.tax_percent < 0.0] |
1089 | - return "" |
1090 | - """ |
1091 | - def _get_facturae_data_dict(self, invoice_id): |
1092 | - pool = pooler.get_pool(self.cr.dbname) |
1093 | - invoice_obj = pool.get('account.invoice') |
1094 | - invoice_tax = pool.get('account.invoice.tax') |
1095 | - self.invoice_data_dict = invoice_obj._get_facturae_invoice_xml_data( |
1096 | - self.cr, self.uid, [invoice_id], context={'type_data': 'dict'}) |
1097 | - self._set_invoice_sequence_and_approval( invoice_id ) |
1098 | - try: |
1099 | - self.taxes = [ traslado['Traslado'] for traslado in self.\ |
1100 | - invoice_data_dict['Comprobante']['Impuestos']['Traslados'] if ( |
1101 | - float( traslado['Traslado']['tasa'] ) >= 0.00 and traslado[ |
1102 | - 'Traslado']['impuesto']!='IEPS') or (traslado['Traslado'][ |
1103 | - 'impuesto']=='IEPS' and float(traslado['Traslado']['tasa']) > 0.01)] |
1104 | - #self.taxes.extend( self.taxes_ret ) |
1105 | - except Exception, e: |
1106 | - print "exception: %s"%( e ) |
1107 | - pass |
1108 | - |
1109 | - self.taxes_ret = [] |
1110 | - for retencion in self.invoice_data_dict['Comprobante']['Impuestos'].get( |
1111 | - 'Retenciones', []): |
1112 | - amount_untaxed = float( self.invoice_data_dict['Comprobante']['subTotal'] ) |
1113 | - tax_ret_amount = float( retencion['Retencion']['importe'] ) |
1114 | - tasa = tax_ret_amount and amount_untaxed and tax_ret_amount * 100 \ |
1115 | - / amount_untaxed or 0.0 |
1116 | - retencion['Retencion'].update({'tasa': tasa}) |
1117 | - self.taxes_ret.append( retencion['Retencion'] ) |
1118 | - return "" |
1119 | - """ |
1120 | - |
1121 | - def _get_data_partner(self, partner_id): |
1122 | - partner_obj = self.pool.get('res.partner') |
1123 | - res = {} |
1124 | - address_invoice_id = partner_obj.search(self.cr, self.uid, [( |
1125 | - 'parent_id', '=', partner_id.id), ('type', '=', 'invoice')]) |
1126 | - if address_invoice_id: |
1127 | - address_invoice = partner_obj.browse( |
1128 | - self.cr, self.uid, address_invoice_id[0]) |
1129 | - if address_invoice: |
1130 | - res.update({ |
1131 | - 'street': address_invoice.street or False, |
1132 | - 'street3': address_invoice.l10n_mx_street3 or False, |
1133 | - 'street4': address_invoice.l10n_mx_street4 or False, |
1134 | - 'street2': address_invoice.street2 or False, |
1135 | - 'city': address_invoice.city or False, |
1136 | - 'state': address_invoice.state_id and address_invoice. |
1137 | - state_id.name or False, |
1138 | - 'city2': address_invoice.l10n_mx_city2 or False, |
1139 | - 'zip': address_invoice.zip or False, |
1140 | - 'vat': 'vat_split' in address_invoice._columns and |
1141 | - address_invoice.vat_split or address_invoice.vat or False, |
1142 | - 'phone': address_invoice.phone or False, |
1143 | - 'fax': address_invoice.fax or False, |
1144 | - 'mobile': address_invoice.mobile or False, |
1145 | - }) |
1146 | - return res |
1147 | -report_sxw.report_sxw( |
1148 | - 'report.account.invoice.facturae.pac.sf.pdf', |
1149 | - 'account.invoice', |
1150 | - 'addons/l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml', |
1151 | - header=False, |
1152 | - parser=account_invoice_facturae_pac_sf_pdf, |
1153 | -) |
1154 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1155 | |
1156 | === removed file 'l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml' |
1157 | --- l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml 2013-01-22 19:02:40 +0000 |
1158 | +++ l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.rml 1970-01-01 00:00:00 +0000 |
1159 | @@ -1,420 +0,0 @@ |
1160 | -<?xml version="1.0"?> |
1161 | -<document filename="test.pdf"> |
1162 | - <template pageSize="(612.0,792.0)" title="Test" author="Martin Simon" allowSplitting="20"> |
1163 | - <pageTemplate id="first"> |
1164 | - <frame id="first" x1="57.0" y1="46.0" width="498" height="729"/> |
1165 | - </pageTemplate> |
1166 | - </template> |
1167 | - <stylesheet> |
1168 | - <blockTableStyle id="Standard_Outline"> |
1169 | - <blockAlignment value="LEFT"/> |
1170 | - <blockValign value="TOP"/> |
1171 | - </blockTableStyle> |
1172 | - <blockTableStyle id="Tabla1"> |
1173 | - <blockAlignment value="LEFT"/> |
1174 | - <blockValign value="TOP"/> |
1175 | - </blockTableStyle> |
1176 | - <blockTableStyle id="Tabla2"> |
1177 | - <blockAlignment value="LEFT"/> |
1178 | - <blockValign value="TOP"/> |
1179 | - <lineStyle kind="LINEABOVE" colorName="#000080" start="0,0" stop="0,0"/> |
1180 | - <lineStyle kind="LINEABOVE" colorName="#000080" start="1,0" stop="1,0"/> |
1181 | - </blockTableStyle> |
1182 | - <blockTableStyle id="Tabla3"> |
1183 | - <blockAlignment value="LEFT"/> |
1184 | - <blockValign value="TOP"/> |
1185 | - </blockTableStyle> |
1186 | - <blockTableStyle id="Tabla4"> |
1187 | - <blockAlignment value="LEFT"/> |
1188 | - <blockValign value="TOP"/> |
1189 | - </blockTableStyle> |
1190 | - <blockTableStyle id="Tabla5"> |
1191 | - <blockAlignment value="LEFT"/> |
1192 | - <blockValign value="TOP"/> |
1193 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/> |
1194 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
1195 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1196 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/> |
1197 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
1198 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1199 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/> |
1200 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
1201 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
1202 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/> |
1203 | - <lineStyle kind="LINEAFTER" colorName="#000000" start="3,0" stop="3,-1"/> |
1204 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> |
1205 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
1206 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/> |
1207 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1208 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/> |
1209 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1210 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/> |
1211 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
1212 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/> |
1213 | - <lineStyle kind="LINEAFTER" colorName="#000000" start="3,1" stop="3,-1"/> |
1214 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> |
1215 | - </blockTableStyle> |
1216 | - <blockTableStyle id="Tabla6"> |
1217 | - <blockAlignment value="LEFT"/> |
1218 | - <blockValign value="TOP"/> |
1219 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/> |
1220 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> |
1221 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> |
1222 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/> |
1223 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> |
1224 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> |
1225 | - <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/> |
1226 | - <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/> |
1227 | - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> |
1228 | - <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> |
1229 | - </blockTableStyle> |
1230 | - <blockTableStyle id="Tabla7"> |
1231 | - <blockAlignment value="LEFT"/> |
1232 | - <blockValign value="TOP"/> |
1233 | - </blockTableStyle> |
1234 | - <initialize> |
1235 | - <paraStyle name="all" alignment="justify"/> |
1236 | - </initialize> |
1237 | - <paraStyle name="P1" fontName="Helvetica" alignment="RIGHT"/> |
1238 | - <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
1239 | - <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10"/> |
1240 | - <paraStyle name="P4" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT"/> |
1241 | - <paraStyle name="P5" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER"/> |
1242 | - <paraStyle name="P6" fontName="Helvetica" fontSize="7.0" leading="9"/> |
1243 | - <paraStyle name="P7" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/> |
1244 | - <paraStyle name="P8" fontName="Helvetica-Bold" fontSize="6.0" leading="8" alignment="CENTER"/> |
1245 | - <paraStyle name="P9" fontName="Helvetica" textColor="#280099"/> |
1246 | - <paraStyle name="P10" fontName="Helvetica" alignment="RIGHT" textColor="#280099"/> |
1247 | - <paraStyle name="P11" fontName="Helvetica" textColor="#ff3333"/> |
1248 | - <paraStyle name="P12" fontName="Helvetica" fontSize="12.0" leading="15" textColor="#800000"/> |
1249 | - <paraStyle name="P13" fontName="Helvetica" fontSize="2.0" leading="3" textColor="#800000"/> |
1250 | - <paraStyle name="P14" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1251 | - <paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1252 | - <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1253 | - <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1254 | - <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1255 | - <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1256 | - <paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1257 | - <paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1258 | - <paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1259 | - <paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1260 | - <paraStyle name="P24" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1261 | - <paraStyle name="P25" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="18.0" leading="22" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1262 | - <paraStyle name="P26" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1263 | - <paraStyle name="P27" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1264 | - <paraStyle name="P28" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
1265 | - <paraStyle name="P29" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/> |
1266 | - <paraStyle name="P30" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
1267 | - <paraStyle name="P31" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1268 | - <paraStyle name="Standard" fontName="Helvetica"/> |
1269 | - <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
1270 | - <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1271 | - <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
1272 | - <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/> |
1273 | - <paraStyle name="Index" fontName="Helvetica"/> |
1274 | - <paraStyle name="Table Contents" fontName="Helvetica"/> |
1275 | - <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> |
1276 | - <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1277 | - <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
1278 | - <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/> |
1279 | - <paraStyle name="Quotations" rightIndent="28.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="14.0"/> |
1280 | - <images/> |
1281 | - </stylesheet> |
1282 | - <story> |
1283 | - <section> |
1284 | - <para style="P31">[[ repeatIn(objects,'o') ]] <font face="Helvetica" size="9.0">[[ set_global_data(o) ]]</font></para> |
1285 | - <para style="P25">[[ o.company_emitter_id.address_invoice_parent_company_id.name or '' ]]</para> |
1286 | - <blockTable colWidths="125.0,207.0,166.0" style="Tabla1"> |
1287 | - <tr> |
1288 | - <td> |
1289 | - <para style="P30">[[ o.company_emitter_id.logo and setTag('para','image',{'width':'120.0','height':'80.0'}) ]] [[ o.company_emitter_id.logo ]]</para> |
1290 | - </td> |
1291 | - <td> |
1292 | - <para style="P27"> |
1293 | - <font color="white"> </font> |
1294 | - </para> |
1295 | - <para style="P24">Calle: [[ o.company_emitter_id.address_invoice_parent_company_id.street or '' ]] Nro. Ext: [[ o.company_emitter_id.address_invoice_parent_company_id.street3 or '' ]] Int: [[ o.company_emitter_id.address_invoice_parent_company_id.street4 or '' ]]</para> |
1296 | - <para style="P27"> |
1297 | - <font color="white"> </font> |
1298 | - </para> |
1299 | - <para style="P24">Colonia: [[ o.company_emitter_id.address_invoice_parent_company_id.street2 or '' ]]</para> |
1300 | - <para style="P27"> |
1301 | - <font color="white"> </font> |
1302 | - </para> |
1303 | - <para style="P24">Ciudad: [[ o.company_emitter_id.address_invoice_parent_company_id.city or '' ]] Estado: [[ o.company_emitter_id.address_invoice_parent_company_id.state_id and o.company_emitter_id.address_invoice_parent_company_id.state_id.name or '' ]] </para> |
1304 | - <para style="P28"> |
1305 | - <font color="white"> </font> |
1306 | - </para> |
1307 | - <para style="P24">Localidad: [[ o.company_emitter_id.address_invoice_parent_company_id.city2 or '' ]]</para> |
1308 | - <para style="P27"> |
1309 | - <font color="white"> </font> |
1310 | - </para> |
1311 | - <para style="P24">CP: [[ o.company_emitter_id.address_invoice_parent_company_id.zip or '' ]]</para> |
1312 | - <para style="P27"> |
1313 | - <font color="white"> </font> |
1314 | - </para> |
1315 | - <para style="P24">RFC: [[ o.company_emitter_id.partner_id._columns.has_key('vat_split') and o.company_emitter_id.partner_id.vat_split or o.company_emitter_id.partner_id.vat ]]</para> |
1316 | - <para style="P27"> |
1317 | - <font color="white"> </font> |
1318 | - </para> |
1319 | - <para style="P26">Teléfono(s): </para> |
1320 | - <para style="P26">[[ o.company_emitter_id.address_invoice_parent_company_id.phone or removeParentNode('para') ]]</para> |
1321 | - <para style="P26">[[ o.company_emitter_id.address_invoice_parent_company_id.fax or removeParentNode('para') ]]</para> |
1322 | - <para style="P26">[[ o.company_emitter_id.address_invoice_parent_company_id.mobile or removeParentNode('para') ]]</para> |
1323 | - </td> |
1324 | - <td> |
1325 | - <para style="P11"> |
1326 | - <font face="Helvetica" size="18.0">Folio: [[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and o.number or 'SIN FOLIO O ESTATUS NO VALIDO' ]]</font> |
1327 | - </para> |
1328 | - <para style="P13"> |
1329 | - <font color="white"> </font> |
1330 | - </para> |
1331 | - <para style="P12">[[ o.state == 'cancel' and 'FACTURA CANCELADA' ]]</para> |
1332 | - <para style="P13"> |
1333 | - <font color="white"> </font> |
1334 | - </para> |
1335 | - <para style="Table Contents">[[ o. address_issued_id and o.address_issued_id.city or '' ]], [[ o.address_issued_id.state_id and o.address_issued_id.state_id.name or '' ]] a</para> |
1336 | - <para style="Table Contents">[[ o.date_invoice_tz or '' ]]</para> |
1337 | - <para style="Table Contents">Serie: [[ get_approval() and get_approval().serie or '' ]]</para> |
1338 | - <para style="Table Contents">Aprobación: [[ get_approval() and get_approval().approval_number or '' ]]</para> |
1339 | - <para style="Table Contents">Año Aprobación:[[ get_approval() and get_approval().approval_year or '' ]]</para> |
1340 | - </td> |
1341 | - </tr> |
1342 | - </blockTable> |
1343 | - <blockTable colWidths="249.0,249.0" style="Tabla2"> |
1344 | - <tr> |
1345 | - <td> |
1346 | - <para style="P9">Receptor</para> |
1347 | - <para style="Table Contents"><font face="Helvetica">Nombre: </font>[[ o.partner_id.name ]]</para> |
1348 | - <para style="terp_default_8"><font face="Helvetica">Dirección:</font> [[ get_data_partner(o.partner_id)['street'] ]] No. Ext: [[ get_data_partner(o.partner_id)['street3'] ]] Int: [[ get_data_partner(o.partner_id)['street4'] ]]</para> |
1349 | - <para style="terp_default_8"><font face="Helvetica">Colonia:</font> [[ get_data_partner(o.partner_id)['street2'] ]]</para> |
1350 | - <para style="terp_default_8"><font face="Helvetica">Ciudad:</font> [[ get_data_partner(o.partner_id)['city'] ]] <font face="Helvetica">Estado: </font>[[ get_data_partner(o.partner_id)['state'] ]]</para> |
1351 | - <para style="terp_default_8"><font face="Helvetica">Localidad: </font>[[ get_data_partner(o.partner_id)['city2'] ]]</para> |
1352 | - <para style="terp_default_8"><font face="Helvetica">C.P.:</font> [[ get_data_partner(o.partner_id)['zip'] ]]] </para> |
1353 | - <para style="terp_default_8"><font face="Helvetica">R. F. C. :</font> [[ get_data_partner(o.partner_id)['vat'] ]]</para> |
1354 | - <para style="P29">Teléfono(s): </para> |
1355 | - <para style="P23">[[ get_data_partner(o.partner_id)['phone'] or removeParentNode('para')]]</para> |
1356 | - <para style="P23">[[ get_data_partner(o.partner_id)['fax'] or removeParentNode('para')]]</para> |
1357 | - <para style="P23">[[ get_data_partner(o.partner_id)['mobile'] or removeParentNode('para')]]</para> |
1358 | - </td> |
1359 | - <td> |
1360 | - <para style="Table Contents">Condición de pago: [[ format(o.payment_term and (o.payment_term.note or o.payment_term.name) or removeParentNode('para') ) ]]</para> |
1361 | - <para style="P3">Origen: [[ o.origin or removeParentNode('para') ]]</para> |
1362 | - <para style="P3">Expedido en:</para> |
1363 | - <para style="P3">[[ o. address_issued_id and o.address_issued_id.name or '' ]]</para> |
1364 | - <para style="P3">Calle: [[ o. address_issued_id and o.address_issued_id.street or '' ]] Nro. Ext: [[ o. address_issued_id and o.address_issued_id.street3 or '' ]] Int: [[ o. address_issued_id and o.address_issued_id.street4 or '' ]]</para> |
1365 | - <para style="P3">Colonia: [[ o. address_issued_id and o.address_issued_id.street2 or '' ]]</para> |
1366 | - <para style="P3">Ciudad: [[ o. address_issued_id and o.address_issued_id.city or '' ]]</para> |
1367 | - <para style="P3">Localidad: [[ o. address_issued_id and o.address_issued_id.city2 or '' ]]</para> |
1368 | - <para style="P3">Estado: [[ o. address_issued_id and o.address_issued_id.state_id and o.address_issued_id.state_id.name or '' ]]</para> |
1369 | - <para style="P3">CP: [[ o. address_issued_id and o.address_issued_id.zip or '' ]] </para> |
1370 | - </td> |
1371 | - </tr> |
1372 | - </blockTable> |
1373 | - <blockTable colWidths="50.0,39.0,168.0,53.0,57.0,49.0,89.0" style="Tabla3"> |
1374 | - <tr> |
1375 | - <td> |
1376 | - <para style="P9">Cantidad</para> |
1377 | - </td> |
1378 | - <td> |
1379 | - <para style="P9">Unidad</para> |
1380 | - </td> |
1381 | - <td> |
1382 | - <para style="P9">Descripción</para> |
1383 | - </td> |
1384 | - <td> |
1385 | - <para style="P9">Clave</para> |
1386 | - </td> |
1387 | - <td> |
1388 | - <para style="P10">P.Unitario</para> |
1389 | - </td> |
1390 | - <td> |
1391 | - <para style="P10">Dto %</para> |
1392 | - </td> |
1393 | - <td> |
1394 | - <para style="P10">Importe</para> |
1395 | - </td> |
1396 | - </tr> |
1397 | - <tr> |
1398 | - <td> |
1399 | - <para style="Table Contents"><font face="Helvetica" size="8.0">[[ repeatIn(o.invoice_line,'l') ]] </font>[[ formatLang(l.quantity) ]]</para> |
1400 | - </td> |
1401 | - <td> |
1402 | - <para style="Table Contents">[[ (l.uos_id and l.uos_id.name) or '' ]]</para> |
1403 | - </td> |
1404 | - <td> |
1405 | - <para style="Table Contents">[[ l.name ]]</para> |
1406 | - <para style="P6">Notas: [[l.note or removeParentNode('para')]]</para> |
1407 | - </td> |
1408 | - <td> |
1409 | - <para style="Table Contents">[[ l.product_id and l.product_id.default_code ]]</para> |
1410 | - </td> |
1411 | - <td> |
1412 | - <para style="P1">[[ formatLang(l.price_unit) ]]</para> |
1413 | - </td> |
1414 | - <td> |
1415 | - <para style="P1">[[ formatLang(l.discount)]]%</para> |
1416 | - </td> |
1417 | - <td> |
1418 | - <para style="P1">[[ exists_key('global_discount_percent') and (formatLang(l.quantity * l.price_unit, digits=get_digits(dp='Account'))) or formatLang(l.price_subtotal) ]]</para> |
1419 | - </td> |
1420 | - </tr> |
1421 | - </blockTable> |
1422 | - <blockTable colWidths="414.0,91.0" style="Tabla4"> |
1423 | - <tr> |
1424 | - <td> |
1425 | - <para style="P10">Suma $</para> |
1426 | - </td> |
1427 | - <td> |
1428 | - <para style="P1">[[formatLang( ( exists_key('global_discount_percent') and o.global_discount_amount or 0.0 ) + (o.amount_untaxed or 0.0), digits=get_digits(dp='Account') )]]</para> |
1429 | - </td> |
1430 | - </tr> |
1431 | - <tr> |
1432 | - <td> |
1433 | - <para style="P10">Descuento: [[ exists_key('global_discount_percent') and o.global_discount_percent or removeParentNode('tr')]] %</para> |
1434 | - </td> |
1435 | - <td> |
1436 | - <para style="P1">[[o.global_discount_amount and formatLang( o.global_discount_amount) or '']]</para> |
1437 | - </td> |
1438 | - </tr> |
1439 | - <tr> |
1440 | - <td> |
1441 | - <para style="P10">Sub Total $</para> |
1442 | - </td> |
1443 | - <td> |
1444 | - <para style="P1">[[ formatLang(o.amount_untaxed) ]]</para> |
1445 | - </td> |
1446 | - </tr> |
1447 | - <tr> |
1448 | - <td> |
1449 | - <para style="P10"> |
1450 | - <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes(), 'tax' ) ]]</font> |
1451 | - <font face="Helvetica">[[ tax['name2'] ]] ([[ round( float( tax['tax_percent'] ) ) or '0.0' ]]%) $</font> |
1452 | - </para> |
1453 | - </td> |
1454 | - <td> |
1455 | - <para style="P1">[[ formatLang( float( tax['amount'] ) ) ]]</para> |
1456 | - </td> |
1457 | - </tr> |
1458 | - <tr> |
1459 | - <td> |
1460 | - <para style="P10"> |
1461 | - <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes_ret(), 'tax_ret' ) ]]</font> |
1462 | - <font face="Helvetica">[[ tax_ret['name2'] ]] Ret ([[ round( float( tax_ret['tax_percent'] ),2 )*-1 ]]%) $</font> |
1463 | - </para> |
1464 | - </td> |
1465 | - <td> |
1466 | - <para style="P1">[[ formatLang( float( tax_ret['amount'] )*-1 ) ]]</para> |
1467 | - </td> |
1468 | - </tr> |
1469 | - <tr> |
1470 | - <td> |
1471 | - <para style="P10">Total $</para> |
1472 | - </td> |
1473 | - <td> |
1474 | - <para style="P1">[[ formatLang(o.amount_total) ]]</para> |
1475 | - </td> |
1476 | - </tr> |
1477 | - <tr> |
1478 | - <td> |
1479 | - <para style="P17">IMPORTE CON LETRA:</para> |
1480 | - <para style="P15">[[ o.amount_to_text ]]</para> |
1481 | - </td> |
1482 | - <td> |
1483 | - <para style="P1"> |
1484 | - <font color="white"> </font> |
1485 | - </para> |
1486 | - </td> |
1487 | - </tr> |
1488 | - </blockTable> |
1489 | - <para style="P14">PAGO EN UNA SOLA EXHIBICIÓN</para> |
1490 | - <para style="P14"> |
1491 | - <font color="white"> </font> |
1492 | - </para> |
1493 | - <para style="P14">“Este documento es una representacion impresa de un CFDI” </para> |
1494 | - <para style="P14">CFDI, Comprobante Fiscal Digital por Internet</para> |
1495 | - <para style="terp_default_9"> |
1496 | - <font color="white"> </font> |
1497 | - </para> |
1498 | - <blockTable colWidths="133.0,94.0,102.0,170.0" style="Tabla5"> |
1499 | - <tr> |
1500 | - <td> |
1501 | - <para style="P14">Certificado del emisor</para> |
1502 | - </td> |
1503 | - <td> |
1504 | - <para style="P18">Certificado del SAT</para> |
1505 | - </td> |
1506 | - <td> |
1507 | - <para style="P18">Fecha de Timbrado</para> |
1508 | - </td> |
1509 | - <td> |
1510 | - <para style="P18">Folio Fiscal</para> |
1511 | - </td> |
1512 | - </tr> |
1513 | - <tr> |
1514 | - <td> |
1515 | - <para style="P19">[[ o.no_certificado or '' ]]</para> |
1516 | - </td> |
1517 | - <td> |
1518 | - <para style="P19">[[ o.cfdi_no_certificado or '' ]]</para> |
1519 | - </td> |
1520 | - <td> |
1521 | - <para style="P19">[[ o.cfdi_fecha_timbrado or '' ]]</para> |
1522 | - </td> |
1523 | - <td> |
1524 | - <para style="P19">[[ o.cfdi_folio_fiscal or '' ]]</para> |
1525 | - </td> |
1526 | - </tr> |
1527 | - </blockTable> |
1528 | - <blockTable colWidths="159.0,170.0,170.0" style="Tabla6"> |
1529 | - <tr> |
1530 | - <td> |
1531 | - <para style="P8">Régimen Fiscal:</para> |
1532 | - <para style="P7">[[o.company_emitter_id.partner_id.regimen_fiscal_id and o.company_emitter_id.partner_id.regimen_fiscal_id.name or 'No identificado']]</para> |
1533 | - </td> |
1534 | - <td> |
1535 | - <para style="P8">Método de Pago:</para> |
1536 | - <para style="P7">[[o.pay_method_id.name or 'No identificado']]</para> |
1537 | - </td> |
1538 | - <td> |
1539 | - <para style="P8">Últimos 4 dígitos de la cuenta bancaria:</para> |
1540 | - <para style="P7">[[o.acc_payment.last_acc_number or 'No identificado']]</para> |
1541 | - </td> |
1542 | - </tr> |
1543 | - </blockTable> |
1544 | - <para style="P21"> |
1545 | - <font color="white"> </font> |
1546 | - </para> |
1547 | - <blockTable colWidths="100.0,282.0,117.0" style="Tabla7"> |
1548 | - <tr> |
1549 | - <td> |
1550 | - <para style="P2">[[ o.company_emitter_id.cif_file and setTag('para','image',{'width':'98.0','height':'161.0'}) ]] [[ o.company_emitter_id.cif_file ]]</para> |
1551 | - </td> |
1552 | - <td> |
1553 | - <para style="P14">Sello Digital Emisor:</para> |
1554 | - <para style="P16">[[ split_string( o.sello or '') ]]</para> |
1555 | - <para style="P16"> |
1556 | - <font color="white"> </font> |
1557 | - </para> |
1558 | - <para style="P14">Sello Digital SAT:</para> |
1559 | - <para style="P16">[[ split_string( o.cfdi_sello or '') ]]</para> |
1560 | - <para style="P16"> |
1561 | - <font color="white"> </font> |
1562 | - </para> |
1563 | - </td> |
1564 | - <td> |
1565 | - <para style="P4">[[ o.cfdi_cbb and setTag('para','image',{'width':'6cm','height':'6cm'}) ]] [[ o.cfdi_cbb ]]</para> |
1566 | - </td> |
1567 | - </tr> |
1568 | - </blockTable> |
1569 | - <para style="P14">Cadena Original del complemento de certificación digital del SAT:</para> |
1570 | - <para style="P20">[[ split_string( o.cfdi_cadena_original or '' ) ]]</para> |
1571 | - <para style="P5"> |
1572 | - <font color="white"> </font> |
1573 | - </para> |
1574 | - <para style="P5">Vendedor: [[o.user_id.name]]</para> |
1575 | - <para style="P22">[[ (o.comment and format(o.comment )) or removeParentNode('para') ]]</para> |
1576 | - </section> |
1577 | - </story> |
1578 | -</document> |
1579 | - |
1580 | |
1581 | === removed file 'l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.sxw' |
1582 | Binary files l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.sxw 2013-01-21 22:24:22 +0000 and l10n_mx_facturae_pac_sf/report/invoice_facturae_pac_sf_pdf.sxw 1970-01-01 00:00:00 +0000 differ |
1583 | === modified file 'l10n_mx_facturae_report/report/invoice_facturae_html.mako' |
1584 | --- l10n_mx_facturae_report/report/invoice_facturae_html.mako 2013-09-19 00:05:33 +0000 |
1585 | +++ l10n_mx_facturae_report/report/invoice_facturae_html.mako 2013-12-04 21:35:17 +0000 |
1586 | @@ -164,10 +164,10 @@ |
1587 | ${o.address_issued_id.country_id and o.address_issued_id.country_id.name or ''|entity} |
1588 | %endif |
1589 | <br/>${_("a")} ${o.date_invoice_tz or ''|entity} |
1590 | - %if o.invoice_sequence_id.approval_id.type != 'cbb': |
1591 | - ${_("Serie:")} ${get_approval() and get_approval().serie or _("Sin serie")|entity} |
1592 | - <br/>${_("Aprobación:")} ${get_approval() and get_approval().approval_number or _("Sin aprobación")|entity} |
1593 | - <br/>${_("Año Aprobación:")} ${get_approval() and get_approval().approval_year or _("No válido")|entity} |
1594 | + %if o.invoice_sequence_id.approval_id and o.invoice_sequence_id.approval_id.type != 'cbb': |
1595 | + ${_("Serie:")} ${o.invoice_sequence_id.approval_id.serie or _("Sin serie")|entity} |
1596 | + <br/>${_("Aprobación:")} ${o.invoice_sequence_id.approval_id.approval_number or _("Sin aprobación")|entity} |
1597 | + <br/>${_("Año Aprobación:")} ${o.invoice_sequence_id.approval_id.approval_year or _("No válido")|entity} |
1598 | %endif |
1599 | </td> |
1600 | </tr> |
1601 | @@ -315,35 +315,32 @@ |
1602 | </table> |
1603 | %endif |
1604 | <!--code for cbb--> |
1605 | - %if o.invoice_sequence_id.approval_id.type == 'cbb': |
1606 | - %if get_approval(): |
1607 | - <%cbb_approval_row = get_approval()%> |
1608 | - <table class="basic_table" style="page-break-inside:avoid; border:1.5px solid grey;"> |
1609 | - <tr> |
1610 | - <td width="20%" valign="top"> |
1611 | - %if ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ): |
1612 | - ${helper.embed_image('jpeg',str(o.invoice_sequence_id.approval_id.cbb_image),180, 180)} |
1613 | - %else: |
1614 | - <p> ${_('SIN FOLIO O ESTATUS NO VALIDO')} |
1615 | - %endif |
1616 | - </td> |
1617 | - <td valign="top" class="tax_td" style="padding-top:3px;"> |
1618 | - %if ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ): |
1619 | - Número de aprobación SICOFI: ${o.invoice_sequence_id.approval_id.approval_number or '' |entity}<br/> |
1620 | - %else: |
1621 | - <p> ${_('SIN FOLIO O ESTATUS NO VALIDO')}</br> |
1622 | - %endif |
1623 | - La reproducción apócrifa de este comprobante constituye un delito en los términos de las disposiciones fiscales.<br/> |
1624 | - Este comprobante tendrá una vigencia de dos años contados a partir de la fecha aprobación de la asignación de folios, la cual es: ${o.invoice_sequence_id.approval_id.date_start or '' |entity} |
1625 | - </td> |
1626 | - <td width="15%" valign="top"> |
1627 | - ${helper.embed_image('jpeg',str(o.company_emitter_id.cif_file),140, 220)} |
1628 | - </td> |
1629 | - </tr> |
1630 | - </table> |
1631 | - %else: |
1632 | - <p> ${_('La aprobación CBB no pudo ser obtenida, por favor contacte a su administrador')} |
1633 | - %endif |
1634 | + %if o.invoice_sequence_id.approval_id and o.invoice_sequence_id.approval_id.type == 'cbb': |
1635 | + <table class="basic_table" style="page-break-inside:avoid; border:1.5px solid grey;"> |
1636 | + <tr> |
1637 | + <td width="20%" valign="top"> |
1638 | + %if ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ): |
1639 | + ${helper.embed_image('jpeg',str(o.invoice_sequence_id.approval_id.cbb_image),180, 180)} |
1640 | + %else: |
1641 | + <p> ${_('SIN FOLIO O ESTATUS NO VALIDO')} |
1642 | + %endif |
1643 | + </td> |
1644 | + <td valign="top" class="tax_td" style="padding-top:3px;"> |
1645 | + %if ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ): |
1646 | + Número de aprobación SICOFI: ${o.invoice_sequence_id.approval_id.approval_number or '' |entity}<br/> |
1647 | + %else: |
1648 | + <p> ${_('SIN FOLIO O ESTATUS NO VALIDO')}</br> |
1649 | + %endif |
1650 | + La reproducción apócrifa de este comprobante constituye un delito en los términos de las disposiciones fiscales.<br/> |
1651 | + Este comprobante tendrá una vigencia de dos años contados a partir de la fecha aprobación de la asignación de folios, la cual es: ${o.invoice_sequence_id.approval_id.date_start or '' |entity} |
1652 | + </td> |
1653 | + <td width="15%" valign="top"> |
1654 | + ${helper.embed_image('jpeg',str(o.company_emitter_id.cif_file),140, 220)} |
1655 | + </td> |
1656 | + </tr> |
1657 | + </table> |
1658 | + %else: |
1659 | + <p> ${_('La aprobación CBB no pudo ser obtenida, por favor contacte a su administrador')} |
1660 | %endif |
1661 | <!--code for cfd22--> |
1662 | %if o.invoice_sequence_id.approval_id.type == 'cfd22': |
1663 | @@ -369,7 +366,6 @@ |
1664 | %if 'cfdi' in o.invoice_sequence_id.approval_id.type: |
1665 | <div style="page-break-inside:avoid; border:1.5px solid grey;"> |
1666 | <table width="100%" class="datos_fiscales"> |
1667 | - <%data_certificate=get_data_certificate(o.id)%> |
1668 | <tr> |
1669 | %if o.company_emitter_id.cif_file: |
1670 | <td align="left"> |
1671 | @@ -393,7 +389,7 @@ |
1672 | <b>${_('Cadena original:')} </b><br/> |
1673 | ${split_string(o.cfdi_cadena_original) or ''|entity}</br> |
1674 | <b>${_('Enlace al certificado: ')}</b></br> |
1675 | - ${data_certificate['certificate_link'] or ''|entity}</p> |
1676 | + ${o.pac_id and o.pac_id.certificate_link or ''|entity}</p> |
1677 | </td> |
1678 | %if o.cfdi_cbb: |
1679 | <td align="right"> |
1680 | |
1681 | === modified file 'l10n_mx_facturae_report/report/invoice_facturae_html.py' |
1682 | --- l10n_mx_facturae_report/report/invoice_facturae_html.py 2013-09-17 20:18:49 +0000 |
1683 | +++ l10n_mx_facturae_report/report/invoice_facturae_html.py 2013-12-04 21:35:17 +0000 |
1684 | @@ -46,8 +46,6 @@ |
1685 | 'split_string': self._split_string, |
1686 | 'company_address': self._company_address, |
1687 | 'subcompany_address': self._subcompany_address, |
1688 | - 'get_invoice_sequence': self._get_invoice_sequence, |
1689 | - 'get_approval': self._get_approval, |
1690 | 'get_taxes': self._get_taxes, |
1691 | 'get_taxes_ret': self._get_taxes_ret, |
1692 | 'float': float, |
1693 | @@ -55,7 +53,6 @@ |
1694 | 'get_data_partner': self._get_data_partner, |
1695 | 'get_sum_total': self._get_sum_total, |
1696 | 'has_disc': self._has_disc, |
1697 | - 'get_data_certificate': self._get_data_certificate, |
1698 | 'get_text_promissory' : self._get_text_promissory, |
1699 | }) |
1700 | self.taxes = [] |
1701 | @@ -84,35 +81,8 @@ |
1702 | except Exception, e: |
1703 | print "exception: %s" % (e) |
1704 | pass |
1705 | - try: |
1706 | - self._get_data_certificate(o.id) |
1707 | - except Exception, e: |
1708 | - print "exception: %s" % (e) |
1709 | - pass |
1710 | return "" |
1711 | |
1712 | - def _get_approval(self): |
1713 | - return self.approval |
1714 | - |
1715 | - def _get_invoice_sequence(self): |
1716 | - return self.sequence |
1717 | - |
1718 | - def _set_invoice_sequence_and_approval(self, invoice_id): |
1719 | - context = {} |
1720 | - pool = pooler.get_pool(self.cr.dbname) |
1721 | - invoice_obj = pool.get('account.invoice') |
1722 | - sequence_obj = pool.get('ir.sequence') |
1723 | - invoice = invoice_obj.browse(self.cr, self.uid, [ |
1724 | - invoice_id], context=context)[0] |
1725 | - context.update({'number_work': invoice.number}) |
1726 | - sequence = invoice.invoice_sequence_id or False |
1727 | - sequence_id = sequence and sequence.id or False |
1728 | - self.sequence = sequence |
1729 | - approval = sequence and sequence.approval_id or False |
1730 | - approval_id = approval and approval.id or False |
1731 | - self.approval = approval |
1732 | - return sequence, approval |
1733 | - |
1734 | def _get_taxes(self): |
1735 | return self.taxes |
1736 | |
1737 | @@ -163,7 +133,6 @@ |
1738 | return self.invoice_data_dict |
1739 | |
1740 | def _get_facturae_data_dict(self, invoice): |
1741 | - self._set_invoice_sequence_and_approval(invoice.id) |
1742 | self.taxes = [ |
1743 | tax for tax in invoice.tax_line if tax.tax_percent >= 0.0] |
1744 | self.taxes_ret = [ |
1745 | @@ -221,24 +190,6 @@ |
1746 | break |
1747 | return discount |
1748 | |
1749 | - def _get_data_certificate(self, invoice_id): |
1750 | - pool = pooler.get_pool(self.cr.dbname) |
1751 | - invoice_obj = pool.get('account.invoice') |
1752 | - pac_params_obj = self.pool.get('params.pac') |
1753 | - res={} |
1754 | - invoice = invoice_obj.browse(self.cr, self.uid, invoice_id) |
1755 | - pac_params_ids = pac_params_obj.search(self.cr, self.uid, [ |
1756 | - ('method_type', '=', 'pac_sf_firmar'), |
1757 | - ('company_id', '=', invoice.company_id.id), |
1758 | - ('active', '=', True)], limit=1, context={}) |
1759 | - pac_params_id = pac_params_ids and pac_params_ids[0] or False |
1760 | - if pac_params_id: |
1761 | - data_pac = pac_params_obj.browse(self.cr, self.uid, pac_params_id) |
1762 | - res.update({ |
1763 | - 'certificate_link' : data_pac.certificate_link or False, |
1764 | - }) |
1765 | - return res |
1766 | - |
1767 | def _get_text_promissory(self, company, partner, address_emitter, invoice): |
1768 | text = '' |
1769 | context = {} |