Merge lp:~vauxoo/openerp-mexico-localization/l10n_mx_invoice_tax_ref_2parte_dev_juan_carlos into lp:openerp-mexico-localization

Proposed by Juan Carlos Hernandez
Status: Rejected
Rejected by: Moisés López - http://www.vauxoo.com
Proposed branch: lp:~vauxoo/openerp-mexico-localization/l10n_mx_invoice_tax_ref_2parte_dev_juan_carlos
Merge into: lp:openerp-mexico-localization
Diff against target: 50 lines (+11/-11)
2 files modified
l10n_mx_invoice_tax_ref/__openerp__.py (+2/-0)
l10n_mx_invoice_tax_ref/invoice.py (+9/-11)
To merge this branch: bzr merge lp:~vauxoo/openerp-mexico-localization/l10n_mx_invoice_tax_ref_2parte_dev_juan_carlos
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Disapprove
Juan Carlos Hernandez (community) Needs Resubmitting
Isaac López Zúñiga Pending
Review via email: mp+118638@code.launchpad.net

Description of the change

se modifico modulo l10n_mx_invoice_tax_ref,para solucionar el impuesto

To post a comment you must log in.
185. By Juan Carlos Hernandez

[IMP][l10n_mx_invoice_tax_ref] add depends

Revision history for this message
Juan Carlos Hernandez (openerp1) wrote :

add depends

review: Needs Resubmitting
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

mp applied in other mp

review: Disapprove

Unmerged revisions

185. By Juan Carlos Hernandez

[IMP][l10n_mx_invoice_tax_ref] add depends

184. By Juan Carlos Hernandez

[IMP][l10n_mx_invoice_tax_ref] fix module

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_mx_invoice_tax_ref/__openerp__.py'
2--- l10n_mx_invoice_tax_ref/__openerp__.py 2012-03-24 04:52:41 +0000
3+++ l10n_mx_invoice_tax_ref/__openerp__.py 2012-08-07 21:43:19 +0000
4@@ -36,6 +36,8 @@
5 "license" : "AGPL-3",
6 "depends" : [
7 "account",
8+ "account_invoice_tax",
9+ "account_tax_category",
10 ],
11 "init_xml" : [],
12 "demo_xml" : [],
13
14=== modified file 'l10n_mx_invoice_tax_ref/invoice.py'
15--- l10n_mx_invoice_tax_ref/invoice.py 2012-07-05 16:51:07 +0000
16+++ l10n_mx_invoice_tax_ref/invoice.py 2012-08-07 21:43:19 +0000
17@@ -35,24 +35,22 @@
18
19 class account_invoice_tax(osv.osv):
20 _inherit= "account.invoice.tax"
21-
22+
23 def _get_tax_data(self, cr, uid, ids, field_names=None, arg=False, context={}):
24 if not context:
25 context = {}
26 res = {}
27 for invoice_tax in self.browse(cr, uid, ids, context=context):
28 res[invoice_tax.id] = {}
29- tax_name = invoice_tax.name.lower().replace('.','').replace(' ', '').replace('-', '')
30- tax_percent = invoice_tax.amount and invoice_tax.base and invoice_tax.amount*100.0 / abs( invoice_tax.base ) or 0.0
31- if 'iva' in tax_name:
32- tax_name = 'IVA'
33+ code = invoice_tax.tax_id.tax_category_id.code.replace('.','').replace(' ', '').replace('-', '')
34+ type_tax = invoice_tax.tax_id.type
35+ if type_tax=='percent':
36+ tax_percent = invoice_tax.tax_id.amount
37 if tax_percent > 0:
38- tax_percent = round(tax_percent, 0)#Hay problemas de decimales al calcular el iva, y hasta ahora el iva no tiene decimales
39- elif 'isr' in tax_name:
40- tax_name = 'ISR'
41- elif 'ieps' in tax_name:
42- tax_name = 'IEPS'
43- res[invoice_tax.id]['name2'] = tax_name
44+ tax_percent = tax_percent
45+ else:
46+ break
47+ res[invoice_tax.id]['name2'] = code
48 res[invoice_tax.id]['tax_percent'] = tax_percent
49 #res[invoice_tax.id]['amount'] = invoice_tax.amount
50 return res