Merge lp:~vauxoo/openerp-mexico-localization/7.0_l10n_mx_diot_report_tax_diot-dev_luis into lp:openerp-mexico-localization/7.0

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 315
Proposed branch: lp:~vauxoo/openerp-mexico-localization/7.0_l10n_mx_diot_report_tax_diot-dev_luis
Merge into: lp:openerp-mexico-localization/7.0
Diff against target: 39 lines (+16/-9)
1 file modified
l10n_mx_diot_report/wizard/wizard_diot_report.py (+16/-9)
To merge this branch: bzr merge lp:~vauxoo/openerp-mexico-localization/7.0_l10n_mx_diot_report_tax_diot-dev_luis
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Needs Information
Review via email: mp+187121@code.launchpad.net

Description of the change

Se agrego que también se consideren los montos de los impuestos que afectan impuestos que se reportan al diot

To post a comment you must log in.
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

LuisT,
Porque validas el monto base del diot cuando lo que queremos validar son los porcentajes o tipos de impuestos?

review: Needs Information

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_mx_diot_report/wizard/wizard_diot_report.py'
2--- l10n_mx_diot_report/wizard/wizard_diot_report.py 2013-09-02 22:01:57 +0000
3+++ l10n_mx_diot_report/wizard/wizard_diot_report.py 2013-09-24 00:01:24 +0000
4@@ -139,19 +139,26 @@
5 continue
6 if line.date >= period.date_start and line.date <= period.date_stop:
7 amount_0 = amount_16 = amount_exe = amount_11 = amount_ret = 0
8- if line.tax_id_secondary.tax_category_id.name == 'IVA' and\
9- line.tax_id_secondary.amount == 0.16:
10+ category = line.tax_id_secondary.tax_category_id.name or False
11+ amount_base = line.tax_id_secondary.amount or 0
12+ line_diot = False
13+ if (category == 'IVA' and amount_base in [0.16, 0.11, 0]) or\
14+ (category == 'IVA-EXENTO' and amount_base == 0) or category == 'IVA-RET':
15+ line_diot = True
16+ if category == 'IVA' and amount_base == 0.16 or\
17+ line.tax_id_secondary.tax_diot == 'tax_16' and line_diot == False:
18 amount_16 = line.amount_base or 0
19- if line.tax_id_secondary.tax_category_id.name == 'IVA' and\
20- line.tax_id_secondary.amount == 0.11:
21+ if category == 'IVA' and amount_base == 0.11 or\
22+ line.tax_id_secondary.tax_diot == 'tax_11' and line_diot == False:
23 amount_11 = line.amount_base or 0
24- if line.tax_id_secondary.tax_category_id.name == 'IVA' and\
25- line.tax_id_secondary.amount == 0:
26+ if category == 'IVA' and amount_base == 0 or\
27+ line.tax_id_secondary.tax_diot == 'tax_0' and line_diot == False:
28 amount_0 = line.amount_base or 0
29- if line.tax_id_secondary.tax_category_id.name == 'IVA-EXENTO'\
30- and line.tax_id_secondary.amount == 0:
31+ if category == 'IVA-EXENTO' and amount_base == 0 or\
32+ line.tax_id_secondary.tax_diot == 'tax_exe' and line_diot == False:
33 amount_exe = line.amount_base or 0
34- if line.tax_id_secondary.tax_category_id.name == 'IVA-RET':
35+ if category == 'IVA-RET' or line.tax_id_secondary.tax_diot == 'tax_ret' and\
36+ line_diot == False:
37 amount_ret = line.credit or 0
38 if amount_0 + amount_16 + amount_exe + amount_11 + amount_ret == 0:
39 moves_amount_0.append(line.id)