Merge lp:~vauxoo/addons-vauxoo/sale-order-report into lp:addons-vauxoo

Proposed by Miguel Delgado (Vauxoo)
Status: Merged
Merged at revision: 253
Proposed branch: lp:~vauxoo/addons-vauxoo/sale-order-report
Merge into: lp:addons-vauxoo
Diff against target: 88 lines (+26/-12) (has conflicts)
2 files modified
vauxoo_reports/sale_order_report/report/vauxoo.py (+15/-11)
vauxoo_reports/sale_order_report/report/vauxoo.rml (+11/-1)
Text conflict in vauxoo_reports/sale_order_report/report/vauxoo.rml
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/sale-order-report
Reviewer Review Type Date Requested Status
Gabriela Quilarque Pending
Review via email: mp+107227@code.launchpad.net

Description of the change

Se cambio el reporte de ordenes de venta de manera que si no existe algún campo en el formulario de las ordenes de venta no se produzcan errores en el reporte, adicional a esto se agregaron los impuestos al valor agregado para que aparezca reflejado en dicho reporte.

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 'vauxoo_reports/sale_order_report/report/vauxoo.py'
2--- vauxoo_reports/sale_order_report/report/vauxoo.py 2012-05-23 22:47:49 +0000
3+++ vauxoo_reports/sale_order_report/report/vauxoo.py 2012-05-24 15:13:39 +0000
4@@ -37,20 +37,19 @@
5 })
6
7 def _get_imp(self, obj):
8- aux3={}
9-
10+ dict_imp={}
11+ lista=[]
12 for l in obj.order_line:
13- print 'nombre de linea', l.name
14 for tax in l.tax_id:
15- print 'nombre de impuesto', tax.name
16- if aux3.get(tax.name,False):
17- aux3[tax.name]+= l.price_subtotal*tax.amount
18+ if dict_imp.get(tax.name,False):
19+ dict_imp[tax.name]+= l.price_subtotal*tax.amount
20 else:
21- aux3[tax.name] = l.price_subtotal*tax.amount
22-
23- print 'aux3',aux3
24-
25- return True
26+ if tax.name != 'EXENTO':
27+ dict_imp[tax.name] = l.price_subtotal*tax.amount
28+ for i in dict_imp.keys():
29+ lista.append((i,dict_imp[i]))
30+ print 'listaaa',lista
31+ return lista
32
33 def _get_delay(self, obj):
34 aux=[]
35@@ -70,7 +69,12 @@
36 return []
37 addr_obj = self.pool.get('res.partner.address')
38 res = ''
39+
40 addr_ids = addr_obj.search(self.cr,self.uid,[('partner_id','=',idp),('type','=',type_r)])
41+
42+ if not addr_ids:
43+ addr_ids = addr_obj.search(self.cr,self.uid,[('partner_id','=',idp),('type','=','invoice')])
44+
45 addr_inv={}
46 lista=""
47
48
49=== modified file 'vauxoo_reports/sale_order_report/report/vauxoo.rml'
50--- vauxoo_reports/sale_order_report/report/vauxoo.rml 2012-05-24 12:57:50 +0000
51+++ vauxoo_reports/sale_order_report/report/vauxoo.rml 2012-05-24 15:13:39 +0000
52@@ -123,7 +123,6 @@
53
54 <blockTableStyle id="TOTAL">
55 <blockValign value="TOP"/>
56- <blockSpan start="0,0" stop="0,2"/>
57 <lineStyle kind="GRID" colorName="#4d80b2" start="1,0" stop="-1,-1" thickness="0.5" />
58 </blockTableStyle>
59
60@@ -268,17 +267,28 @@
61 </blockTable>
62 </section>
63 <!--TABLA DE TOTALES-->
64+
65 <blockTable colWidths="170mm,20mm,20mm" style="TOTAL">
66 <tr>
67 <td><para></para></td>
68 <td><para style="ITEMSRIGHT">SUBTOTAL</para></td>
69 <td><para style="ITEMSCENTER">[[ formatLang(o.amount_untaxed ) ]]</para></td>
70 </tr>
71+ </blockTable>
72+ <blockTable colWidths="170mm,20mm,20mm" style="TOTAL">
73 <tr>
74+ [[repeatIn(get_imp(o),'list')]]
75 <td><para></para></td>
76+<<<<<<< TREE
77 <td><para style="ITEMSRIGHT">IVA(12%):</para></td>
78 <td><para style="ITEMSCENTER">[[ formatLang(o.amount_tax) ]]</para></td>
79+=======
80+ <td><para style="ITEMSCENTER">[[ list[0] ]]:</para></td>
81+ <td><para style="ITEMSRIGHT">[[ list[1] ]]</para></td>
82+>>>>>>> MERGE-SOURCE
83 </tr>
84+ </blockTable>
85+ <blockTable colWidths="170mm,20mm,20mm" style="TOTAL">
86 <tr>
87 <td><para></para></td>
88 <td><para style="ITEMSRIGHT">TOTAL</para></td>