Merge lp:~vauxoo/addons-vauxoo/7.0-diot_changes-dev-julio into lp:addons-vauxoo/7.0

Proposed by Julio Serna-http://www.vauxoo.com
Status: Merged
Merged at revision: 934
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-diot_changes-dev-julio
Merge into: lp:addons-vauxoo/7.0
Diff against target: 39 lines (+6/-5)
2 files modified
account_update_amount_tax_in_move_lines/wizard/update_amount_base_tax_wizard.py (+5/-4)
account_voucher_tax/account_voucher.py (+1/-1)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-diot_changes-dev-julio
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+195305@code.launchpad.net

Description of the change

Agrega condición en las validaciones cuando el impuesto es IVA-PART y en los impuestos exento

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 'account_update_amount_tax_in_move_lines/wizard/update_amount_base_tax_wizard.py'
2--- account_update_amount_tax_in_move_lines/wizard/update_amount_base_tax_wizard.py 2013-10-24 00:06:21 +0000
3+++ account_update_amount_tax_in_move_lines/wizard/update_amount_base_tax_wizard.py 2013-11-14 20:33:56 +0000
4@@ -85,7 +85,7 @@
5 company_id = self.pool.get('res.company')._company_default_get(cr, uid,
6 'update.amount.tax.wizard', context=context)
7 category_iva_ids = acc_tax_category_obj.search(cr, uid, [\
8- ('name', 'in', ('IVA', 'IVA-EXENTO', 'IVA-RET'))], context=context)
9+ ('name', 'in', ('IVA', 'IVA-EXENTO', 'IVA-RET', 'IVA-PART'))], context=context)
10 tax_ids = acc_tax_obj.search(cr, uid, [
11 ('company_id', '=' ,company_id),
12 ('type_tax_use', '=', 'purchase'),
13@@ -111,9 +111,10 @@
14 SET amount_base = %s
15 WHERE id = %s""", (abs(amount_base/amount_tax), move.id))
16 else:
17- cr.execute("""UPDATE account_move_line
18- SET amount_base = %s
19- WHERE id = %s""", (amount_base, move.id))
20+ if amount_base:
21+ cr.execute("""UPDATE account_move_line
22+ SET amount_base = %s
23+ WHERE id = %s""", (amount_base, move.id))
24 lines_incorects_ids = move_line_obj.search(cr, uid, [('company_id', '=', company_id),
25 ('amount_base', '!=', False), ('tax_id_secondary', '=', False)], context=context)
26 for line in lines_incorects_ids:
27
28=== modified file 'account_voucher_tax/account_voucher.py'
29--- account_voucher_tax/account_voucher.py 2013-11-01 19:08:32 +0000
30+++ account_voucher_tax/account_voucher.py 2013-11-14 20:33:56 +0000
31@@ -405,7 +405,7 @@
32 amount_base = 0
33 tax_secondary = False
34 if line_tax and line_tax.tax_category_id and line_tax.tax_category_id.name in (\
35- 'IVA', 'IVA-EXENTO', 'IVA-RET'):
36+ 'IVA', 'IVA-EXENTO', 'IVA-RET', 'IVA-PART'):
37 amount_base = line_tax.tax_category_id.value_tax and\
38 reference_amount/line_tax.tax_category_id.value_tax\
39 or amount_base_tax