~vauxoo/addons-vauxoo/6.0-trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0"?>
<document filename="test.pdf">
  <template pageSize="(215.0mm,280.0mm)" title="Test" author="Luis Escobar" allowSplitting="20" showBoundary='0'>
    <pageTemplate id="first">
        <pageGraphics>
    <!-- Aqui esta la definicion de la fuente de todo lo que aparece en los drawstrings -->
            <setFont name="Courier-Bold" size="12.0"/>

            <place x="37.0mm"     y="221.0mm"    width="47.0mm"  height="10.0mm">  
                <blockTable colWidths="14.0mm,14.0mm,19.0mm" style="TABLA_SIN">
                    <tr>
                        <td>
                            <para style="IZQUIERDAMAY">[[get_date(o,0)]]</para>
                        </td>
                        <td>
                            <para style="IZQUIERDAMAY">[[get_date(o,1)]]</para>
                        </td>
                        <td>
                            <para style="IZQUIERDAMAY">[[get_date(o,2)]]</para>
                        </td>
                    </tr>
                </blockTable>
            </place>

            <place x="40.0mm"     y="206.0mm"    width="190.0mm"  height="10.0mm">  
                <blockTable colWidths="130.0mm,32.0mm" style="TABLA_SIN">
                    <tr>
                        <td>
                            <para style="IZQUIERDA">[[o.partner_id.name and  ('%s'%(o.partner_id.name.upper())) or '' ]]</para>
                        </td>
                        <td>
                            <para style="IZQUIERDA">[[ o.partner_id.vat  and ('%s-%s-%s'%(o.partner_id.vat[2:3],o.partner_id.vat[3:11],o.partner_id.vat[11:12])) or '' ]]</para>
                        </td>
                    </tr>
                </blockTable>
            </place>

            <place x="30.0mm"     y="199.0mm"    width="170.0mm"  height="10.0mm">  
                <blockTable colWidths="170.0mm" style="TABLA_SIN">
                    <tr>
                        <td>
                            <para style="IZQUIERDA">[[ o.partner_id.address and ('%s, '%(o.partner_id.address[0].street)) or  '' ]] [[ o.partner_id.address and o.partner_id.address[0].street2 and ('%s - '%(o.partner_id.address[0].street2)) or  '' ]] [[ o.partner_id.address and o.partner_id.address[0].city and ('%s - '%(o.partner_id.address[0].city)) or '' ]] [[ o.partner_id.address and o.partner_id.address[0].city and ('%s - '%(o.partner_id.address[0].city.name)) or '' ]] [[ o.partner_id.address and o.partner_id.address[0].state_id and ('%s - '%(o.partner_id.address[0].state_id.name))  or '']] [[ o.partner_id.address and o.partner_id.address[0].country_id and ('%s.'%(o.partner_id.address[0].country_id.name))  or '']]</para>
                        </td>
                    </tr>
                </blockTable>
            </place>

            <place x="25.0mm"     y="187.0mm"    width="190.0mm"  height="10.0mm">  
                <blockTable colWidths="67.0mm,55.0mm,67.0mm" style="TABLA_SIN">
                    <tr>
                        <td>
                            <para style="IZQUIERDA">[[ o.partner_id.phone]]</para>
                        </td>
                        <td>
                            <para style="IZQUIERDA">[[ o.origin]]</para>
                        </td>
                        <td>
                            <para style="IZQUIERDA">[[o.payment_term.name]]</para>
                        </td>
                    </tr>
                </blockTable>
            </place>

            <place x="37.0mm"     y="27.5mm"    width="185.0mm"  height="20.0mm">
                <blockTable colWidths="140.0mm,21.0mm" style="TABLA_SIN">

                    <tr>
                      <td>
                            <para style="IZQUIERDA">[[o.payment_method_id.name ]]</para>
                      </td>
                      <td>
                            <para style="TOTALES">[[ formatLang(o.amount_untaxed,digits=2)]]</para>
                      </td>
                    </tr>

                </blockTable>
            </place>
            
            <place x="90.0mm"     y="19.0mm"    width="80.0mm"  height="20.0mm">
                <blockTable colWidths="20.0mm,60.0mm" style="TABLA_SIN">

                    <tr>
                      <td>
                            <para style="TOTALES2">[[get_wh(o)]]</para>
                      </td>
                      <td>
                            <para style="TOTALES2">[[ formatLang(o.amount_untaxed,digits=2)]]</para>
                      </td>
                    </tr>

                </blockTable>
            </place>

            <place x="43.0mm"     y="18.0mm"    width="185.0mm"  height="20.0mm">
                <blockTable colWidths="130.0mm,31.0mm" style="TABLA_SIN">

                    <tr>
                      <td>
                            <para style="IZQUIERDA"></para>
                      </td>
                      <td>
                            <para style="TOTALES">[[ formatLang(o.amount_tax,digits=2)]]</para>
                      </td>
                    </tr>

                </blockTable>
            </place>

            <place x="36.5mm"     y="7.5mm"    width="185.0mm"  height="20.0mm">
                <blockTable colWidths="140.0mm,21.0mm" style="TABLA_SIN">

                    <tr>
                      <td>
                            <para style="IZQUIERDA"></para>
                      </td>
                      <td>
                            <para style="TOTALES">[[ formatLang(o.amount_total,digits=2)]]</para>
                      </td>
                    </tr>

                </blockTable>
            </place>

      </pageGraphics>
      
    <frame id="first" x1="13.0mm" y1="48.0mm" width="189.0mm" height="137.0mm"/>
    </pageTemplate>
  </template>
  <stylesheet>

    <blockTableStyle id="TABLA_SIN">
      <blockAlignment value="LEFT"/>
      <blockValign value="CENTER"/>
    </blockTableStyle>

    <initialize>
      <paraStyle name="all" alignment="justify"/>
    </initialize>

    <paraStyle name="DERECHA" alignment="RIGHT" fontName="Courier-Bold" fontSize="8.0" leading="9" spaceBefore="0" textColor="black"/>
    <paraStyle name="IZQUIERDA" alignment="LEFT" fontName="Courier-Bold" fontSize="8.0" leading="9" spaceBefore="0" textColor="black"/>
    <paraStyle name="CENTRO" alignment="CENTER" fontName="Courier-Bold" fontSize="8.0" leading="9" spaceBefore="0" textColor="black"/>
    
    <paraStyle name="TOTALES" alignment="CENTER" fontName="Courier-Bold" fontSize="14.0" leading="9" spaceBefore="0" textColor="black"/>
    <paraStyle name="TOTALES2" alignment="RIGHT" fontName="Courier-Bold" fontSize="14.0" leading="9" spaceBefore="0" textColor="black"/>
    <paraStyle name="DERECHAMAY" alignment="RIGHT" fontSize="12.0" leading="14" spaceBefore="0" textColor="black"/>
    <paraStyle name="IZQUIERDAMAY" alignment="LEFT" fontSize="12.0" leading="14" spaceBefore="0" textColor="black"/>
    <paraStyle name="CENTROMAY" alignment="CENTER" fontSize="12.0" leading="14" spaceBefore="0" textColor="black"/>
    
  </stylesheet>
  <images/>
  <story>
    <para>[[repeatIn(objects,'o')]][[ setLang(o.partner_id.lang) ]]</para>
    
    <section>
      <para style="DERECHA">[[ repeatIn(o.invoice_line,'l') ]]</para>

      <blockTable colWidths="30.0mm,98.0mm,13.0mm,17.0mm,30.0mm" style="TABLA_SIN">
        <tr>
          <td>
            <para style="IZQUIERDA">[[l.product_id and (l.product_id.code and ('[%s]'%(l.product_id.code.upper())) or '') or '']]</para>
          </td>
          <td>
            <para style="IZQUIERDA">[[l.product_id and  l.product_id.name.upper() or l.name.upper() ]]</para>
          </td>
          <td>
            <para style="DERECHA">[[ formatLang(l.quantity,digits=0)]]</para>
          </td>
          <td>
            <para style="DERECHA">[[ l.price_unit and formatLang(l.price_unit) or '']]</para>
          </td>
          <td>
            <para style="DERECHA">[[ l.price_subtotal and formatLang(l.price_subtotal)  or '']]</para>
          </td>
        </tr>
      </blockTable>

    </section>

  </story>
</document>