Skip to content

Commit eafefa5

Browse files
committed
[IMP] lrm_sale_custom: report quotation
1 parent 1cafa50 commit eafefa5

File tree

2 files changed

+161
-1
lines changed

2 files changed

+161
-1
lines changed

lrm_sale_custom/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"author": "Escodoo",
1111
"website": "https://github.com/Escodoo/lrm-addons",
1212
"depends": ["sale"],
13-
"data": ["views/sale_order.xml"],
13+
"data": ["views/sale_order.xml", "views/report_saleorder.xml"],
1414
}
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
4+
<template
5+
id="lrm_report_saleorder_document"
6+
inherit_id="sale.report_saleorder_document"
7+
>
8+
<xpath expr="//table[hasclass('o_main_table')]" position="attributes">
9+
<attribute name="class" add="d-none" separator=" " />
10+
</xpath>
11+
<xpath expr="//table[hasclass('o_main_table')]" position="before">
12+
<table
13+
class="table table-condensed table-statement o_main_lrm_table table-bordered"
14+
style="font-size: 10px; border: 1px solid black; border-collapse: collapse;"
15+
>
16+
<thead style="display: table-row-group">
17+
<tr>
18+
<th
19+
class="text-left"
20+
style="border: 1px solid black;"
21+
>IMAGEM</th>
22+
<th
23+
class="text-left"
24+
style="border: 1px solid black;"
25+
>DESC PROD/SERV</th>
26+
<th
27+
class="text-left"
28+
style="border: 1px solid black;"
29+
>PRAZO DE ENTREGA</th>
30+
<th
31+
class="text-left"
32+
style="border: 1px solid black;"
33+
>NCM/SH</th>
34+
<th class="text-left" style="border: 1px solid black;">CST</th>
35+
<th class="text-left" style="border: 1px solid black;">FOP</th>
36+
<th
37+
class="text-left"
38+
style="border: 1px solid black;"
39+
>UNID.</th>
40+
<th class="text-left" style="border: 1px solid black;">QTD.</th>
41+
<th
42+
class="text-left"
43+
style="border: 1px solid black;"
44+
>VL. DESC</th>
45+
<th
46+
class="text-left"
47+
style="border: 1px solid black;"
48+
>VL. UNIT</th>
49+
<th
50+
class="text-left"
51+
style="border: 1px solid black;"
52+
>VL. TOTAL</th>
53+
<th
54+
class="text-left"
55+
style="border: 1px solid black;"
56+
>BC ICMS</th>
57+
<th
58+
class="text-left"
59+
style="border: 1px solid black;"
60+
>ICMS %</th>
61+
<th
62+
class="text-left"
63+
style="border: 1px solid black;"
64+
>VL. ICMS</th>
65+
<th
66+
class="text-left"
67+
style="border: 1px solid black;"
68+
>IPI %</th>
69+
<th
70+
class="text-left"
71+
style="border: 1px solid black;"
72+
>VL. IPI</th>
73+
</tr>
74+
</thead>
75+
<tbody>
76+
<t t-foreach="doc.order_line" t-as="line">
77+
<tr>
78+
<t t-if="line.product_id">
79+
<td
80+
class="text-center align-middle"
81+
style="border: 1px solid black;"
82+
>
83+
<t t-if="line.product_id.image_128">
84+
<span
85+
t-field="line.product_id.image_128"
86+
t-options="{'widget': 'image', 'class': 'img-rounded'}"
87+
style="width: 32px; height: 32px; object-fit: cover;"
88+
/>
89+
</t>
90+
</td>
91+
<td style="border: 1px solid black;">
92+
<span t-field="line.name" />
93+
</td>
94+
<td style="border: 1px solid black;">
95+
<span t-field="line.customer_lead" />
96+
</td>
97+
<td style="border: 1px solid black;">
98+
<span t-field="line.ncm_id.code" />
99+
</td>
100+
<td style="border: 1px solid black;">
101+
<span t-field="line.icms_cst_id.code" />
102+
</td>
103+
<td style="border: 1px solid black;">
104+
<span t-field="line.cfop_id.code" />
105+
</td>
106+
<td style="border: 1px solid black;">
107+
<span t-field="line.product_uom" />
108+
</td>
109+
<td style="border: 1px solid black;">
110+
<span t-field="line.product_uom_qty" />
111+
</td>
112+
<td style="border: 1px solid black;">
113+
<span
114+
t-field="line.discount"
115+
t-options='{"widget": "monetary", "display_currency": line.currency_id}'
116+
/>
117+
</td>
118+
<td style="border: 1px solid black;">
119+
<span
120+
t-field="line.price_unit"
121+
t-options='{"widget": "monetary", "display_currency": line.currency_id}'
122+
/>
123+
</td>
124+
<td style="border: 1px solid black;">
125+
<span
126+
t-field="line.price_subtotal"
127+
t-options='{"widget": "monetary", "display_currency": line.currency_id}'
128+
/>
129+
</td>
130+
<td style="border: 1px solid black;">
131+
<span t-field="line.icms_base" />
132+
</td>
133+
<td style="border: 1px solid black;">
134+
<span t-field="line.icms_percent" /> % </td>
135+
<td style="border: 1px solid black;">
136+
<span t-field="line.icms_value" />
137+
</td>
138+
<td style="border: 1px solid black;">
139+
<span t-field="line.ipi_percent" /> % </td>
140+
<td style="border: 1px solid black;">
141+
<span t-field="line.ipi_value" />
142+
</td>
143+
</t>
144+
<t t-else="">
145+
<td
146+
colspan="16"
147+
class="text-center"
148+
style="border: 1px solid black;"
149+
>
150+
<span t-field="line.name" />
151+
</td>
152+
</t>
153+
</tr>
154+
</t>
155+
</tbody>
156+
</table>
157+
</xpath>
158+
</template>
159+
160+
</odoo>

0 commit comments

Comments
 (0)