Merge lp:~vauxoo/addons-vauxoo/7.0_addons-vauxoo_account_move_report-yzk into lp:addons-vauxoo/7.0

Proposed by Isaac López Zúñiga
Status: Merged
Merged at revision: 924
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0_addons-vauxoo_account_move_report-yzk
Merge into: lp:addons-vauxoo/7.0
Diff against target: 583 lines (+535/-0)
9 files modified
account_move_report/__init__.py (+23/-0)
account_move_report/__openerp__.py (+50/-0)
account_move_report/account_move_report.xml (+21/-0)
account_move_report/data.xml (+99/-0)
account_move_report/i18n/account_move_report.pot (+77/-0)
account_move_report/i18n/es.po (+72/-0)
account_move_report/report/__init__.py (+24/-0)
account_move_report/report/account_move_html.py (+51/-0)
account_move_report/report/account_move_report_html.mako (+118/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0_addons-vauxoo_account_move_report-yzk
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Approve
Review via email: mp+194584@code.launchpad.net

Description of the change

Agrega el módulo account_move_report

To post a comment you must log in.
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Hola Isaac puedes agregar por favor el archivo account_move_report.pot

Para que de ahora en adelante launchpad se encargue de la traducción

Saludos

926. By Isaac López Zúñiga

[ADD][account_move_report.pot]

927. By Isaac López Zúñiga

[REF][account_move_report] translation

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_move_report'
2=== added file 'account_move_report/__init__.py'
3--- account_move_report/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_move_report/__init__.py 2013-11-08 21:42:25 +0000
5@@ -0,0 +1,23 @@
6+#!/usr/bin/python
7+# -*- encoding: utf-8 -*-
8+###########################################################################
9+# Module Writen to OpenERP, Open Source Management Solution
10+# Copyright (C) Vauxoo (<http://vauxoo.com>).
11+# All Rights Reserved
12+###############Credits######################################################
13+# Coded by: Luis Ernesto García (ernesto_gm@vauxoo.com)
14+#############################################################################
15+# This program is free software: you can redistribute it and/or modify
16+# it under the terms of the GNU Affero General Public License as published by
17+# the Free Software Foundation, either version 3 of the License, or
18+# (at your option) any later version.
19+#
20+# This program is distributed in the hope that it will be useful,
21+# but WITHOUT ANY WARRANTY; without even the implied warranty of
22+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+# GNU Affero General Public License for more details.
24+#
25+# You should have received a copy of the GNU Affero General Public License
26+# along with this program. If not, see <http://www.gnu.org/licenses/>.
27+################################################################################
28+import report
29
30=== added file 'account_move_report/__openerp__.py'
31--- account_move_report/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ account_move_report/__openerp__.py 2013-11-08 21:42:25 +0000
33@@ -0,0 +1,50 @@
34+#!/usr/bin/python
35+# -*- encoding: utf-8 -*-
36+###########################################################################
37+# Module Writen to OpenERP, Open Source Management Solution
38+# Copyright (C) Vauxoo (<http://vauxoo.com>).
39+# All Rights Reserved
40+###############Credits######################################################
41+# Coded by: Luis Ernesto García (ernesto_gm@vauxoo.com)
42+#############################################################################
43+# This program is free software: you can redistribute it and/or modify
44+# it under the terms of the GNU Affero General Public License as published by
45+# the Free Software Foundation, either version 3 of the License, or
46+# (at your option) any later version.
47+#
48+# This program is distributed in the hope that it will be useful,
49+# but WITHOUT ANY WARRANTY; without even the implied warranty of
50+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+# GNU Affero General Public License for more details.
52+#
53+# You should have received a copy of the GNU Affero General Public License
54+# along with this program. If not, see <http://www.gnu.org/licenses/>.
55+################################################################################
56+
57+{
58+ "name" : "Journal Entries report",
59+ "version" : "1.0",
60+ "author" : "Vauxoo",
61+ "category" : "Accouting",
62+ "description" : """
63+Report for Journal Entries
64+==========================
65+
66+This module adds a report in journal entries. You can print one o several
67+journal entries in PDF file.
68+
69+ """,
70+ "website" : "http://www.vauxoo.com/",
71+ "license" : "AGPL-3",
72+ "depends" : [
73+ "account",
74+ "report_webkit",
75+ ],
76+ "demo" : [],
77+ "data" : [
78+ "data.xml",
79+ "account_move_report.xml",
80+ ],
81+ "installable" : True,
82+ "active" : False,
83+}
84
85=== added file 'account_move_report/account_move_report.xml'
86--- account_move_report/account_move_report.xml 1970-01-01 00:00:00 +0000
87+++ account_move_report/account_move_report.xml 2013-11-08 21:42:25 +0000
88@@ -0,0 +1,21 @@
89+<?xml version="1.0" encoding="utf-8"?>
90+<openerp>
91+ <data>
92+ <report auto="False"
93+ id="account_move_report_webkit"
94+ model="account.move"
95+ name="account.move.report.webkit"
96+ file="account_move_report/report/account_move_report_html.mako"
97+ string="Report Journal Entries"
98+ report_type="webkit"
99+ attachment_use="1"/>
100+
101+ <record id="property_account_move_report_webkit" model="ir.property">
102+ <field name="name">webkit_header</field>
103+ <field name="fields_id" ref="report_webkit.field_ir_act_report_xml_webkit_header"/>
104+ <field eval="'ir.header_webkit,'+str(ref('account_move_report.ir_header_webkit_account_move'))" model="ir.header_webkit" name="value"/>
105+ <field eval="'ir.actions.report.xml,'+str(ref('account_move_report.account_move_report_webkit'))" model="ir.actions.report.xml" name="res_id"/>
106+ </record>
107+
108+ </data>
109+</openerp>
110
111=== added file 'account_move_report/data.xml'
112--- account_move_report/data.xml 1970-01-01 00:00:00 +0000
113+++ account_move_report/data.xml 2013-11-08 21:42:25 +0000
114@@ -0,0 +1,99 @@
115+<?xml version="1.0" ?>
116+<openerp>
117+ <data noupdate="1">
118+ <record id="ir_header_webkit_account_move" model="ir.header_webkit">
119+ <field name="footer_html"><![CDATA[<html>
120+ <head>
121+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
122+ <script>
123+ function subst() {
124+ var vars={};
125+ var x=document.location.search.substring(1).split('&');
126+ for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
127+ var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
128+ for(var i in x) {
129+ var y = document.getElementsByClassName(x[i]);
130+ for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
131+ }
132+ }
133+ </script>
134+ </head>
135+ <body style="border:0; margin: 0;" onload="subst()">
136+ <table style="border-top: 1px solid black; width: 100%">
137+ <tr >
138+ <td style="text-align:right;font-size:9;" width="35%">Generado con software libre en OpenERP y Webkit por http://www.vauxoo.com</td>
139+ <td style="text-align:right;font-size:12;" width="55%">Page <span class="page"/></td><td style="text-align:left;font-size:12;"> of <span class="topage"/></td>
140+ </tr>
141+ </table>
142+ </body>
143+</html>]]></field>
144+ <field name="orientation">Portrait</field>
145+ <field name="format">Letter</field>
146+ <field name="html"><![CDATA[<html>
147+ <head>
148+ <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
149+ <script>
150+ function subst() {
151+ var vars={};
152+ var x=document.location.search.substring(1).split('&');
153+ for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
154+ var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
155+ for(var i in x) {
156+ var y = document.getElementsByClassName(x[i]);
157+ for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
158+ }
159+ }
160+ </script>
161+ <style type="text/css">
162+ ${css}
163+ </style>
164+ </head>
165+ <body style="border:0; margin: 0;" onload="subst()">
166+ ${_debug or ''|n} </body>
167+</html>]]>
168+</field>
169+ <field eval="0.0" name="margin_top"/>
170+ <field name="css" ><![CDATA[
171+.company_font{
172+text-align: center;
173+font-size: 16pt;
174+}
175+td.basic_td
176+{
177+text-align: center;
178+font-size: 10;
179+padding-right:3px;
180+padding-left:3px;
181+}
182+td.dir_font{
183+font-size: 10;
184+text-align: center;
185+}
186+td.date_font{
187+font-size: 12;
188+text-align: center;
189+}
190+.title
191+{
192+text-align: center;
193+border-top:1px solid #000000;
194+border-bottom: solid 1.5px #000000;
195+font-size: 12;
196+padding-right:3px;
197+padding-left:3px;
198+}
199+.table
200+{
201+border-collapse:collapse;
202+}
203+
204+
205+]]> </field>
206+ <field name="name">Poliza</field>
207+ </record>
208+ <record id="ir_header_img_companylogo0" model="ir.header_img">
209+ <field eval="&quot;&quot;&quot;jpg&quot;&quot;&quot;" name="type"/>
210+ <field eval="&quot;&quot;&quot;company_logo&quot;&quot;&quot;" name="name"/>
211+ </record>
212+ </data>
213+</openerp>
214
215=== added directory 'account_move_report/i18n'
216=== added file 'account_move_report/i18n/account_move_report.pot'
217--- account_move_report/i18n/account_move_report.pot 1970-01-01 00:00:00 +0000
218+++ account_move_report/i18n/account_move_report.pot 2013-11-08 21:42:25 +0000
219@@ -0,0 +1,77 @@
220+# Translation of OpenERP Server.
221+# This file contains the translation of the following modules:
222+# * account_move_report
223+#
224+msgid ""
225+msgstr ""
226+"Project-Id-Version: OpenERP Server 7.0\n"
227+"Report-Msgid-Bugs-To: \n"
228+"POT-Creation-Date: 2013-11-08 21:04+0000\n"
229+"PO-Revision-Date: 2013-11-08 21:04+0000\n"
230+"Last-Translator: <>\n"
231+"Language-Team: \n"
232+"MIME-Version: 1.0\n"
233+"Content-Type: text/plain; charset=UTF-8\n"
234+"Content-Transfer-Encoding: \n"
235+"Plural-Forms: \n"
236+
237+#. module: account_move_report
238+#: report:addons/account_move_report/report/account_move_report_html.mako:55
239+msgid "Account"
240+msgstr ""
241+
242+#. module: account_move_report
243+#: report:addons/account_move_report/report/account_move_report_html.mako:49
244+msgid "Name"
245+msgstr ""
246+
247+#. module: account_move_report
248+#: report:addons/account_move_report/report/account_move_report_html.mako:58
249+msgid "Due date"
250+msgstr ""
251+
252+#. module: account_move_report
253+#: report:addons/account_move_report/report/account_move_report_html.mako:41
254+msgid "Date: "
255+msgstr ""
256+
257+#. module: account_move_report
258+#: report:addons/account_move_report/report/account_move_report_html.mako:38
259+msgid "Reference: "
260+msgstr ""
261+
262+#. module: account_move_report
263+#: report:addons/account_move_report/report/account_move_report_html.mako:67
264+msgid "Analytic Account"
265+msgstr ""
266+
267+#. module: account_move_report
268+#: report:addons/account_move_report/report/account_move_report_html.mako:64
269+msgid "Credit"
270+msgstr ""
271+
272+#. module: account_move_report
273+#: report:addons/account_move_report/report/account_move_report_html.mako:26
274+msgid "Printing Date:"
275+msgstr ""
276+
277+#. module: account_move_report
278+#: model:ir.actions.report.xml,name:account_move_report.account_move_report_webkit
279+msgid "Report Journal Entries"
280+msgstr ""
281+
282+#. module: account_move_report
283+#: report:addons/account_move_report/report/account_move_report_html.mako:61
284+msgid "Debit"
285+msgstr ""
286+
287+#. module: account_move_report
288+#: report:addons/account_move_report/report/account_move_report_html.mako:52
289+msgid "Partner"
290+msgstr ""
291+
292+#. module: account_move_report
293+#: report:addons/account_move_report/report/account_move_report_html.mako:34
294+msgid "Journal Entries: "
295+msgstr ""
296+
297
298=== added file 'account_move_report/i18n/es.po'
299--- account_move_report/i18n/es.po 1970-01-01 00:00:00 +0000
300+++ account_move_report/i18n/es.po 2013-11-08 21:42:25 +0000
301@@ -0,0 +1,72 @@
302+# Translation of OpenERP Server.
303+# This file contains the translation of the following modules:
304+# * account_move_report
305+#
306+msgid ""
307+msgstr ""
308+"Project-Id-Version: OpenERP Server 7.0\n"
309+"Report-Msgid-Bugs-To: \n"
310+"POT-Creation-Date: 2013-06-25 01:22+0000\n"
311+"PO-Revision-Date: 2013-06-24 18:23-0800\n"
312+"Last-Translator: <>\n"
313+"Language-Team: \n"
314+"MIME-Version: 1.0\n"
315+"Content-Type: text/plain; charset=UTF-8\n"
316+"Content-Transfer-Encoding: 8bit\n"
317+"Plural-Forms: \n"
318+"X-Generator: Poedit 1.5.4\n"
319+
320+#. module: account_move_report
321+#: report:addons/account_move_report/report/account_move_report_html.mako:51
322+msgid "Account"
323+msgstr "Cuenta"
324+
325+#. module: account_move_report
326+#: report:addons/account_move_report/report/account_move_report_html.mako:48
327+msgid "Name"
328+msgstr "Nombre"
329+
330+#. module: account_move_report
331+#: report:addons/account_move_report/report/account_move_report_html.mako:54
332+msgid "Due date"
333+msgstr "Fecha Vencimiento"
334+
335+#. module: account_move_report
336+#: report:addons/account_move_report/report/account_move_report_html.mako:38
337+msgid "Date: "
338+msgstr "Fecha: "
339+
340+#. module: account_move_report
341+#: report:addons/account_move_report/report/account_move_report_html.mako:41
342+msgid "Reference: "
343+msgstr "Referencia: "
344+
345+#. module: account_move_report
346+#: report:addons/account_move_report/report/account_move_report_html.mako:63
347+msgid "Analytic Account"
348+msgstr "Cuenta Analítica"
349+
350+#. module: account_move_report
351+#: report:addons/account_move_report/report/account_move_report_html.mako:60
352+msgid "Credit"
353+msgstr "Haber"
354+
355+#. module: account_move_report
356+#: report:addons/account_move_report/report/account_move_report_html.mako:26
357+msgid "Printing Date:"
358+msgstr "Fecha de impresión:"
359+
360+#. module: account_move_report
361+#: model:ir.actions.report.xml,name:account_move_report.account_move_report_webkit
362+msgid "Report Journal Entries"
363+msgstr "Reporte de Póliza"
364+
365+#. module: account_move_report
366+#: report:addons/account_move_report/report/account_move_report_html.mako:57
367+msgid "Debit"
368+msgstr "Debe"
369+
370+#. module: account_move_report
371+#: report:addons/account_move_report/report/account_move_report_html.mako:34
372+msgid "Journal Entries: "
373+msgstr "Póliza: "
374
375=== added file 'account_move_report/i18n/es_MX.po'
376=== added directory 'account_move_report/report'
377=== added file 'account_move_report/report/__init__.py'
378--- account_move_report/report/__init__.py 1970-01-01 00:00:00 +0000
379+++ account_move_report/report/__init__.py 2013-11-08 21:42:25 +0000
380@@ -0,0 +1,24 @@
381+#!/usr/bin/python
382+# -*- encoding: utf-8 -*-
383+###########################################################################
384+# Module Writen to OpenERP, Open Source Management Solution
385+# Copyright (C) Vauxoo (<http://vauxoo.com>).
386+# All Rights Reserved
387+###############Credits######################################################
388+# Coded by: Luis Ernesto García (ernesto_gm@vauxoo.com)
389+#############################################################################
390+# This program is free software: you can redistribute it and/or modify
391+# it under the terms of the GNU Affero General Public License as published by
392+# the Free Software Foundation, either version 3 of the License, or
393+# (at your option) any later version.
394+#
395+# This program is distributed in the hope that it will be useful,
396+# but WITHOUT ANY WARRANTY; without even the implied warranty of
397+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
398+# GNU Affero General Public License for more details.
399+#
400+# You should have received a copy of the GNU Affero General Public License
401+# along with this program. If not, see <http://www.gnu.org/licenses/>.
402+################################################################################
403+
404+import account_move_html
405
406=== added file 'account_move_report/report/account_move_html.py'
407--- account_move_report/report/account_move_html.py 1970-01-01 00:00:00 +0000
408+++ account_move_report/report/account_move_html.py 2013-11-08 21:42:25 +0000
409@@ -0,0 +1,51 @@
410+#!/usr/bin/python
411+# -*- encoding: utf-8 -*-
412+###########################################################################
413+# Module Writen to OpenERP, Open Source Management Solution
414+# Copyright (C) Vauxoo (<http://vauxoo.com>).
415+# All Rights Reserved
416+###############Credits######################################################
417+# Coded by: Luis Ernesto García (ernesto_gm@vauxoo.com)
418+#############################################################################
419+# This program is free software: you can redistribute it and/or modify
420+# it under the terms of the GNU Affero General Public License as published by
421+# the Free Software Foundation, either version 3 of the License, or
422+# (at your option) any later version.
423+#
424+# This program is distributed in the hope that it will be useful,
425+# but WITHOUT ANY WARRANTY; without even the implied warranty of
426+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
427+# GNU Affero General Public License for more details.
428+#
429+# You should have received a copy of the GNU Affero General Public License
430+# along with this program. If not, see <http://www.gnu.org/licenses/>.
431+################################################################################
432+from openerp.report import report_sxw
433+from openerp.tools.translate import _
434+import time
435+from report_webkit import report_helper
436+from report_webkit import webkit_report
437+
438+class account_move_report_html(report_sxw.rml_parse):
439+ def __init__(self, cr, uid, name, context):
440+ super(account_move_report_html, self).__init__(cr, uid, name,
441+ context=context)
442+ self.localcontext.update({
443+ 'time': time,
444+ 'get_total_debit_credit' : self.get_total_debit_credit,
445+ })
446+
447+ def get_total_debit_credit(self, line_ids):
448+ sum_tot_debit = 0.00
449+ sum_tot_credit = 0.00
450+ for line in line_ids:
451+ sum_tot_debit += (line.debit)
452+ sum_tot_credit += (line.credit)
453+ return {'sum_tot_debit' : sum_tot_debit, 'sum_tot_credit' : sum_tot_credit}
454+
455+webkit_report.WebKitParser('report.account.move.report.webkit',
456+ 'account.move',
457+ 'addons/report_account_move/report/account_move_report_html.mako',
458+ parser=account_move_report_html)
459+
460+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
461
462=== added file 'account_move_report/report/account_move_report_html.mako'
463--- account_move_report/report/account_move_report_html.mako 1970-01-01 00:00:00 +0000
464+++ account_move_report/report/account_move_report_html.mako 2013-11-08 21:42:25 +0000
465@@ -0,0 +1,118 @@
466+<html>
467+ <head>
468+ <style type="text/css">
469+ ${css}
470+ </style>
471+ </head>
472+ <body>
473+ %for o in objects :
474+ <table width = '100%' class='table'>
475+ <tr>
476+ <td style="vertical-align: top;">
477+ ${helper.embed_image('jpeg',str(o.company_id.logo),180, 85)}
478+ </td>
479+ <td class='dir_font'>
480+ <div class='company_font'>${o.company_id.name or ''|entity}</div>
481+ <br>${o.company_id.partner_id.street or ''|entity} No.
482+ ${o.company_id.partner_id.l10n_mx_street4 or ''|entity}
483+ ${o.company_id.partner_id.l10n_mx_street3 or ''|entity}
484+ ${o.company_id.partner_id.street2 or ''|entity}
485+ ${o.company_id.partner_id.zip or ''|entity}
486+ <br/>${o.company_id.partner_id.city or ''|entity}
487+ , ${o.company_id.partner_id.state_id.name or ''|entity}
488+ , ${o.company_id.partner_id.country_id.name or ''|entity}
489+ </td>
490+ <td class='date_font'>
491+ <div>${_("Printing Date:")} ${time.strftime('%Y-%m-%d %H:%M:%S')}</div>
492+ </td>
493+
494+ </tr>
495+ </table>
496+
497+ <table>
498+ <tr>
499+ <div>${_("Journal Entries: ")} ${o.name or '' |entity}</div>
500+
501+ </tr>
502+ <tr>
503+ <div>${_("Reference: ")} ${o.ref or '' |entity}</div>
504+ </tr>
505+ <tr>
506+ <div>${_("Date: ")} ${o.date or '' |entity}</div>
507+ </tr>
508+
509+ </table>
510+
511+ <table width= '100%' class='title'>
512+ <tr>
513+ <td width='14%'>
514+ <div>${_("Name")}</div>
515+ </td>
516+ <td width='14%'>
517+ <div>${_("Partner")}</div>
518+ </td>
519+ <td width='27%'>
520+ <div>${_("Account")}</div>
521+ </td>
522+ <td width='7%'>
523+ <div>${_("Due date")}</div>
524+ </td>
525+ <td width='12%'>
526+ <div>${_("Debit")}</div>
527+ </td>
528+ <td width='12%'>
529+ <div>${_("Credit")}</div>
530+ </td>
531+ <td width='14%'>
532+ <div>${_("Analytic Account")}</div>
533+ </td>
534+ </tr>
535+ </table>
536+
537+ <table width= '100%' class='table'>
538+ %for line in o.line_id:
539+ <tr>
540+ <td width='14%' class='basic_td'>
541+ <div>${line.name or '' |entity}</div>
542+ </td>
543+ <td width='14%' class='basic_td'>
544+ <div>${line.partner_id.name}</div>
545+ </td>
546+ <td width='27%' class='basic_td'>
547+ <div>${line.account_id.code or '' |entity} - ${line.account_id.name or '' |entity}</div>
548+ </td>
549+ <td width='7%' class='basic_td'>
550+ <div>${line.date_maturity or '' |entity}</div>
551+ </td>
552+ <td width='12%' class='basic_td' style="text-align:right;">
553+ <div>${line.debit or '0.00' |entity}</div>
554+ </td>
555+ <td width='12%' class='basic_td' style="text-align:right;">
556+ <div>${line.credit or '0.00' |entity}</div>
557+ </td>
558+ <td width='14%' class='basic_td'>
559+ <div>${line.analytic_account_id.name or '' |entity}</div>
560+ </td>
561+ </tr>
562+ %endfor
563+ </table>
564+ <table width= '100%' class='table'>
565+ <tr>
566+ <td width='14%'></td>
567+ <td width='37%'></td>
568+ <td width='7%'></td>
569+ <td style="border-top:1px solid #000000; text-align:right;" class='basic_td'>
570+ <div width='14%' >${formatLang(get_total_debit_credit(o.line_id)['sum_tot_debit']) or '0.00' |entity}</div>
571+ </td>
572+ <td style="border-top:1px solid #000000; text-align:right;" class='basic_td'>
573+ <div width='14%'>${formatLang(get_total_debit_credit(o.line_id)['sum_tot_credit']) or '0.00' |entity}</div>
574+ </td>
575+ <td width='14%'></td>
576+ </tr>
577+
578+ </table>
579+<p style="page-break-after:always"></p>
580+ %endfor
581+
582+ </body>
583+</html>