Merge lp:~vauxoo/openerp-mexico-localization/6.1_facturae_cbb_dev_carlos into lp:openerp-mexico-localization/6.1
- 6.1_facturae_cbb_dev_carlos
- Merge into 6.1
Proposed by
Juan Carlos Hernandez
Status: | Needs review |
---|---|
Proposed branch: | lp:~vauxoo/openerp-mexico-localization/6.1_facturae_cbb_dev_carlos |
Merge into: | lp:openerp-mexico-localization/6.1 |
Diff against target: |
554 lines (+158/-146) 4 files modified
l10n_mx_facturae_cbb/__openerp__.py (+2/-1) l10n_mx_facturae_cbb/invoice.py (+12/-12) l10n_mx_facturae_cbb/ir_sequence_view_v6.xml (+17/-2) l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml (+127/-131) |
To merge this branch: | bzr merge lp:~vauxoo/openerp-mexico-localization/6.1_facturae_cbb_dev_carlos |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Moisés López - http://www.vauxoo.com | Pending | ||
Review via email: mp+155089@code.launchpad.net |
Commit message
Description of the change
Se corrigio dependencia para cbb
To post a comment you must log in.
Unmerged revisions
- 215. By Juan Carlos Hernandez
-
[FIX][l10n_
mx_facturae_ cbb]problem was corrected with electronic invoice CBB
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'l10n_mx_facturae_cbb/__openerp__.py' |
2 | --- l10n_mx_facturae_cbb/__openerp__.py 2012-03-24 18:31:27 +0000 |
3 | +++ l10n_mx_facturae_cbb/__openerp__.py 2013-04-01 22:28:22 +0000 |
4 | @@ -37,7 +37,7 @@ |
5 | """, |
6 | "website" : "http://www.vauxoo.com/", |
7 | "license" : "AGPL-3", |
8 | - "depends" : ["account", "base_vat", "document", |
9 | + "depends" : ["account", "base_vat", "document", |
10 | "sale",#no depende de "sale" directamente, pero marca error en algunas versiones |
11 | "l10n_mx_partner_address", |
12 | "l10n_mx_invoice_datetime", |
13 | @@ -45,6 +45,7 @@ |
14 | "l10n_mx_facturae_seq", |
15 | "l10n_mx_company_cif", |
16 | "l10n_mx_invoice_amount_to_text", |
17 | + "l10n_mx_facturae_22_payment_method", |
18 | ], |
19 | "init_xml" : [], |
20 | "demo_xml" : [], |
21 | |
22 | === renamed file 'l10n_mx_facturae_cbb/i18n/es_ES.po' => 'l10n_mx_facturae_cbb/i18n/es.po' |
23 | === modified file 'l10n_mx_facturae_cbb/invoice.py' |
24 | --- l10n_mx_facturae_cbb/invoice.py 2012-03-24 17:24:13 +0000 |
25 | +++ l10n_mx_facturae_cbb/invoice.py 2013-04-01 22:28:22 +0000 |
26 | @@ -38,13 +38,13 @@ |
27 | |
28 | class account_invoice(osv.osv): |
29 | _inherit = 'account.invoice' |
30 | - |
31 | + |
32 | def _get_fname_invoice(self, cr, uid, ids, field_names=None, arg=False, context={}): |
33 | if not context: |
34 | context = {} |
35 | res = {} |
36 | sequence_obj = self.pool.get('ir.sequence') |
37 | - |
38 | + |
39 | invoice_id__sequence_id = self._get_invoice_sequence(cr, uid, ids, context=context) |
40 | for invoice in self.browse(cr, uid, ids, context=context): |
41 | sequence_id = invoice_id__sequence_id[invoice.id] |
42 | @@ -53,29 +53,29 @@ |
43 | sequence = sequence_obj.browse(cr, uid, [sequence_id], context)[0] |
44 | fname = "" |
45 | fname += (invoice.company_id.partner_id and (invoice.company_id.partner_id._columns.has_key('vat_split') and invoice.company_id.partner_id.vat_split or invoice.company_id.partner_id.vat) or '') |
46 | - fname += '.' |
47 | + fname += '_' |
48 | number_work = invoice.number or invoice.internal_number |
49 | try: |
50 | context.update({ 'number_work': int( number_work ) or False }) |
51 | fname += sequence and sequence.approval_id and sequence.approval_id.serie or '' |
52 | - fname += '.' |
53 | + fname += '_' |
54 | except: |
55 | pass |
56 | fname += number_work or '' |
57 | res[invoice.id] = fname |
58 | return res |
59 | - |
60 | + |
61 | _columns = { |
62 | ##Extract date_invoice from original, but add datetime |
63 | #'date_invoice': fields.datetime('Date Invoiced', states={'open':[('readonly',True)],'close':[('readonly',True)]}, help="Keep empty to use the current date"), |
64 | #'invoice_sequence_id': fields.function(_get_invoice_sequence, method=True, type='many2one', relation='ir.sequence', string='Invoice Sequence', store=True), |
65 | 'fname_invoice': fields.function(_get_fname_invoice, method=True, type='char', size='26', string='File Name Invoice'), |
66 | } |
67 | - |
68 | + |
69 | _defaults = { |
70 | #'date_invoice': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), |
71 | } |
72 | - |
73 | + |
74 | def create_report(self, cr, uid, res_ids, report_name=False, file_name=False): |
75 | if not report_name or not res_ids: |
76 | return (False,Exception('Report name and Resources ids are required !!!')) |
77 | @@ -90,15 +90,15 @@ |
78 | #print 'Exception in create report:',e |
79 | #return (False,str(e)) |
80 | return (True,ret_file_name) |
81 | - |
82 | + |
83 | def create_report_pdf(self, cr, uid, ids, context={}): |
84 | if not context: |
85 | context = {} |
86 | id = ids[0] |
87 | - |
88 | + |
89 | (fileno, fname) = tempfile.mkstemp('.pdf', 'openerp_' + (False or '') + '__facturae__' ) |
90 | os.close( fileno ) |
91 | - |
92 | + |
93 | file = self.create_report(cr, uid, [id], "account.invoice.facturae.pdf", fname) |
94 | is_file = file[0] |
95 | fname = file[1] |
96 | @@ -106,7 +106,7 @@ |
97 | f = open(fname, "r") |
98 | data = f.read() |
99 | f.close() |
100 | - |
101 | + |
102 | data_attach = { |
103 | 'name': context.get('fname'), |
104 | 'datas': data and base64.encodestring( data ) or None, |
105 | @@ -117,7 +117,7 @@ |
106 | } |
107 | self.pool.get('ir.attachment').create(cr, uid, data_attach, context=context) |
108 | return True |
109 | - |
110 | + |
111 | def action_cancel_draft(self, cr, uid, ids, *args): |
112 | attachment_obj = self.pool.get('ir.attachment') |
113 | for invoice in self.browse(cr, uid, ids): |
114 | |
115 | === modified file 'l10n_mx_facturae_cbb/ir_sequence_view_v6.xml' |
116 | --- l10n_mx_facturae_cbb/ir_sequence_view_v6.xml 2012-03-24 18:31:27 +0000 |
117 | +++ l10n_mx_facturae_cbb/ir_sequence_view_v6.xml 2013-04-01 22:28:22 +0000 |
118 | @@ -1,7 +1,7 @@ |
119 | <?xml version="1.0" encoding="utf-8"?> |
120 | <openerp> |
121 | <data> |
122 | - |
123 | + |
124 | <record id="ir_sequence_form_inh_l10n_mx_facturae_cbb_01" model="ir.ui.view"> |
125 | <field name="name">ir.sequence.form.inh.l10n_mx_facturae_cbb_01</field> |
126 | <field name="model">ir.sequence</field> |
127 | @@ -16,6 +16,21 @@ |
128 | </xpath> |
129 | </field> |
130 | </record> |
131 | - |
132 | + |
133 | + <record id="ir_sequence_form_inh_l10n_mx_facturae_cbb_02" model="ir.ui.view"> |
134 | + <field name="name">ir.sequence.form.inh.l10n_mx_facturae_cbb_02</field> |
135 | + <field name="model">ir.sequence.approval</field> |
136 | + <field name="type">form</field> |
137 | + <field name="inherit_id" ref="l10n_mx_facturae_seq.view_facturae_ir_sequence_approval_form"/> |
138 | + <field name="arch" type="xml"> |
139 | + <xpath expr="/form/field[@name='company_id']" position="after"> |
140 | + <separator colspan="4" string="Codigo de Barras Bidimensional (CBB)"/> |
141 | + <field name="cbb_image" colspan="4" widget="image" nolabel="1"/> |
142 | + <field name="date_start"/> |
143 | + <field name="date_end"/> |
144 | + </xpath> |
145 | + </field> |
146 | + </record> |
147 | + |
148 | </data> |
149 | </openerp> |
150 | |
151 | === modified file 'l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml' |
152 | --- l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml 2012-11-16 23:59:38 +0000 |
153 | +++ l10n_mx_facturae_cbb/report/invoice_facturae_pdf.rml 2013-04-01 22:28:22 +0000 |
154 | @@ -59,32 +59,32 @@ |
155 | </initialize> |
156 | <paraStyle name="P1" fontName="Helvetica" alignment="RIGHT"/> |
157 | <paraStyle name="P2" fontName="Helvetica" fontSize="8.0" leading="10"/> |
158 | - <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10"/> |
159 | - <paraStyle name="P4" fontName="Helvetica" fontSize="10.0" leading="13"/> |
160 | - <paraStyle name="P5" fontName="Helvetica-Bold" fontSize="6.0" leading="8" alignment="CENTER"/> |
161 | - <paraStyle name="P6" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/> |
162 | - <paraStyle name="P7" fontName="Helvetica" textColor="#280099"/> |
163 | - <paraStyle name="P8" fontName="Helvetica" alignment="RIGHT" textColor="#280099"/> |
164 | - <paraStyle name="P9" fontName="Helvetica" textColor="#ff3333"/> |
165 | - <paraStyle name="P10" fontName="Helvetica" fontSize="12.0" leading="15" textColor="#800000"/> |
166 | - <paraStyle name="P11" fontName="Helvetica" fontSize="2.0" leading="3" textColor="#800000"/> |
167 | - <paraStyle name="P12" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
168 | - <paraStyle name="P13" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
169 | - <paraStyle name="P14" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
170 | - <paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
171 | - <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
172 | - <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
173 | - <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
174 | - <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="18.0" leading="22" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
175 | - <paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
176 | - <paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
177 | - <paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
178 | - <paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/> |
179 | - <paraStyle name="P24" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
180 | - <paraStyle name="P25" fontName="Helvetica" fontSize="8.0" leading="10" textColor="#280099"/> |
181 | - <paraStyle name="P26" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" textColor="#280099"/> |
182 | - <paraStyle name="P27" fontName="Helvetica" fontSize="8.0" leading="10"/> |
183 | - <paraStyle name="P28" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
184 | + <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> |
185 | + <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10"/> |
186 | + <paraStyle name="P5" fontName="Helvetica" fontSize="10.0" leading="13"/> |
187 | + <paraStyle name="P6" fontName="Helvetica-Bold" fontSize="6.0" leading="8" alignment="CENTER"/> |
188 | + <paraStyle name="P7" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER"/> |
189 | + <paraStyle name="P8" fontName="Helvetica" textColor="#280099"/> |
190 | + <paraStyle name="P9" fontName="Helvetica" alignment="RIGHT" textColor="#280099"/> |
191 | + <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" textColor="#280099"/> |
192 | + <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" textColor="#280099"/> |
193 | + <paraStyle name="P12" fontName="Helvetica" textColor="#ff3333"/> |
194 | + <paraStyle name="P13" fontName="Helvetica" fontSize="12.0" leading="15" textColor="#800000"/> |
195 | + <paraStyle name="P14" fontName="Helvetica" fontSize="2.0" leading="3" textColor="#800000"/> |
196 | + <paraStyle name="P15" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
197 | + <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
198 | + <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
199 | + <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> |
200 | + <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
201 | + <paraStyle name="P20" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> |
202 | + <paraStyle name="P21" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
203 | + <paraStyle name="P22" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="18.0" leading="22" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
204 | + <paraStyle name="P23" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
205 | + <paraStyle name="P24" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
206 | + <paraStyle name="P25" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#280099"/> |
207 | + <paraStyle name="P26" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/> |
208 | + <paraStyle name="P27" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> |
209 | + <paraStyle name="P28" fontName="Helvetica" fontSize="8.0" leading="10"/> |
210 | <paraStyle name="Standard" fontName="Helvetica"/> |
211 | <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> |
212 | <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/> |
213 | @@ -101,56 +101,56 @@ |
214 | </stylesheet> |
215 | <story> |
216 | <section> |
217 | - <para style="P16">[[ repeatIn(objects,'o') ]] <font face="Helvetica" size="9.0">[[ set_global_data(o) ]]</font></para> |
218 | - <para style="P19">[[ o.company_id.parent_id and o.company_id.parent_id.partner_id.name or o.company_id.partner_id.name ]]</para> |
219 | + <para style="P19">[[ repeatIn(objects,'o') ]] <font face="Helvetica" size="9.0">[[ set_global_data(o) ]]</font></para> |
220 | + <para style="P22">[[ o.company_id.parent_id and o.company_id.parent_id.partner_id.name or o.company_id.partner_id.name ]]</para> |
221 | <blockTable colWidths="125.0,207.0,166.0" style="Tabla1"> |
222 | <tr> |
223 | <td> |
224 | - <para style="P24">[[ o.company_id.logo and setTag('para','image',{'width':'120.0','height':'80.0'}) ]] [[ o.company_id.logo ]]</para> |
225 | - </td> |
226 | - <td> |
227 | - <para style="P18">[[ company_address()['name'] or o.company_id.partner_id.name ]]</para> |
228 | - <para style="P21"> |
229 | - <font color="white"> </font> |
230 | - </para> |
231 | - <para style="P18">Calle: [[ company_address()['street'] or '' ]] Nro. Ext: [[ company_address()['street3'] or '' ]] Int: [[ company_address()['street4'] or '' ]]</para> |
232 | - <para style="P21"> |
233 | - <font color="white"> </font> |
234 | - </para> |
235 | - <para style="P18">Colonia: [[ company_address()['street2'] or '' ]]</para> |
236 | - <para style="P21"> |
237 | - <font color="white"> </font> |
238 | - </para> |
239 | - <para style="P18">Ciudad: [[ company_address()['city'] or '' ]] Estado: [[ company_address()['state_id'] and company_address()['state_id']['name'] or '' ]]</para> |
240 | - <para style="P22"> |
241 | - <font color="white"> </font> |
242 | - </para> |
243 | - <para style="P18">Localidad: [[ company_address()['city2'] or '' ]]</para> |
244 | - <para style="P21"> |
245 | - <font color="white"> </font> |
246 | - </para> |
247 | - <para style="P18">CP: [[ company_address()['zip'] or '' ]]</para> |
248 | - <para style="P21"> |
249 | - <font color="white"> </font> |
250 | - </para> |
251 | - <para style="P18">RFC: [[ o.company_id.partner_id._columns.has_key('vat_split') and o.company_id.partner_id.vat_split or o.company_id.partner_id.vat ]]</para> |
252 | - <para style="P21"> |
253 | - <font color="white"> </font> |
254 | - </para> |
255 | - <para style="P20">Teléfono(s): </para> |
256 | - <para style="P20">[[ company_address()['phone'] or removeParentNode('para') ]]</para> |
257 | - <para style="P20">[[ company_address()['fax'] or removeParentNode('para') ]]</para> |
258 | - <para style="P20">[[ company_address()['mobile'] or removeParentNode('para') ]]</para> |
259 | - </td> |
260 | - <td> |
261 | - <para style="P9"> |
262 | + <para style="P27">[[ o.company_id.logo and setTag('para','image',{'width':'120.0','height':'80.0'}) ]] [[ o.company_id.logo ]]</para> |
263 | + </td> |
264 | + <td> |
265 | + <para style="P21">[[ company_address()['name'] or o.company_id.partner_id.name ]]</para> |
266 | + <para style="P24"> |
267 | + <font color="white"> </font> |
268 | + </para> |
269 | + <para style="P21">Calle: [[ company_address()['street'] or '' ]] Nro. Ext: [[ company_address()['street3'] or '' ]] Int: [[ company_address()['street4'] or '' ]]</para> |
270 | + <para style="P24"> |
271 | + <font color="white"> </font> |
272 | + </para> |
273 | + <para style="P21">Colonia: [[ company_address()['street2'] or '' ]]</para> |
274 | + <para style="P24"> |
275 | + <font color="white"> </font> |
276 | + </para> |
277 | + <para style="P21">Ciudad: [[ company_address()['city'] or '' ]] Estado: [[ company_address()['state_id'] and company_address()['state_id']['name'] or '' ]]</para> |
278 | + <para style="P25"> |
279 | + <font color="white"> </font> |
280 | + </para> |
281 | + <para style="P21">Localidad: [[ company_address()['city2'] or '' ]]</para> |
282 | + <para style="P24"> |
283 | + <font color="white"> </font> |
284 | + </para> |
285 | + <para style="P21">CP: [[ company_address()['zip'] or '' ]]</para> |
286 | + <para style="P24"> |
287 | + <font color="white"> </font> |
288 | + </para> |
289 | + <para style="P21">RFC: [[ o.company_id.partner_id._columns.has_key('vat_split') and o.company_id.partner_id.vat_split or o.company_id.partner_id.vat ]]</para> |
290 | + <para style="P24"> |
291 | + <font color="white"> </font> |
292 | + </para> |
293 | + <para style="P23">Teléfono(s): </para> |
294 | + <para style="P23">[[ company_address()['phone'] or removeParentNode('para') ]]</para> |
295 | + <para style="P23">[[ company_address()['fax'] or removeParentNode('para') ]]</para> |
296 | + <para style="P23">[[ company_address()['mobile'] or removeParentNode('para') ]]</para> |
297 | + </td> |
298 | + <td> |
299 | + <para style="P12"> |
300 | <font face="Helvetica" size="18.0">Folio: [[ get_approval() and get_approval().serie or '' ]] [[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and o.number or 'SIN FOLIO O ESTATUS NO VALIDO' ]]</font> |
301 | </para> |
302 | - <para style="P11"> |
303 | + <para style="P14"> |
304 | <font color="white"> </font> |
305 | </para> |
306 | - <para style="P10">[[ o.state == 'cancel' and 'FACTURA CANCELADA' ]]</para> |
307 | - <para style="P11"> |
308 | + <para style="P13">[[ o.state == 'cancel' and 'FACTURA CANCELADA' ]]</para> |
309 | + <para style="P14"> |
310 | <font color="white"> </font> |
311 | </para> |
312 | <para style="Table Contents">[[ company_address()['city'] or '' ]], [[ company_address()['state_id'] and company_address()['state_id']['name'] or '' ]] a</para> |
313 | @@ -161,7 +161,7 @@ |
314 | <blockTable colWidths="249.0,249.0" style="Tabla2"> |
315 | <tr> |
316 | <td> |
317 | - <para style="P7">Receptor</para> |
318 | + <para style="P8">Receptor</para> |
319 | <para style="Table Contents"><font face="Helvetica">Nombre: </font>[[ o.partner_id.name ]]</para> |
320 | <para style="terp_default_8"><font face="Helvetica">Dirección:</font> [[ o.address_invoice_id.street ]] No. Ext: [[ o.address_invoice_id.street3 ]] Int: [[ o.address_invoice_id.street4 ]]</para> |
321 | <para style="terp_default_8"><font face="Helvetica">Colonia:</font> [[ o.address_invoice_id.street2 or '' ]]</para> |
322 | @@ -169,58 +169,56 @@ |
323 | <para style="terp_default_8"><font face="Helvetica">Localidad: </font>[[ o.address_invoice_id.city2 or '' ]]</para> |
324 | <para style="terp_default_8"><font face="Helvetica">C.P.:</font> [[ o.address_invoice_id.zip or '' ]] </para> |
325 | <para style="terp_default_8"><font face="Helvetica">R. F. C. :</font> [[ o.partner_id._columns.has_key('vat_split') and o.partner_id.vat_split or o.partner_id.vat ]]</para> |
326 | - <para style="P23">Teléfono(s): </para> |
327 | - <para style="P17">[[ o.address_invoice_id.phone or removeParentNode('para') ]]</para> |
328 | - <para style="P17">[[ o.address_invoice_id.fax or removeParentNode('para') ]]</para> |
329 | - <para style="P17">[[ o.address_invoice_id.mobile or removeParentNode('para') ]]</para> |
330 | + <para style="P26">Teléfono(s): </para> |
331 | + <para style="P20">[[ o.address_invoice_id.phone or removeParentNode('para') ]]</para> |
332 | + <para style="P20">[[ o.address_invoice_id.fax or removeParentNode('para') ]]</para> |
333 | + <para style="P20">[[ o.address_invoice_id.mobile or removeParentNode('para') ]]</para> |
334 | </td> |
335 | <td> |
336 | <para style="Table Contents">Condición de pago: [[ format(o.payment_term and (o.payment_term.note or o.payment_term.name) or removeParentNode('para') ) ]]</para> |
337 | - <para style="P3">Origen: [[ o.origin or removeParentNode('para') ]]</para> |
338 | - <para style="P3">Expedido en:</para> |
339 | - <para style="P3">[[ subcompany_address()['name'] or o.company_id.partner_id.name ]]</para> |
340 | - <para style="P3">Calle: [[ subcompany_address()['street'] or '' ]] Nro. Ext: [[ subcompany_address()['street3'] or '' ]] Int: [[ subcompany_address()['street4'] or '' ]]</para> |
341 | - <para style="P3">Colonia: [[ subcompany_address()['street2'] or '' ]]</para> |
342 | - <para style="P3">Ciudad: [[ subcompany_address()['city'] or '' ]] </para> |
343 | - <para style="P3">Estado: [[ subcompany_address()['state_id'] and subcompany_address()['state_id']['name'] or '' ]]</para> |
344 | - <para style="P3">Localidad: [[ subcompany_address()['city2'] or '' ]]</para> |
345 | - <para style="P3">CP: [[ subcompany_address()['zip'] or '' ]] </para> |
346 | + <para style="P4">Origen: [[ o.origin or removeParentNode('para') ]]</para> |
347 | + <para style="P4">Expedido en:</para> |
348 | + <para style="P4">[[ subcompany_address()['name'] or o.company_id.partner_id.name ]]</para> |
349 | + <para style="P4">Calle: [[ subcompany_address()['street'] or '' ]] Nro. Ext: [[ subcompany_address()['street3'] or '' ]] Int: [[ subcompany_address()['street4'] or '' ]]</para> |
350 | + <para style="P4">Colonia: [[ subcompany_address()['street2'] or '' ]]</para> |
351 | + <para style="P4">Ciudad: [[ subcompany_address()['city'] or '' ]] </para> |
352 | + <para style="P4">Estado: [[ subcompany_address()['state_id'] and subcompany_address()['state_id']['name'] or '' ]]</para> |
353 | + <para style="P4">Localidad: [[ subcompany_address()['city2'] or '' ]]</para> |
354 | + <para style="P4">CP: [[ subcompany_address()['zip'] or '' ]] </para> |
355 | </td> |
356 | </tr> |
357 | </blockTable> |
358 | <blockTable colWidths="47.0,88.0,160.0,54.0,65.0,85.0" style="Tabla3"> |
359 | <tr> |
360 | <td> |
361 | - <para style="P25">Cantidad</para> |
362 | - </td> |
363 | - <td> |
364 | - <para style="P25">Unidad de medida</para> |
365 | - </td> |
366 | - <td> |
367 | - <para style="P25">Descripción</para> |
368 | - </td> |
369 | - <td> |
370 | - <para style="P25">Clave</para> |
371 | - </td> |
372 | - <td> |
373 | - <para style="P26">P.Unitario</para> |
374 | - </td> |
375 | - <td> |
376 | - <para style="P26">Importe</para> |
377 | + <para style="P10">Cantidad</para> |
378 | + </td> |
379 | + <td> |
380 | + <para style="P10">Unidad de medida</para> |
381 | + </td> |
382 | + <td> |
383 | + <para style="P10">Descripción</para> |
384 | + </td> |
385 | + <td> |
386 | + <para style="P10">Clave</para> |
387 | + </td> |
388 | + <td> |
389 | + <para style="P11">P.Unitario</para> |
390 | + </td> |
391 | + <td> |
392 | + <para style="P11">Importe</para> |
393 | </td> |
394 | </tr> |
395 | <tr> |
396 | <td> |
397 | - <para style="Table Contents"> |
398 | - <font face="Helvetica" size="8.0">[[ repeatIn(o.invoice_line,'l') ]] [[ formatLang(l.quantity) ]]</font> |
399 | - </para> |
400 | + <para style="P2">[[ repeatIn(o.invoice_line,'l') ]] [[ formatLang(l.quantity) ]]</para> |
401 | </td> |
402 | <td> |
403 | <para style="P2">[[ (l.uos_id and l.uos_id.name) or '' ]]</para> |
404 | </td> |
405 | <td> |
406 | <para style="P2">[[ l.name ]]</para> |
407 | - <para style="P4"> |
408 | + <para style="P5"> |
409 | <font face="Helvetica" size="7.0">Notas:</font> |
410 | <font face="Helvetica" size="7.0">[[l.note or removeParentNode('para')]]</font> |
411 | </para> |
412 | @@ -229,17 +227,17 @@ |
413 | <para style="P2">[[ l.product_id and l.product_id.default_code ]]</para> |
414 | </td> |
415 | <td> |
416 | - <para style="P28">[[ formatLang(l.price_unit) ]]</para> |
417 | + <para style="P3">[[ formatLang(l.price_unit) ]]</para> |
418 | </td> |
419 | <td> |
420 | - <para style="P28">[[ exists_key('global_discount_percent') and (formatLang(l.quantity * l.price_unit)) or formatLang(l.price_subtotal) ]]</para> |
421 | + <para style="P3">[[ exists_key('global_discount_percent') and (formatLang(l.quantity * l.price_unit)) or formatLang(l.price_subtotal) ]]</para> |
422 | </td> |
423 | </tr> |
424 | </blockTable> |
425 | <blockTable colWidths="427.0,71.0" style="Tabla7"> |
426 | <tr> |
427 | <td> |
428 | - <para style="P8">Suma $</para> |
429 | + <para style="P9">Suma $</para> |
430 | </td> |
431 | <td> |
432 | <para style="P1">[[formatLang( ( exists_key('global_discount_percent') and o.global_discount_amount or 0.0 ) + (o.amount_untaxed or 0.0) )]]</para> |
433 | @@ -247,7 +245,7 @@ |
434 | </tr> |
435 | <tr> |
436 | <td> |
437 | - <para style="P8">Descuento: [[ exists_key('global_discount_percent') and o.global_discount_percent or removeParentNode('tr')]] %</para> |
438 | + <para style="P9">Descuento: [[ exists_key('global_discount_percent') and o.global_discount_percent or removeParentNode('tr')]] %</para> |
439 | </td> |
440 | <td> |
441 | <para style="P1">[[o.global_discount_amount and formatLang( o.global_discount_amount) or '']]</para> |
442 | @@ -255,7 +253,7 @@ |
443 | </tr> |
444 | <tr> |
445 | <td> |
446 | - <para style="P8">Sub Total $</para> |
447 | + <para style="P9">Sub Total $</para> |
448 | </td> |
449 | <td> |
450 | <para style="P1">[[ formatLang(o.amount_untaxed) ]]</para> |
451 | @@ -263,7 +261,7 @@ |
452 | </tr> |
453 | <tr> |
454 | <td> |
455 | - <para style="P8"> |
456 | + <para style="P9"> |
457 | <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes(), 'tax' ) ]]</font> |
458 | <font face="Helvetica">[[ tax['name2'] ]] ([[ round( float( tax['tax_percent'] ) ) ]]%) $</font> |
459 | </para> |
460 | @@ -274,7 +272,7 @@ |
461 | </tr> |
462 | <tr> |
463 | <td> |
464 | - <para style="P8"> |
465 | + <para style="P9"> |
466 | <font face="Helvetica" size="6.0">[[ repeatIn( get_taxes_ret(), 'tax_ret' ) ]]</font> |
467 | <font face="Helvetica">[[ tax_ret['name2'] ]] Ret ([[ round( float( tax_ret['tax_percent'] ),2 )*-1 ]]%) $</font> |
468 | </para> |
469 | @@ -285,7 +283,7 @@ |
470 | </tr> |
471 | <tr> |
472 | <td> |
473 | - <para style="P8">Total $</para> |
474 | + <para style="P9">Total $</para> |
475 | </td> |
476 | <td> |
477 | <para style="P1">[[ formatLang(o.amount_total) ]]</para> |
478 | @@ -293,8 +291,8 @@ |
479 | </tr> |
480 | <tr> |
481 | <td> |
482 | - <para style="P14">IMPORTE CON LETRA:</para> |
483 | - <para style="P13">[[ o.amount_to_text ]]</para> |
484 | + <para style="P17">IMPORTE CON LETRA:</para> |
485 | + <para style="P16">[[ o.amount_to_text ]]</para> |
486 | </td> |
487 | <td> |
488 | <para style="P1"> |
489 | @@ -303,38 +301,36 @@ |
490 | </td> |
491 | </tr> |
492 | </blockTable> |
493 | - <para style="P12"> |
494 | + <para style="P15"> |
495 | <font color="white"> </font> |
496 | </para> |
497 | - <para style="P12"> |
498 | + <para style="P15"> |
499 | <font color="white"> </font> |
500 | </para> |
501 | <blockTable colWidths="166.0,166.0,166.0" style="Table1"> |
502 | <tr> |
503 | <td> |
504 | - <para style="P5">Régimen Fiscal:</para> |
505 | - <para style="P6">[[o.company_id.partner_id.regimen_fiscal_id and o.company_id.partner_id.regimen_fiscal_id.name or 'No identificado']]</para> |
506 | - </td> |
507 | - <td> |
508 | - <para style="P5">Método de Pago:</para> |
509 | - <para style="P6">[[o.pay_method_id.name or 'No identificado']]</para> |
510 | - </td> |
511 | - <td> |
512 | - <para style="P5">Últimos 4 dígitos de la cuenta bancaria:</para> |
513 | - <para style="P6">[[o.acc_payment.last_acc_number or 'No identificado']]</para> |
514 | + <para style="P6">Régimen Fiscal:</para> |
515 | + <para style="P7">[[o.company_id.partner_id.regimen_fiscal_id and o.company_id.partner_id.regimen_fiscal_id.name or 'No identificado']]</para> |
516 | + </td> |
517 | + <td> |
518 | + <para style="P6">Método de Pago:</para> |
519 | + <para style="P7">[[o.pay_method_id.name or 'No identificado']]</para> |
520 | + </td> |
521 | + <td> |
522 | + <para style="P6">Últimos 4 dígitos de la cuenta bancaria:</para> |
523 | + <para style="P7">[[o.acc_payment.last_acc_number or 'No identificado']]</para> |
524 | </td> |
525 | </tr> |
526 | </blockTable> |
527 | - <para style="P12"> |
528 | - <font color="white"> </font> |
529 | - </para> |
530 | + <para style="P15"/> |
531 | <blockTable colWidths="106.0,257.0,135.0" style="Tabla4"> |
532 | <tr> |
533 | <td> |
534 | - <para style="P2">[[ get_approval() and get_approval().cbb_image and setTag('para','image',{'width':'104.0','height':'104.0'}) ]] [[ get_approval().cbb_image ]]</para> |
535 | + <para style="P2">[[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and get_approval().cbb_image and setTag('para','image',{'width':'104.0','height':'104.0'}) or 'SIN FOLIO O ESTATUS NO VALIDO' ]] [[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and get_approval().cbb_image or 'SIN FOLIO O ESTATUS NO VALIDO' ]]</para> |
536 | </td> |
537 | <td> |
538 | - <para style="P2">Número de aprobación SICOFI: [[ get_approval() and get_approval().approval_number or '' ]]</para> |
539 | + <para style="P2">Número de aprobación SICOFI: [[ ( o.type in ['out_invoice', 'out_refund'] ) and ( o.state in ['open', 'paid', 'cancel'] ) and get_approval().approval_number or 'SIN FOLIO O ESTATUS NO VALIDO' ]] </para> |
540 | <para style="P2"> |
541 | <font color="white"> </font> |
542 | </para> |
543 | @@ -360,7 +356,7 @@ |
544 | <para style="terp_default_9"> |
545 | <font color="white"> </font> |
546 | </para> |
547 | - <para style="P15">Vendedor: [[o.user_id.name]]</para> |
548 | + <para style="P18">Vendedor: [[o.user_id.name]]</para> |
549 | <para style="terp_default_9">[[ format(o.comment or '') ]]</para> |
550 | </section> |
551 | </story> |
552 | |
553 | === modified file 'l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw' |
554 | Binary files l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw 2012-11-16 23:59:38 +0000 and l10n_mx_facturae_cbb/report/invoice_facturae_pdf.sxw 2013-04-01 22:28:22 +0000 differ |