Merge lp:~agilebg/openobject-italia/adding_l10n_it_DDT_webkit_7 into lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0

Proposed by Lorenzo Battistini
Status: Merged
Merged at revision: 233
Proposed branch: lp:~agilebg/openobject-italia/adding_l10n_it_DDT_webkit_7
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
Diff against target: 406 lines (+369/-0)
7 files modified
l10n_it_DDT_webkit/__init__.py (+25/-0)
l10n_it_DDT_webkit/__openerp__.py (+38/-0)
l10n_it_DDT_webkit/i18n/it.po (+93/-0)
l10n_it_DDT_webkit/report.xml (+16/-0)
l10n_it_DDT_webkit/report/__init__.py (+24/-0)
l10n_it_DDT_webkit/report/ddt.mako (+121/-0)
l10n_it_DDT_webkit/report/stock_report.py (+52/-0)
To merge this branch: bzr merge lp:~agilebg/openobject-italia/adding_l10n_it_DDT_webkit_7
Reviewer Review Type Date Requested Status
Nicola Malcontenti - Agile BG (community) Approve
Alex Comba - Agile BG (community) code review, no test Approve
Davide Corio (community) Abstain
Review via email: mp+194900@code.launchpad.net
To post a comment you must log in.
231. By Lorenzo Battistini

[FIX] print header DDT

232. By Lorenzo Battistini

[IMP] layout

233. By Nicola Malcontenti - Agile BG

[FIX] Translation

Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

Ho testato il report.
A parte un errore di traduzione (quantià invece di quantità), mi pare tutto in ordine.

Non sto a sindacare sul layout (impostazioni grafiche, disposizione dei campi, etc) o sulla presenza di tutti i dati richiesti dalla normativa, ma mi chiedevo se non conveniva avere un DDT "più classico" ovvero diverso dallo standard dei report di OpenERP.

E' verissimo che quasi tutti usano stampe personalizzate, ma penso che nessuno userebbe questo in particolare.

Ovviamente il sunto del discorso è che possiamo partire da questo è migliorarlo!

review: Abstain
Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 12/11/2013 06:56 PM, Davide Corio wrote:
> Review: Abstain
>
> Ho testato il report.
> A parte un errore di traduzione (quantià invece di quantità), mi pare tutto in ordine.
>
> Non sto a sindacare sul layout (impostazioni grafiche, disposizione dei campi, etc) o sulla presenza di tutti i dati richiesti dalla normativa, ma mi chiedevo se non conveniva avere un DDT "più classico" ovvero diverso dallo standard dei report di OpenERP.

Preciso solo che quella proposta è le versione 'DDT' del report webkit
generico per il picking:
http://bazaar.launchpad.net/~stock-logistic-core-editors/stock-logistic-report/7.0/view/head:/stock_picking_webkit/report/delivery_slip.mako
<http://bazaar.launchpad.net/%7Estock-logistic-core-editors/stock-logistic-report/7.0/view/head:/stock_picking_webkit/report/delivery_slip.mako>

Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

Certamente.
Alla fine stiamo comunque parlando più che altro di aggiustamente grafici, per far si che un eventuale DDT ufficiale nella localizzazione italiana venga accettato dagli utenti.

Siamo tutti d'accordo sul fatto che i template ufficiali sono inguardabili :)

Revision history for this message
Alex Comba - Agile BG (tafaru) :
review: Approve (code review, no test)
Revision history for this message
Nicola Malcontenti - Agile BG (hurrin1c0) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'l10n_it_DDT_webkit'
=== added file 'l10n_it_DDT_webkit/__init__.py'
--- l10n_it_DDT_webkit/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/__init__.py 2013-12-11 16:16:01 +0000
@@ -0,0 +1,25 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013
5# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
6#
7# Copyright (c) 2013 Agile Business Group (http://www.agilebg.com)
8# @author Lorenzo Battistini
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25import report
026
=== added file 'l10n_it_DDT_webkit/__openerp__.py'
--- l10n_it_DDT_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/__openerp__.py 2013-12-11 16:16:01 +0000
@@ -0,0 +1,38 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013
5# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
6#
7# Copyright (c) 2013 Agile Business Group (http://www.agilebg.com)
8# @author Lorenzo Battistini
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25{
26 'name': 'DDT report using Webkit Library',
27 'version': '1.0',
28 'category': 'Reports/Webkit',
29 'description': """
30This module adds the webkit DDT report
31 """,
32 'author': 'Agile Business Group',
33 'website': 'http://www.agilebg.com',
34 'depends': ['report_webkit', 'l10n_it_sale', 'base_headers_webkit'],
35 'data': ['report.xml'],
36 'installable': True,
37 'active': False,
38}
039
=== added directory 'l10n_it_DDT_webkit/i18n'
=== added file 'l10n_it_DDT_webkit/i18n/it.po'
--- l10n_it_DDT_webkit/i18n/it.po 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/i18n/it.po 2013-12-11 16:16:01 +0000
@@ -0,0 +1,93 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * l10n_it_DDT_webkit
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-12-11 15:23+0000\n"
10"PO-Revision-Date: 2013-12-11 16:34+0100\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: 8bit\n"
16"Plural-Forms: \n"
17"Language: it\n"
18"X-Generator: Poedit 1.6.2\n"
19
20#. module: l10n_it_DDT_webkit
21#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:54
22msgid "Origin"
23msgstr "Origine"
24
25#. module: l10n_it_DDT_webkit
26#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:74
27msgid "Scheduled Date"
28msgstr "Data Schedulazione"
29
30#. module: l10n_it_DDT_webkit
31#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:72
32msgid "Reason For Transportation"
33msgstr "Causale del trasporto"
34
35#. module: l10n_it_DDT_webkit
36#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:88
37msgid "Description"
38msgstr "Descrizione"
39
40#. module: l10n_it_DDT_webkit
41#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:56
42msgid "Weight"
43msgstr "Peso"
44
45#. module: l10n_it_DDT_webkit
46#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:71
47msgid "Description of goods"
48msgstr "Aspetto dei Beni"
49
50#. module: l10n_it_DDT_webkit
51#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:57
52msgid "Nr. package"
53msgstr "Nr. Pacchi"
54
55#. module: l10n_it_DDT_webkit
56#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:36
57msgid "Invoice address:"
58msgstr "Indirizzo Fatturazione:"
59
60#. module: l10n_it_DDT_webkit
61#: model:ir.actions.report.xml,name:l10n_it_DDT_webkit.ddt_webkit
62msgid "DDT"
63msgstr "DDT"
64
65#. module: l10n_it_DDT_webkit
66#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:55
67msgid "DDT date"
68msgstr "Data DDT"
69
70#. module: l10n_it_DDT_webkit
71#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:89
72msgid "Serial Number"
73msgstr "Numero Seriale"
74
75#. module: l10n_it_DDT_webkit
76#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:53
77msgid "Contact"
78msgstr "Contatto"
79
80#. module: l10n_it_DDT_webkit
81#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:73
82msgid "Carriage condition"
83msgstr "Resa merce"
84
85#. module: l10n_it_DDT_webkit
86#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:75
87msgid "Delivery Method"
88msgstr "Metodo Spedizione"
89
90#. module: l10n_it_DDT_webkit
91#: report:addons/l10n_it_DDT_webkit/report/ddt.mako:90
92msgid "Quantity"
93msgstr "Quantià"
094
=== added directory 'l10n_it_DDT_webkit/report'
=== added file 'l10n_it_DDT_webkit/report.xml'
--- l10n_it_DDT_webkit/report.xml 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/report.xml 2013-12-11 16:16:01 +0000
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <report id="ddt_webkit"
6 name="ddt_webkit"
7 auto="False"
8 model="stock.picking.out"
9 file="l10n_it_DDT_webkit/report/ddt.mako"
10 string="DDT"
11 report_type="webkit"
12 header="True"
13 webkit_header="base_headers_webkit.base_reports_portrait_header" />
14
15 </data>
16</openerp>
017
=== added file 'l10n_it_DDT_webkit/report/__init__.py'
--- l10n_it_DDT_webkit/report/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/report/__init__.py 2013-12-11 16:16:01 +0000
@@ -0,0 +1,24 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013
5# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
6#
7# Copyright (c) 2013 Agile Business Group (http://www.agilebg.com)
8# @author Lorenzo Battistini
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24import stock_report
025
=== added file 'l10n_it_DDT_webkit/report/ddt.mako'
--- l10n_it_DDT_webkit/report/ddt.mako 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/report/ddt.mako 2013-12-11 16:16:01 +0000
@@ -0,0 +1,121 @@
1<html>
2<head>
3 <style type="text/css">
4 ${css}
5 </style>
6</head>
7
8<body>
9 <%page expression_filter="entity"/>
10 <%
11 def carriage_returns(text):
12 return text.replace('\n', '<br />')
13 %>
14 %for picking in objects:
15 <% setLang(picking.partner_id.lang) %>
16 <div class="address">
17 <table class="recipient">
18 %if picking.partner_id.parent_id:
19 <tr><td class="name">${picking.partner_id.parent_id.name or ''}</td></tr>
20 <tr><td>${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }</td></tr>
21 <% address_lines = picking.partner_id.contact_address.split("\n")[1:] %>
22 %else:
23 <tr><td class="name">${picking.partner_id.title and picking.partner_id.title.name or ''} ${picking.partner_id.name }</td></tr>
24 <% address_lines = picking.partner_id.contact_address.split("\n") %>
25 %endif
26 %for part in address_lines:
27 %if part:
28 <tr><td>${part}</td></tr>
29 %endif
30 %endfor
31 </table>
32 <%
33 invoice_addr = invoice_address(picking)
34 %>
35 <table class="invoice">
36 <tr><td class="address_title">${_("Invoice address:")}</td></tr>
37 <tr><td>${invoice_addr.title and invoice_addr.title.name or ''} ${invoice_addr.name }</td></tr>
38 %if invoice_addr.contact_address:
39 <% address_lines = invoice_addr.contact_address.split("\n") %>
40 %for part in address_lines:
41 %if part:
42 <tr><td>${part}</td></tr>
43 %endif
44 %endfor
45 %endif
46 </table>
47 </div>
48
49 <h1 style="clear:both;">DDT n.: ${picking.ddt_number or ''}</h1>
50
51 <table class="basic_table" width="100%">
52 <tr>
53 <td style="font-weight:bold;">${_('Contact')}</td>
54 <td style="font-weight:bold;">${_('Origin')}</td>
55 <td style="font-weight:bold;">${_('DDT date')}</td>
56 <td style="font-weight:bold;">${_('Weight')}</td>
57 <td style="font-weight:bold;">${_('Nr. package')}</td>
58 </tr>
59 <tr>
60 <td>${user.name}</td>
61 <td>${picking.origin or ''}</td>
62 <td>${formatLang(picking.ddt_date, date=True)}</td>
63 <td>${picking.weight}</td>
64 <td>${picking.number_of_packages}</td>
65 </tr>
66 </table>
67 <br />
68 <br />
69 <table class="basic_table" width="100%">
70 <tr>
71 <td style="font-weight:bold;">${_('Description of goods')}</td>
72 <td style="font-weight:bold;">${_("Reason For Transportation")}</td>
73 <td style="font-weight:bold;">${_("Carriage condition")}</td>
74 <td style="font-weight:bold;">${_('Scheduled Date')}</td>
75 <td style="font-weight:bold;">${_('Delivery Method')}</td>
76 </tr>
77 <tr>
78 <td>${picking.goods_description_id and picking.goods_description_id.name or '' }</td>
79 <td>${picking.transportation_reason_id and picking.transportation_reason_id.name or ''}</td>
80 <td>${picking.carriage_condition_id and picking.carriage_condition_id.name or ''}</td>
81 <td>${formatLang(picking.min_date, date=True)}</td>
82 <td>${picking.carrier_id and picking.carrier_id.name or ''}</td>
83 </tr>
84 </table>
85 <table class="list_table td " width="100%" style="margin-top: 20px;">
86 <thead>
87 <tr>
88 <th style="text-align:left; ">${_("Description")}</th>
89 <th style="text-align:left; ">${_("Serial Number")}</th>
90 <th class="amount">${_("Quantity")}</th>
91 </tr>
92 </thead>
93 <tbody>
94 %for line in picking.move_lines:
95 <tr class="line" >
96 <td style="text-align:left; " >${ line.name }</td>
97 <td style="text-align:left; " >${ line.prodlot_id and line.prodlot_id.name or ''}</td>
98 <td class="amount" >${ formatLang(line.product_qty) } ${line.product_uom.name}</td>
99 </tr>
100 %endfor
101 </table>
102
103 <br/>
104 %if picking.note :
105 <p class="std_text">${picking.note | carriage_returns}</p>
106 %endif
107 <br/><br/><br/><br/>
108 <table class="basic_table" width="100%">
109 <tr>
110 <td style="font-weight:bold;">Data Ritiro</td>
111 <td style="font-weight:bold;">Firma</td>
112 </tr>
113 <tr>
114 <td><br /></td>
115 <td><br /><br /></td>
116 </tr>
117 </table>
118 <p style="page-break-after: always"/>
119 %endfor
120</body>
121</html>
0122
=== added file 'l10n_it_DDT_webkit/report/stock_report.py'
--- l10n_it_DDT_webkit/report/stock_report.py 1970-01-01 00:00:00 +0000
+++ l10n_it_DDT_webkit/report/stock_report.py 2013-12-11 16:16:01 +0000
@@ -0,0 +1,52 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (C) 2013
5# Associazione OpenERP Italia (<http://www.openerp-italia.org>)
6#
7# Copyright (c) 2013 Agile Business Group (http://www.agilebg.com)
8# @author Lorenzo Battistini
9#
10# This program is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23
24import operator
25from report import report_sxw
26import pooler
27import time
28
29
30class DeliverySlip(report_sxw.rml_parse):
31
32 def _get_invoice_address(self, picking):
33 if picking.sale_id:
34 return picking.sale_id.partner_invoice_id
35 partner_obj = self.pool.get('res.partner')
36 invoice_address_id = picking.partner_id.address_get(
37 adr_pref=['invoice']
38 )['invoice']
39 return partner_obj.browse(
40 self.cr, self.uid, invoice_address_id)
41
42 def __init__(self, cr, uid, name, context):
43 super(DeliverySlip, self).__init__(cr, uid, name, context=context)
44 self.localcontext.update({
45 'time': time,
46 'invoice_address': self._get_invoice_address,
47 })
48
49report_sxw.report_sxw('report.ddt_webkit',
50 'stock.picking',
51 'addons/l10n_it_DDT_webkit/report/ddt.mako',
52 parser=DeliverySlip)

Subscribers

People subscribed via source and target branches