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

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 275
Proposed branch: lp:~vauxoo/openerp-mexico-localization/7.0-field_not_move_diot_dev_luis
Merge into: lp:openerp-mexico-localization/7.0
Diff against target: 39 lines (+2/-20)
1 file modified
l10n_mx_diot_report/wizard/wizard_diot_report.py (+2/-20)
To merge this branch: bzr merge lp:~vauxoo/openerp-mexico-localization/7.0-field_not_move_diot_dev_luis
Reviewer Review Type Date Requested Status
Isaac López Zúñiga Pending
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+183033@code.launchpad.net

Description of the change

Se agrego un campo en otro modulo, para indicar que el movimiento no será considerado para el reporte del DIOT, aqui se agrego la validación que no tome los movimoentos que tienen activo este campo.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_mx_diot_report/wizard/wizard_diot_report.py'
2--- l10n_mx_diot_report/wizard/wizard_diot_report.py 2013-08-25 07:03:10 +0000
3+++ l10n_mx_diot_report/wizard/wizard_diot_report.py 2013-08-29 21:17:49 +0000
4@@ -101,7 +101,8 @@
5 ('period_id', '=', period.id),
6 ('tax_id_secondary', 'in', tax_purchase_ids),
7 ('state', '=', 'valid'),
8- ('account_id', 'in', account_ids_tax)])
9+ ('account_id', 'in', account_ids_tax),
10+ ('not_move_diot', '=', False)])
11 dic_move_line = {}
12 partner_ids_to_fix = []
13 moves_without_partner = []
14@@ -265,25 +266,6 @@
15 'tax Withheld by the taxpayer',
16 'VAT for returns, discounts and rebates on purchases',
17 'show_pipe', ], delimiter=',')
18- for diot in dic_move_line:
19- diot_list = dic_move_line.get(diot, False)
20- if diot_list and sum(diot_list[7:12]) == 0:
21- partner_ids_tax_0.append(self.pool.get('res.partner').search(
22- cr, uid, [('vat_split', '=', diot)])[0])
23- if partner_ids_tax_0:
24- account_move_line_id = acc_move_line_obj.search(cr, uid, [
25- ('partner_id', 'in', partner_ids_tax_0),
26- ('period_id', '=', period.id),
27- ('id', 'in', move_lines_diot)
28- ])
29- return {
30- 'name': 'Movements to corroborate the amounts of taxes',
31- 'view_type': 'form',
32- 'view_mode': 'tree,form',
33- 'res_model': 'account.move.line',
34- 'type': 'ir.actions.act_window',
35- 'domain': [('id', 'in', account_move_line_id)],
36- }
37 fcsv_csv.writerow(
38 {'type_of_third' : 'Tipo de tercero', 'type_of_operation' :\
39 'Tipo de operación', 'vat' : 'RFC', 'number_id_fiscal' : \