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

Proposed by Andrea Cometa
Status: Merged
Merged at revision: 208
Proposed branch: lp:~scigghia/openobject-italia/7.0
Merge into: lp:~openobject-italia-core-devs/openobject-italia/italian-addons-7.0
Diff against target: 1382 lines (+1235/-0)
28 files modified
l10n_it_sale/AUTHORS.txt (+10/-0)
l10n_it_sale/__init__.py (+26/-0)
l10n_it_sale/__openerp__.py (+56/-0)
l10n_it_sale/account/__init__.py (+23/-0)
l10n_it_sale/account/invoice.py (+51/-0)
l10n_it_sale/account/invoice_view.xml (+25/-0)
l10n_it_sale/i18n/it.po (+202/-0)
l10n_it_sale/i18n/l10n_it_sale.pot (+196/-0)
l10n_it_sale/partner/__init__.py (+22/-0)
l10n_it_sale/partner/partner.py (+31/-0)
l10n_it_sale/partner/partner_view.xml (+21/-0)
l10n_it_sale/sale/__init__.py (+23/-0)
l10n_it_sale/sale/sale.py (+59/-0)
l10n_it_sale/sale/sale_view.xml (+15/-0)
l10n_it_sale/security/ir.model.access.csv (+7/-0)
l10n_it_sale/stock/__init__.py (+24/-0)
l10n_it_sale/stock/carriage_condition_data.xml (+14/-0)
l10n_it_sale/stock/carriage_condition_view.xml (+42/-0)
l10n_it_sale/stock/goods_description_data.xml (+17/-0)
l10n_it_sale/stock/goods_description_view.xml (+42/-0)
l10n_it_sale/stock/picking.py (+106/-0)
l10n_it_sale/stock/picking_view.xml (+53/-0)
l10n_it_sale/stock/sequence.xml (+18/-0)
l10n_it_sale/stock/transportation_reason_data.xml (+14/-0)
l10n_it_sale/stock/transportation_reason_view.xml (+42/-0)
l10n_it_sale/wizard/__init__.py (+22/-0)
l10n_it_sale/wizard/assign_ddt.py (+45/-0)
l10n_it_sale/wizard/assign_ddt.xml (+29/-0)
To merge this branch: bzr merge lp:~scigghia/openobject-italia/7.0
Reviewer Review Type Date Requested Status
Andrea Cometa (community) Approve
Review via email: mp+153079@code.launchpad.net

Description of the change

Ho aggiunto il modulo l10n_it_sale, convertito e testato per OpenERP 7

To post a comment you must log in.
Revision history for this message
Andrea Cometa (scigghia) :
review: Approve
Revision history for this message
Lorenzo Battistini (elbati) wrote :

Citando Alexandre
Fayolle<https://code.launchpad.net/~elbati/sale-wkfl/adding_sale_delivery_term_7/+merge/147611/comments/322256>
:

When porting a module to V7, please:

* update __openerp__.py to use 'data' instead of 'init_xml' and
'update_xml', and 'demo' instead of 'demo_xml'
* update you python code to inherit from orm.Model (resp
orm.TransientModel) rather than osv.osv (resp. osv.osv_memory)
* update you python code tonot instantiate the model class

Try to keep line length reasonable. Ideally, 80 chars is great, but not
always the most convenient

Per il resto mi sembra vada tutto bene.

lp:~scigghia/openobject-italia/7.0 updated
207. By Andrea Cometa

l10n_it_sale standardization

Revision history for this message
Andrea Cometa (scigghia) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'l10n_it_sale'
2=== added file 'l10n_it_sale/AUTHORS.txt'
3--- l10n_it_sale/AUTHORS.txt 1970-01-01 00:00:00 +0000
4+++ l10n_it_sale/AUTHORS.txt 2013-03-14 11:13:28 +0000
5@@ -0,0 +1,10 @@
6+Davide Corio <davide.corio@domsense.com>
7+Luca Subiaco <subluca@gmail.com>
8+Simone Orsi <simone.orsi@domsense.com>
9+Mario Riva <mario.riva@domsense.com>
10+Mauro Soligo <mauro.soligo@katodo.com>
11+Giovanni Barzan <giovanni.barzan@gmail.com>
12+Lorenzo Battistini <lorenzo.battistini@albatos.com>
13+Roberto Onnis <onnis.roberto@gmail.com>
14+Franco Tampieri <franco.tampieri@agilebg.com>
15+Andrea Cometa <info@andreacometa.it>
16
17=== added file 'l10n_it_sale/__init__.py'
18--- l10n_it_sale/__init__.py 1970-01-01 00:00:00 +0000
19+++ l10n_it_sale/__init__.py 2013-03-14 11:13:28 +0000
20@@ -0,0 +1,26 @@
21+# -*- coding: utf-8 -*-
22+##############################################################################
23+#
24+# Copyright (C) 2010 Associazione OpenERP Italia
25+# (<http://www.openerp-italia.org>).
26+#
27+# This program is free software: you can redistribute it and/or modify
28+# it under the terms of the GNU Affero General Public License as published
29+# by the Free Software Foundation, either version 3 of the License, or
30+# (at your option) any later version.
31+#
32+# This program is distributed in the hope that it will be useful,
33+# but WITHOUT ANY WARRANTY; without even the implied warranty of
34+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35+# GNU General Public License for more details.
36+#
37+# You should have received a copy of the GNU Affero General Public License
38+# along with this program. If not, see <http://www.gnu.org/licenses/>.
39+#
40+##############################################################################
41+
42+import sale
43+import stock
44+import account
45+import partner
46+import wizard
47
48=== added file 'l10n_it_sale/__openerp__.py'
49--- l10n_it_sale/__openerp__.py 1970-01-01 00:00:00 +0000
50+++ l10n_it_sale/__openerp__.py 2013-03-14 11:13:28 +0000
51@@ -0,0 +1,56 @@
52+# -*- coding: utf-8 -*-
53+##############################################################################
54+#
55+# Copyright (C) 2010 Associazione OpenERP Italia
56+# (<http://www.openerp-italia.org>).
57+#
58+# This program is free software: you can redistribute it and/or modify
59+# it under the terms of the GNU Affero General Public License as published
60+# by the Free Software Foundation, either version 3 of the License, or
61+# (at your option) any later version.
62+#
63+# This program is distributed in the hope that it will be useful,
64+# but WITHOUT ANY WARRANTY; without even the implied warranty of
65+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66+# GNU General Public License for more details.
67+#
68+# You should have received a copy of the GNU Affero General Public License
69+# along with this program. If not, see <http://www.gnu.org/licenses/>.
70+#
71+##############################################################################
72+{
73+ 'name': 'Italian Localisation - Sale',
74+ 'version': '0.2',
75+ 'category': 'Localisation/Italy',
76+ 'description': """OpenERP Italian Localization - Sale version
77+
78+Functionalities:
79+
80+- Documento di trasporto
81+
82+""",
83+ 'author': 'OpenERP Italian Community',
84+ 'website': 'http://www.openerp-italia.org',
85+ 'license': 'AGPL-3',
86+ "depends" : ['stock', 'sale', 'account', 'delivery'],
87+ "data" : [
88+ 'wizard/assign_ddt.xml',
89+ 'stock/picking_view.xml',
90+ 'stock/carriage_condition_view.xml',
91+ 'stock/transportation_reason_view.xml',
92+ 'stock/goods_description_view.xml',
93+ 'stock/transportation_reason_data.xml',
94+ 'stock/goods_description_data.xml',
95+ 'stock/carriage_condition_data.xml',
96+ 'stock/sequence.xml',
97+ 'sale/sale_view.xml',
98+ "security/ir.model.access.csv",
99+ 'partner/partner_view.xml',
100+ 'account/invoice_view.xml',
101+ ],
102+ "demo" : [],
103+ "active": False,
104+ "installable": True
105+}
106+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
107+
108
109=== added directory 'l10n_it_sale/account'
110=== added file 'l10n_it_sale/account/__init__.py'
111--- l10n_it_sale/account/__init__.py 1970-01-01 00:00:00 +0000
112+++ l10n_it_sale/account/__init__.py 2013-03-14 11:13:28 +0000
113@@ -0,0 +1,23 @@
114+# -*- coding: utf-8 -*-
115+##############################################################################
116+#
117+# Copyright (C) 2010 Associazione OpenERP Italia
118+# (<http://www.openerp-italia.org>).
119+#
120+# This program is free software: you can redistribute it and/or modify
121+# it under the terms of the GNU Affero General Public License as published
122+# by the Free Software Foundation, either version 3 of the License, or
123+# (at your option) any later version.
124+#
125+# This program is distributed in the hope that it will be useful,
126+# but WITHOUT ANY WARRANTY; without even the implied warranty of
127+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128+# GNU General Public License for more details.
129+#
130+# You should have received a copy of the GNU Affero General Public License
131+# along with this program. If not, see <http://www.gnu.org/licenses/>.
132+#
133+##############################################################################
134+
135+import invoice
136+
137
138=== added file 'l10n_it_sale/account/invoice.py'
139--- l10n_it_sale/account/invoice.py 1970-01-01 00:00:00 +0000
140+++ l10n_it_sale/account/invoice.py 2013-03-14 11:13:28 +0000
141@@ -0,0 +1,51 @@
142+# -*- coding: utf-8 -*-
143+##############################################################################
144+#
145+# Copyright (C) 2010 Associazione OpenERP Italia
146+# (<http://www.openerp-italia.org>).
147+#
148+# This program is free software: you can redistribute it and/or modify
149+# it under the terms of the GNU Affero General Public License as published
150+# by the Free Software Foundation, either version 3 of the License, or
151+# (at your option) any later version.
152+#
153+# This program is distributed in the hope that it will be useful,
154+# but WITHOUT ANY WARRANTY; without even the implied warranty of
155+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
156+# GNU General Public License for more details.
157+#
158+# You should have received a copy of the GNU Affero General Public License
159+# along with this program. If not, see <http://www.gnu.org/licenses/>.
160+#
161+##############################################################################
162+
163+import netsvc
164+import pooler, tools
165+
166+from openerp.osv import orm, fields
167+from tools.translate import _
168+
169+class account_invoice(orm.Model):
170+
171+ _inherit = 'account.invoice'
172+
173+ _columns = {
174+# 'order_id':fields.many2one('sale.order','Sale Order'),
175+ 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
176+ 'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
177+ 'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
178+ }
179+
180+ def onchange_partner_id(self, cr, uid, ids, type, partner_id,
181+ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
182+ result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
183+ date_invoice, payment_term, partner_bank_id, company_id)
184+ if partner_id:
185+ partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
186+ result['value']['carriage_condition_id'] = partner.carriage_condition_id.id
187+ result['value']['goods_description_id'] = partner.goods_description_id.id
188+ result['value']['transportation_reason_id'] = partner.transportation_reason_id.id
189+ return result
190+
191+account_invoice()
192+
193
194=== added file 'l10n_it_sale/account/invoice_view.xml'
195--- l10n_it_sale/account/invoice_view.xml 1970-01-01 00:00:00 +0000
196+++ l10n_it_sale/account/invoice_view.xml 2013-03-14 11:13:28 +0000
197@@ -0,0 +1,25 @@
198+<?xml version="1.0" ?>
199+<openerp>
200+ <data>
201+ <record model="ir.ui.view" id="invoice_form_inherit_contractual_conditions">
202+ <field name="name">invoice.form.contractual.conditions</field>
203+ <field name="model">account.invoice</field>
204+ <field name="inherit_id" ref="account.invoice_form"/>
205+ <field name="type">form</field>
206+
207+ <field name="arch" type="xml">
208+ <page string="Payments" position="after">
209+ <page string="Shipping">
210+ <field name="carriage_condition_id" string="Carriage condition"/>
211+ <newline/>
212+ <field name="goods_description_id" string="Description of goods"/>
213+ <newline/>
214+ <field name="transportation_reason_id" string="Reason for transportation"/>
215+ </page>
216+
217+ </page>
218+ </field>
219+ </record>
220+ </data>
221+</openerp>
222+
223
224=== added directory 'l10n_it_sale/i18n'
225=== added file 'l10n_it_sale/i18n/it.po'
226--- l10n_it_sale/i18n/it.po 1970-01-01 00:00:00 +0000
227+++ l10n_it_sale/i18n/it.po 2013-03-14 11:13:28 +0000
228@@ -0,0 +1,202 @@
229+# Translation of OpenERP Server.
230+# This file contains the translation of the following modules:
231+# * l10n_it_sale
232+#
233+msgid ""
234+msgstr ""
235+"Project-Id-Version: OpenERP Server 6.0.2\n"
236+"Report-Msgid-Bugs-To: support@openerp.com\n"
237+"POT-Creation-Date: 2011-05-12 20:12+0000\n"
238+"PO-Revision-Date: 2011-05-12 22:18+0100\n"
239+"Last-Translator: Lorenzo Battistini <lorenzo.battistini@agilebg.com>\n"
240+"Language-Team: \n"
241+"MIME-Version: 1.0\n"
242+"Content-Type: text/plain; charset=UTF-8\n"
243+"Content-Transfer-Encoding: 8bit\n"
244+"Plural-Forms: \n"
245+
246+#. module: l10n_it_sale
247+#: field:account.invoice,goods_description_id:0
248+#: field:res.partner,goods_description_id:0
249+#: field:stock.picking,goods_description_id:0
250+msgid "Description of goods"
251+msgstr "Aspetto dei Beni"
252+
253+#. module: l10n_it_sale
254+#: field:stock.picking.carriage_condition,note:0
255+#: field:stock.picking.goods_description,note:0
256+#: field:stock.picking.transportation_reason,note:0
257+msgid "Note"
258+msgstr "Note"
259+
260+#. module: l10n_it_sale
261+#: model:ir.actions.act_window,name:l10n_it_sale.action_transportation_reason_tree
262+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_transportation_reason_tree
263+#: view:stock.picking.transportation_reason:0
264+msgid "Reasons for transportation"
265+msgstr "Causale del trasporto"
266+
267+#. module: l10n_it_sale
268+#: model:ir.model,name:l10n_it_sale.model_stock_picking
269+msgid "Picking List"
270+msgstr "Picking List"
271+
272+#. module: l10n_it_sale
273+#: model:ir.actions.act_window,name:l10n_it_sale.action_wizard_assign_ddt
274+#: view:stock.picking:0
275+#: view:wizard.assign.ddt:0
276+msgid "Assign DDT"
277+msgstr "Assegna DDT"
278+
279+#. module: l10n_it_sale
280+#: sql_constraint:sale.order:0
281+msgid "Order Reference must be unique !"
282+msgstr "Il riferimento ordine deve essere unico!"
283+
284+#. module: l10n_it_sale
285+#: model:ir.module.module,shortdesc:l10n_it_sale.module_meta_information
286+msgid "Italian Localisation - Sale"
287+msgstr "Localizzazione Italiana - Vendite"
288+
289+#. module: l10n_it_sale
290+#: field:sale.order,validity:0
291+msgid "Validity"
292+msgstr "Validità"
293+
294+#. module: l10n_it_sale
295+#: model:ir.model,name:l10n_it_sale.model_wizard_assign_ddt
296+msgid "wizard.assign.ddt"
297+msgstr "wizard.assign.ddt"
298+
299+#. module: l10n_it_sale
300+#: view:res.partner:0
301+msgid "Notes"
302+msgstr "Note"
303+
304+#. module: l10n_it_sale
305+#: view:account.invoice:0
306+msgid "Shipping"
307+msgstr "Trasporto"
308+
309+#. module: l10n_it_sale
310+#: field:stock.picking,ddt_number:0
311+msgid "DDT"
312+msgstr "DDT"
313+
314+#. module: l10n_it_sale
315+#: field:stock.picking,ddt_date:0
316+msgid "DDT date"
317+msgstr "Data DDT"
318+
319+#. module: l10n_it_sale
320+#: view:account.invoice:0
321+msgid "Payments"
322+msgstr "Pagamenti"
323+
324+#. module: l10n_it_sale
325+#: model:ir.model,name:l10n_it_sale.model_stock_picking_carriage_condition
326+#: view:stock.picking.carriage_condition:0
327+#: field:stock.picking.carriage_condition,name:0
328+msgid "Carriage Condition"
329+msgstr "Resa merce"
330+
331+#. module: l10n_it_sale
332+#: field:account.invoice,transportation_reason_id:0
333+#: model:ir.model,name:l10n_it_sale.model_stock_picking_transportation_reason
334+#: field:res.partner,transportation_reason_id:0
335+#: field:stock.picking,transportation_reason_id:0
336+#: view:stock.picking.transportation_reason:0
337+msgid "Reason for transportation"
338+msgstr "Causale del trasporto"
339+
340+#. module: l10n_it_sale
341+#: view:wizard.assign.ddt:0
342+msgid "Assign"
343+msgstr "Assegna"
344+
345+#. module: l10n_it_sale
346+#: view:wizard.assign.ddt:0
347+msgid "This will assign the DDT number"
348+msgstr "Questo assegnerà il numero del DDT"
349+
350+#. module: l10n_it_sale
351+#: code:addons/l10n_it_sale/wizard/assign_ddt.py:32
352+#, python-format
353+msgid "DTT number already assigned"
354+msgstr "Numero DDT già assegnato"
355+
356+#. module: l10n_it_sale
357+#: field:stock.picking.transportation_reason,name:0
358+msgid "Reason For Transportation"
359+msgstr "Causale del trasporto"
360+
361+#. module: l10n_it_sale
362+#: model:ir.actions.act_window,name:l10n_it_sale.action_goods_description_tree
363+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_good_description_tree
364+#: view:stock.picking.goods_description:0
365+msgid "Descriptions of Goods"
366+msgstr "Aspetto dei Beni"
367+
368+#. module: l10n_it_sale
369+#: model:ir.model,name:l10n_it_sale.model_stock_picking_goods_description
370+#: view:stock.picking.goods_description:0
371+#: field:stock.picking.goods_description,name:0
372+msgid "Description of Goods"
373+msgstr "Aspetto dei Beni"
374+
375+#. module: l10n_it_sale
376+#: model:ir.actions.act_window,name:l10n_it_sale.action_carriage_condition_tree
377+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_carriage_condition_tree
378+#: view:stock.picking.carriage_condition:0
379+msgid "Carriage Conditions"
380+msgstr "Resa merce"
381+
382+#. module: l10n_it_sale
383+#: model:ir.model,name:l10n_it_sale.model_account_invoice
384+msgid "Invoice"
385+msgstr "Fattura"
386+
387+#. module: l10n_it_sale
388+#: field:account.invoice,carriage_condition_id:0
389+#: field:res.partner,carriage_condition_id:0
390+#: field:stock.picking,carriage_condition_id:0
391+msgid "Carriage condition"
392+msgstr "Resa merce"
393+
394+#. module: l10n_it_sale
395+#: view:wizard.assign.ddt:0
396+msgid "Cancel"
397+msgstr "Annulla"
398+
399+#. module: l10n_it_sale
400+#: model:ir.model,name:l10n_it_sale.model_res_partner
401+msgid "Partner"
402+msgstr "Partner"
403+
404+#. module: l10n_it_sale
405+#: model:ir.model,name:l10n_it_sale.model_sale_order
406+msgid "Sales Order"
407+msgstr "Ordine di vendita"
408+
409+#. module: l10n_it_sale
410+#: view:res.partner:0
411+msgid "Default shipping conditions"
412+msgstr "Dati DDT"
413+
414+#. module: l10n_it_sale
415+#: model:ir.module.module,description:l10n_it_sale.module_meta_information
416+msgid ""
417+"OpenERP Italian Localization - Sale version\n"
418+"\n"
419+"Functionalities:\n"
420+"\n"
421+"- Documento di trasporto\n"
422+"\n"
423+msgstr ""
424+"Localizzazione Italiana - Versione Sale\n"
425+"\n"
426+"Funzionalità:\n"
427+"\n"
428+"- Documento di trasporto\n"
429+"\n"
430+
431
432=== added file 'l10n_it_sale/i18n/l10n_it_sale.pot'
433--- l10n_it_sale/i18n/l10n_it_sale.pot 1970-01-01 00:00:00 +0000
434+++ l10n_it_sale/i18n/l10n_it_sale.pot 2013-03-14 11:13:28 +0000
435@@ -0,0 +1,196 @@
436+# Translation of OpenERP Server.
437+# This file contains the translation of the following modules:
438+# * l10n_it_sale
439+#
440+msgid ""
441+msgstr ""
442+"Project-Id-Version: OpenERP Server 6.0.2\n"
443+"Report-Msgid-Bugs-To: support@openerp.com\n"
444+"POT-Creation-Date: 2011-05-12 20:12+0000\n"
445+"PO-Revision-Date: 2011-05-12 20:12+0000\n"
446+"Last-Translator: <>\n"
447+"Language-Team: \n"
448+"MIME-Version: 1.0\n"
449+"Content-Type: text/plain; charset=UTF-8\n"
450+"Content-Transfer-Encoding: \n"
451+"Plural-Forms: \n"
452+
453+#. module: l10n_it_sale
454+#: field:account.invoice,goods_description_id:0
455+#: field:res.partner,goods_description_id:0
456+#: field:stock.picking,goods_description_id:0
457+msgid "Description of goods"
458+msgstr ""
459+
460+#. module: l10n_it_sale
461+#: field:stock.picking.carriage_condition,note:0
462+#: field:stock.picking.goods_description,note:0
463+#: field:stock.picking.transportation_reason,note:0
464+msgid "Note"
465+msgstr ""
466+
467+#. module: l10n_it_sale
468+#: model:ir.actions.act_window,name:l10n_it_sale.action_transportation_reason_tree
469+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_transportation_reason_tree
470+#: view:stock.picking.transportation_reason:0
471+msgid "Reasons for transportation"
472+msgstr ""
473+
474+#. module: l10n_it_sale
475+#: model:ir.model,name:l10n_it_sale.model_stock_picking
476+msgid "Picking List"
477+msgstr ""
478+
479+#. module: l10n_it_sale
480+#: model:ir.actions.act_window,name:l10n_it_sale.action_wizard_assign_ddt
481+#: view:stock.picking:0
482+#: view:wizard.assign.ddt:0
483+msgid "Assign DDT"
484+msgstr ""
485+
486+#. module: l10n_it_sale
487+#: sql_constraint:sale.order:0
488+msgid "Order Reference must be unique !"
489+msgstr ""
490+
491+#. module: l10n_it_sale
492+#: model:ir.module.module,shortdesc:l10n_it_sale.module_meta_information
493+msgid "Italian Localisation - Sale"
494+msgstr ""
495+
496+#. module: l10n_it_sale
497+#: field:sale.order,validity:0
498+msgid "Validity"
499+msgstr ""
500+
501+#. module: l10n_it_sale
502+#: model:ir.model,name:l10n_it_sale.model_wizard_assign_ddt
503+msgid "wizard.assign.ddt"
504+msgstr ""
505+
506+#. module: l10n_it_sale
507+#: view:res.partner:0
508+msgid "Notes"
509+msgstr ""
510+
511+#. module: l10n_it_sale
512+#: view:account.invoice:0
513+msgid "Shipping"
514+msgstr ""
515+
516+#. module: l10n_it_sale
517+#: field:stock.picking,ddt_number:0
518+msgid "DDT"
519+msgstr ""
520+
521+#. module: l10n_it_sale
522+#: field:stock.picking,ddt_date:0
523+msgid "DDT date"
524+msgstr ""
525+
526+#. module: l10n_it_sale
527+#: view:account.invoice:0
528+msgid "Payments"
529+msgstr ""
530+
531+#. module: l10n_it_sale
532+#: model:ir.model,name:l10n_it_sale.model_stock_picking_carriage_condition
533+#: view:stock.picking.carriage_condition:0
534+#: field:stock.picking.carriage_condition,name:0
535+msgid "Carriage Condition"
536+msgstr ""
537+
538+#. module: l10n_it_sale
539+#: field:account.invoice,transportation_reason_id:0
540+#: model:ir.model,name:l10n_it_sale.model_stock_picking_transportation_reason
541+#: field:res.partner,transportation_reason_id:0
542+#: field:stock.picking,transportation_reason_id:0
543+#: view:stock.picking.transportation_reason:0
544+msgid "Reason for transportation"
545+msgstr ""
546+
547+#. module: l10n_it_sale
548+#: view:wizard.assign.ddt:0
549+msgid "Assign"
550+msgstr ""
551+
552+#. module: l10n_it_sale
553+#: view:wizard.assign.ddt:0
554+msgid "This will assign the DDT number"
555+msgstr ""
556+
557+#. module: l10n_it_sale
558+#: code:addons/l10n_it_sale/wizard/assign_ddt.py:32
559+#, python-format
560+msgid "DTT number already assigned"
561+msgstr ""
562+
563+#. module: l10n_it_sale
564+#: field:stock.picking.transportation_reason,name:0
565+msgid "Reason For Transportation"
566+msgstr ""
567+
568+#. module: l10n_it_sale
569+#: model:ir.actions.act_window,name:l10n_it_sale.action_goods_description_tree
570+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_good_description_tree
571+#: view:stock.picking.goods_description:0
572+msgid "Descriptions of Goods"
573+msgstr ""
574+
575+#. module: l10n_it_sale
576+#: model:ir.model,name:l10n_it_sale.model_stock_picking_goods_description
577+#: view:stock.picking.goods_description:0
578+#: field:stock.picking.goods_description,name:0
579+msgid "Description of Goods"
580+msgstr ""
581+
582+#. module: l10n_it_sale
583+#: model:ir.actions.act_window,name:l10n_it_sale.action_carriage_condition_tree
584+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_carriage_condition_tree
585+#: view:stock.picking.carriage_condition:0
586+msgid "Carriage Conditions"
587+msgstr ""
588+
589+#. module: l10n_it_sale
590+#: model:ir.model,name:l10n_it_sale.model_account_invoice
591+msgid "Invoice"
592+msgstr ""
593+
594+#. module: l10n_it_sale
595+#: field:account.invoice,carriage_condition_id:0
596+#: field:res.partner,carriage_condition_id:0
597+#: field:stock.picking,carriage_condition_id:0
598+msgid "Carriage condition"
599+msgstr ""
600+
601+#. module: l10n_it_sale
602+#: view:wizard.assign.ddt:0
603+msgid "Cancel"
604+msgstr ""
605+
606+#. module: l10n_it_sale
607+#: model:ir.model,name:l10n_it_sale.model_res_partner
608+msgid "Partner"
609+msgstr ""
610+
611+#. module: l10n_it_sale
612+#: model:ir.model,name:l10n_it_sale.model_sale_order
613+msgid "Sales Order"
614+msgstr ""
615+
616+#. module: l10n_it_sale
617+#: view:res.partner:0
618+msgid "Default shipping conditions"
619+msgstr ""
620+
621+#. module: l10n_it_sale
622+#: model:ir.module.module,description:l10n_it_sale.module_meta_information
623+msgid "OpenERP Italian Localization - Sale version\n"
624+"\n"
625+"Functionalities:\n"
626+"\n"
627+"- Documento di trasporto\n"
628+"\n"
629+""
630+msgstr ""
631+
632
633=== added directory 'l10n_it_sale/partner'
634=== added file 'l10n_it_sale/partner/__init__.py'
635--- l10n_it_sale/partner/__init__.py 1970-01-01 00:00:00 +0000
636+++ l10n_it_sale/partner/__init__.py 2013-03-14 11:13:28 +0000
637@@ -0,0 +1,22 @@
638+# -*- coding: utf-8 -*-
639+##############################################################################
640+#
641+# Copyright (C) 2010 Associazione OpenERP Italia
642+# (<http://www.openerp-italia.org>).
643+#
644+# This program is free software: you can redistribute it and/or modify
645+# it under the terms of the GNU Affero General Public License as published
646+# by the Free Software Foundation, either version 3 of the License, or
647+# (at your option) any later version.
648+#
649+# This program is distributed in the hope that it will be useful,
650+# but WITHOUT ANY WARRANTY; without even the implied warranty of
651+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
652+# GNU General Public License for more details.
653+#
654+# You should have received a copy of the GNU Affero General Public License
655+# along with this program. If not, see <http://www.gnu.org/licenses/>.
656+#
657+##############################################################################
658+
659+import partner
660
661=== added file 'l10n_it_sale/partner/partner.py'
662--- l10n_it_sale/partner/partner.py 1970-01-01 00:00:00 +0000
663+++ l10n_it_sale/partner/partner.py 2013-03-14 11:13:28 +0000
664@@ -0,0 +1,31 @@
665+# -*- coding: utf-8 -*-
666+##############################################################################
667+#
668+# Copyright (C) 2010 Associazione OpenERP Italia
669+# (<http://www.openerp-italia.org>).
670+#
671+# This program is free software: you can redistribute it and/or modify
672+# it under the terms of the GNU Affero General Public License as published
673+# by the Free Software Foundation, either version 3 of the License, or
674+# (at your option) any later version.
675+#
676+# This program is distributed in the hope that it will be useful,
677+# but WITHOUT ANY WARRANTY; without even the implied warranty of
678+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
679+# GNU General Public License for more details.
680+#
681+# You should have received a copy of the GNU Affero General Public License
682+# along with this program. If not, see <http://www.gnu.org/licenses/>.
683+#
684+##############################################################################
685+
686+from openerp.osv import orm, fields
687+
688+class res_partner(orm.Model):
689+ _inherit = "res.partner"
690+ _columns = {
691+ 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
692+ 'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
693+ 'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
694+ }
695+res_partner()
696
697=== added file 'l10n_it_sale/partner/partner_view.xml'
698--- l10n_it_sale/partner/partner_view.xml 1970-01-01 00:00:00 +0000
699+++ l10n_it_sale/partner/partner_view.xml 2013-03-14 11:13:28 +0000
700@@ -0,0 +1,21 @@
701+<?xml version="1.0" ?>
702+<openerp>
703+ <data>
704+ <record model="ir.ui.view" id="view_partner_form_inherit_shipping_conditions">
705+ <field name="name">partner.form.shipping.conditions</field>
706+ <field name="model">res.partner</field>
707+ <field name="inherit_id" ref="base.view_partner_form"/>
708+ <field name="type">form</field>
709+ <field name="arch" type="xml">
710+ <page string="Sales &amp; Purchases" position="inside">
711+ <group colspan="2" col="2" groups="base.group_sale_salesman">
712+ <separator string="Default shipping conditions" colspan="2"/>
713+ <field name="carriage_condition_id" groups="base.group_sale_salesman"/>
714+ <field name="goods_description_id" groups="base.group_sale_salesman"/>
715+ <field name="transportation_reason_id" groups="base.group_sale_salesman"/>
716+ </group>
717+ </page>
718+ </field>
719+ </record>
720+ </data>
721+</openerp>
722
723=== added directory 'l10n_it_sale/sale'
724=== added file 'l10n_it_sale/sale/__init__.py'
725--- l10n_it_sale/sale/__init__.py 1970-01-01 00:00:00 +0000
726+++ l10n_it_sale/sale/__init__.py 2013-03-14 11:13:28 +0000
727@@ -0,0 +1,23 @@
728+# -*- coding: utf-8 -*-
729+##############################################################################
730+#
731+# Copyright (C) 2010 Associazione OpenERP Italia
732+# (<http://www.openerp-italia.org>).
733+#
734+# This program is free software: you can redistribute it and/or modify
735+# it under the terms of the GNU Affero General Public License as published
736+# by the Free Software Foundation, either version 3 of the License, or
737+# (at your option) any later version.
738+#
739+# This program is distributed in the hope that it will be useful,
740+# but WITHOUT ANY WARRANTY; without even the implied warranty of
741+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
742+# GNU General Public License for more details.
743+#
744+# You should have received a copy of the GNU Affero General Public License
745+# along with this program. If not, see <http://www.gnu.org/licenses/>.
746+#
747+##############################################################################
748+
749+import sale
750+
751
752=== added file 'l10n_it_sale/sale/sale.py'
753--- l10n_it_sale/sale/sale.py 1970-01-01 00:00:00 +0000
754+++ l10n_it_sale/sale/sale.py 2013-03-14 11:13:28 +0000
755@@ -0,0 +1,59 @@
756+# -*- coding: utf-8 -*-
757+##############################################################################
758+#
759+# Copyright (C) 2010 Associazione OpenERP Italia
760+# (<http://www.openerp-italia.org>).
761+#
762+# This program is free software: you can redistribute it and/or modify
763+# it under the terms of the GNU Affero General Public License as published
764+# by the Free Software Foundation, either version 3 of the License, or
765+# (at your option) any later version.
766+#
767+# This program is distributed in the hope that it will be useful,
768+# but WITHOUT ANY WARRANTY; without even the implied warranty of
769+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
770+# GNU General Public License for more details.
771+#
772+# You should have received a copy of the GNU Affero General Public License
773+# along with this program. If not, see <http://www.gnu.org/licenses/>.
774+#
775+##############################################################################
776+
777+import time
778+from openerp.osv import orm, fields
779+
780+class sale_order(orm.Model):
781+ _inherit = "sale.order"
782+ _columns = {
783+ 'validity': fields.date('Validity'),
784+ }
785+
786+ def _make_invoice(self, cr, uid, order, lines, context={}):
787+ inv_id = super(sale_order, self)._make_invoice(cr, uid, order, lines, context)
788+ partner = self.pool.get('res.partner').browse(cr , uid, order.partner_id.id)
789+ self.pool.get('account.invoice').write(cr, uid, inv_id, {
790+# 'order_id': order.id,
791+ 'carriage_condition_id': partner.carriage_condition_id.id,
792+ 'goods_description_id': partner.goods_description_id.id,
793+ 'transportation_reason_id': partner.transportation_reason_id.id,
794+ })
795+ return inv_id
796+
797+ def action_ship_create(self, cr, uid, ids, *args):
798+ super(sale_order, self).action_ship_create(cr, uid, ids, *args)
799+ for order in self.browse(cr, uid, ids, context={}):
800+ partner = self.pool.get('res.partner').browse(cr , uid, order.partner_id.id)
801+ picking_obj = self.pool.get('stock.picking')
802+ picking_ids = picking_obj.search(cr, uid, [('sale_id', '=', order.id)])
803+ for picking_id in picking_ids:
804+ picking_obj.write(cr, uid, picking_id, {
805+# 'order_id': order.id,
806+ 'carriage_condition_id': partner.carriage_condition_id.id,
807+ 'goods_description_id': partner.goods_description_id.id,
808+ 'transportation_reason_id': partner.transportation_reason_id.id,
809+ })
810+ return True
811+
812+sale_order()
813+
814+
815
816=== added file 'l10n_it_sale/sale/sale_view.xml'
817--- l10n_it_sale/sale/sale_view.xml 1970-01-01 00:00:00 +0000
818+++ l10n_it_sale/sale/sale_view.xml 2013-03-14 11:13:28 +0000
819@@ -0,0 +1,15 @@
820+<?xml version="1.0" encoding="utf-8"?>
821+<openerp>
822+ <data>
823+ <record id="view_order_form_other_data_inherit" model="ir.ui.view">
824+ <field name="name">sale.order.form.other.data.inherit</field>
825+ <field name="model">sale.order</field>
826+ <field name="inherit_id" ref="sale.view_order_form"/>
827+ <field name="arch" type="xml">
828+ <field name="fiscal_position" position="after">
829+ <field name="validity"/>
830+ </field>
831+ </field>
832+ </record>
833+ </data>
834+</openerp>
835
836=== added directory 'l10n_it_sale/security'
837=== added file 'l10n_it_sale/security/ir.model.access.csv'
838--- l10n_it_sale/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
839+++ l10n_it_sale/security/ir.model.access.csv 2013-03-14 11:13:28 +0000
840@@ -0,0 +1,7 @@
841+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
842+"access_stock_picking_transportation_reason_manager","stock.picking.transportation_reason manager","model_stock_picking_transportation_reason","stock.group_stock_manager",1,1,1,1
843+"access_stock_picking_transportation_reason_user","stock.picking.transportation_reason user","model_stock_picking_transportation_reason","base.group_user",1,0,0,0
844+"access_stock_picking_goods_description_manager","stock.picking.goods_description manager","model_stock_picking_goods_description","stock.group_stock_manager",1,1,1,1
845+"access_stock_picking_goods_description_user","stock.picking.goods_description.user","model_stock_picking_goods_description","base.group_user",1,0,0,0
846+"access_stock_picking_carriage_condition_manager","stock.picking.carriage_condition manager","model_stock_picking_carriage_condition","stock.group_stock_manager",1,1,1,1
847+"access_stock_picking_goods_description_user","stock.picking.carriage_condition user","model_stock_picking_carriage_condition","base.group_user",1,0,0,0
848
849=== added directory 'l10n_it_sale/stock'
850=== added file 'l10n_it_sale/stock/__init__.py'
851--- l10n_it_sale/stock/__init__.py 1970-01-01 00:00:00 +0000
852+++ l10n_it_sale/stock/__init__.py 2013-03-14 11:13:28 +0000
853@@ -0,0 +1,24 @@
854+# -*- coding: utf-8 -*-
855+##############################################################################
856+#
857+# Copyright (C) 2010 Associazione OpenERP Italia
858+# (<http://www.openerp-italia.org>).
859+#
860+# This program is free software: you can redistribute it and/or modify
861+# it under the terms of the GNU Affero General Public License as published
862+# by the Free Software Foundation, either version 3 of the License, or
863+# (at your option) any later version.
864+#
865+# This program is distributed in the hope that it will be useful,
866+# but WITHOUT ANY WARRANTY; without even the implied warranty of
867+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
868+# GNU General Public License for more details.
869+#
870+# You should have received a copy of the GNU Affero General Public License
871+# along with this program. If not, see <http://www.gnu.org/licenses/>.
872+#
873+##############################################################################
874+
875+import picking
876+
877+
878
879=== added file 'l10n_it_sale/stock/carriage_condition_data.xml'
880--- l10n_it_sale/stock/carriage_condition_data.xml 1970-01-01 00:00:00 +0000
881+++ l10n_it_sale/stock/carriage_condition_data.xml 2013-03-14 11:13:28 +0000
882@@ -0,0 +1,14 @@
883+<?xml version="1.0" encoding="utf-8"?>
884+<openerp>
885+ <data>
886+ <record id="carriage_condition_PF" model="stock.picking.carriage_condition">
887+ <field name="name">PORTO FRANCO</field>
888+ </record>
889+ <record id="carriage_condition_PA" model="stock.picking.carriage_condition">
890+ <field name="name">PORTO ASSEGNATO</field>
891+ </record>
892+ <record id="carriage_condition_PAF" model="stock.picking.carriage_condition">
893+ <field name="name">CON ADDEBITO IN FATTURA</field>
894+ </record>
895+ </data>
896+</openerp>
897
898=== added file 'l10n_it_sale/stock/carriage_condition_view.xml'
899--- l10n_it_sale/stock/carriage_condition_view.xml 1970-01-01 00:00:00 +0000
900+++ l10n_it_sale/stock/carriage_condition_view.xml 2013-03-14 11:13:28 +0000
901@@ -0,0 +1,42 @@
902+<?xml version="1.0" encoding="utf-8"?>
903+<openerp>
904+ <data>
905+
906+ # -------------------------------------------------------------
907+ # Carriage Condition
908+ # -------------------------------------------------------------
909+ <record id="view_carriage_condition_tree" model="ir.ui.view">
910+ <field name="name">stock.picking.carriage_condition.tree</field>
911+ <field name="model">stock.picking.carriage_condition</field>
912+ <field name="type">tree</field>
913+ <field name="arch" type="xml">
914+ <tree string="Carriage Conditions">
915+ <field name="name" select="1"/>
916+ </tree>
917+ </field>
918+ </record>
919+ <record id="view_carriage_condition_form" model="ir.ui.view">
920+ <field name="name">stock.picking.carriage_condition.form</field>
921+ <field name="model">stock.picking.carriage_condition</field>
922+ <field name="type">form</field>
923+ <field name="arch" type="xml">
924+ <form string="Carriage Condition">
925+ <field name="name" select="1"/>
926+ <newline/>
927+ <field name="note"/>
928+ </form>
929+ </field>
930+ </record>
931+
932+ <record id="action_carriage_condition_tree" model="ir.actions.act_window">
933+ <field name="name">Carriage Conditions</field>
934+ <field name="res_model">stock.picking.carriage_condition</field>
935+ <field name="type">ir.actions.act_window</field>
936+ <field name="view_type">form</field>
937+ <field name="view_mode">tree,form</field>
938+ </record>
939+
940+ <menuitem action="action_carriage_condition_tree" id="menu_action_carriage_condition_tree" parent="stock.menu_stock_configuration"/>
941+
942+ </data>
943+</openerp>
944
945=== added file 'l10n_it_sale/stock/goods_description_data.xml'
946--- l10n_it_sale/stock/goods_description_data.xml 1970-01-01 00:00:00 +0000
947+++ l10n_it_sale/stock/goods_description_data.xml 2013-03-14 11:13:28 +0000
948@@ -0,0 +1,17 @@
949+<?xml version="1.0" encoding="utf-8"?>
950+<openerp>
951+ <data>
952+ <record id="goods_description_CAR" model="stock.picking.goods_description">
953+ <field name="name">CARTONE</field>
954+ </record>
955+ <record id="goods_description_BAN" model="stock.picking.goods_description">
956+ <field name="name">BANCALE</field>
957+ </record>
958+ <record id="goods_description_SFU" model="stock.picking.goods_description">
959+ <field name="name">SFUSI</field>
960+ </record>
961+ <record id="goods_description_CBA" model="stock.picking.goods_description">
962+ <field name="name">CARTONI-BANCALI</field>
963+ </record>
964+ </data>
965+</openerp>
966
967=== added file 'l10n_it_sale/stock/goods_description_view.xml'
968--- l10n_it_sale/stock/goods_description_view.xml 1970-01-01 00:00:00 +0000
969+++ l10n_it_sale/stock/goods_description_view.xml 2013-03-14 11:13:28 +0000
970@@ -0,0 +1,42 @@
971+<?xml version="1.0" encoding="utf-8"?>
972+<openerp>
973+ <data>
974+
975+ # -------------------------------------------------------------
976+ # Description of Goods
977+ # -------------------------------------------------------------
978+ <record id="view_goods_description_tree" model="ir.ui.view">
979+ <field name="name">stock.picking.goods_description.tree</field>
980+ <field name="model">stock.picking.goods_description</field>
981+ <field name="type">tree</field>
982+ <field name="arch" type="xml">
983+ <tree string="Descriptions of Goods">
984+ <field name="name" select="1"/>
985+ </tree>
986+ </field>
987+ </record>
988+ <record id="stock_goods_description_form" model="ir.ui.view">
989+ <field name="name">stock.picking.goods_description.form</field>
990+ <field name="model">stock.picking.goods_description</field>
991+ <field name="type">form</field>
992+ <field name="arch" type="xml">
993+ <form string="Description of Goods">
994+ <field name="name" select="1"/>
995+ <newline/>
996+ <field name="note"/>
997+ </form>
998+ </field>
999+ </record>
1000+
1001+ <record id="action_goods_description_tree" model="ir.actions.act_window">
1002+ <field name="name">Descriptions of Goods</field>
1003+ <field name="res_model">stock.picking.goods_description</field>
1004+ <field name="type">ir.actions.act_window</field>
1005+ <field name="view_type">form</field>
1006+ <field name="view_mode">tree,form</field>
1007+ </record>
1008+
1009+ <menuitem action="action_goods_description_tree" id="menu_action_good_description_tree" parent="stock.menu_stock_configuration"/>
1010+
1011+ </data>
1012+</openerp>
1013
1014=== added file 'l10n_it_sale/stock/picking.py'
1015--- l10n_it_sale/stock/picking.py 1970-01-01 00:00:00 +0000
1016+++ l10n_it_sale/stock/picking.py 2013-03-14 11:13:28 +0000
1017@@ -0,0 +1,106 @@
1018+# -*- coding: utf-8 -*-
1019+##############################################################################
1020+#
1021+# Copyright (C) 2010-2012 Associazione OpenERP Italia
1022+# (<http://www.openerp-italia.org>).
1023+#
1024+# This program is free software: you can redistribute it and/or modify
1025+# it under the terms of the GNU Affero General Public License as published
1026+# by the Free Software Foundation, either version 3 of the License, or
1027+# (at your option) any later version.
1028+#
1029+# This program is distributed in the hope that it will be useful,
1030+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1031+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1032+# GNU General Public License for more details.
1033+#
1034+# You should have received a copy of the GNU Affero General Public License
1035+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1036+#
1037+##############################################################################
1038+
1039+import netsvc
1040+import pooler, tools
1041+
1042+from openerp.osv import orm, fields
1043+
1044+class stock_picking_carriage_condition(orm.Model):
1045+ """
1046+ Carriage condition
1047+ """
1048+ _name = "stock.picking.carriage_condition"
1049+ _description = "Carriage Condition"
1050+ _columns = {
1051+ 'name':fields.char('Carriage Condition', size=64, required=True, readonly=False),
1052+ 'note': fields.text('Note'),
1053+ }
1054+stock_picking_carriage_condition()
1055+
1056+class stock_picking_goods_description(orm.Model):
1057+ """
1058+ Description of Goods
1059+ """
1060+ _name = 'stock.picking.goods_description'
1061+ _description = "Description of Goods"
1062+
1063+ _columns = {
1064+ 'name':fields.char('Description of Goods', size=64, required=True, readonly=False),
1065+ 'note': fields.text('Note'),
1066+ }
1067+stock_picking_goods_description()
1068+
1069+
1070+class stock_picking_reason(orm.Model):
1071+ """
1072+ Reason for Transportation
1073+ """
1074+ _name = 'stock.picking.transportation_reason'
1075+ _description = 'Reason for transportation'
1076+
1077+ _columns = {
1078+ 'name':fields.char('Reason For Transportation', size=64, required=True, readonly=False),
1079+ 'note': fields.text('Note'),
1080+ }
1081+stock_picking_reason()
1082+
1083+class stock_picking(orm.Model):
1084+ _inherit = "stock.picking.out"
1085+ _columns = {
1086+ 'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
1087+ 'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
1088+ 'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
1089+ 'ddt_number': fields.char('DDT', size=64),
1090+ 'ddt_date': fields.date('DDT date'),
1091+ }
1092+
1093+ def create(self, cr, user, vals, context=None):
1094+ if ('name' not in vals) or (vals.get('name')=='/'):
1095+ if 'type' in vals.keys() and vals['type']=='out':
1096+ vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.out')
1097+ elif 'type' in vals.keys() and vals['type']=='internal':
1098+ vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.internal')
1099+ else:
1100+ vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.in')
1101+
1102+ return super(stock_picking, self).create(cr, user, vals, context)
1103+
1104+ def action_invoice_create(self, cursor, user, ids, journal_id=False,
1105+ group=False, type='out_invoice', context=None):
1106+ res = super(stock_picking, self).action_invoice_create(cursor, user, ids, journal_id,
1107+ group, type, context)
1108+ for picking in self.browse(cursor, user, ids, context=context):
1109+ self.pool.get('account.invoice').write(cursor, user, res[picking.id], {
1110+ 'carriage_condition_id': picking.carriage_condition_id.id,
1111+ 'goods_description_id': picking.goods_description_id.id,
1112+ 'transportation_reason_id': picking.transportation_reason_id.id,
1113+ })
1114+ return res
1115+
1116+ #-----------------------------------------------------------------------------
1117+ # EVITARE LA COPIA DI 'NUMERO DDT'
1118+ #-----------------------------------------------------------------------------
1119+ def copy(self, cr, uid, id, default={}, context=None):
1120+ default.update({'ddt_number': ''})
1121+ return super(stock_picking, self).copy(cr, uid, id, default, context)
1122+
1123+stock_picking()
1124
1125=== added file 'l10n_it_sale/stock/picking_view.xml'
1126--- l10n_it_sale/stock/picking_view.xml 1970-01-01 00:00:00 +0000
1127+++ l10n_it_sale/stock/picking_view.xml 2013-03-14 11:13:28 +0000
1128@@ -0,0 +1,53 @@
1129+<openerp>
1130+ <data>
1131+
1132+ <record id="stock_picking_form_ddt_inherit" model="ir.ui.view">
1133+ <field name="name">stock.picking.form.ddt.inherit</field>
1134+ <field name="model">stock.picking.out</field>
1135+ <field name="inherit_id" ref="stock.view_picking_form"/>
1136+ <field name="arch" type="xml">
1137+ <field name="move_type" position="after">
1138+ <field name="goods_description_id"/>
1139+ <field name="transportation_reason_id"/>
1140+ <field name="carriage_condition_id"/>
1141+ <field name="ddt_date"/>
1142+ </field>
1143+ </field>
1144+ </record>
1145+
1146+ <record id="stock_picking_tree_ddt_inherit" model="ir.ui.view">
1147+ <field name="name">stock.picking.tree.ddt.inherit</field>
1148+ <field name="model">stock.picking.out</field>
1149+ <field name="inherit_id" ref="stock.vpicktree"/>
1150+ <field name="arch" type="xml">
1151+ <field name="name" position="before">
1152+ <field name="ddt_number"/>
1153+ <field name="ddt_date"/>
1154+ </field>
1155+ </field>
1156+ </record>
1157+
1158+ <record id="stock_view_picking_form_ddt" model="ir.ui.view">
1159+ <field name="name">stock.view.picking.form.ddt</field>
1160+ <field name="model">stock.picking.out</field>
1161+ <field name="inherit_id" ref="stock.view_picking_form"/>
1162+ <field name="arch" type="xml">
1163+ <field name="backorder_id" position="after">
1164+ <field name="ddt_number" readonly="1"/>
1165+ </field>
1166+ </field>
1167+ </record>
1168+
1169+ <record id="stock_view_picking_form_assign_ddt" model="ir.ui.view">
1170+ <field name="name">stock.view.picking.form.assign.ddt</field>
1171+ <field name="model">stock.picking.out</field>
1172+ <field name="inherit_id" ref="delivery.view_delivery_order_inherit_stock"/>
1173+ <field name="arch" type="xml">
1174+ <button name="%(delivery.report_shipping)d" position="replace">
1175+ <button name="%(action_wizard_assign_ddt)d" string="Assign DDT" states="done,assigned" type="action"/>
1176+ </button>
1177+ </field>
1178+ </record>
1179+
1180+ </data>
1181+</openerp>
1182
1183=== added file 'l10n_it_sale/stock/sequence.xml'
1184--- l10n_it_sale/stock/sequence.xml 1970-01-01 00:00:00 +0000
1185+++ l10n_it_sale/stock/sequence.xml 2013-03-14 11:13:28 +0000
1186@@ -0,0 +1,18 @@
1187+<?xml version="1.0" encoding="utf-8"?>
1188+<openerp>
1189+ <data>
1190+ <!--
1191+ Sequence types for pickings
1192+ -->
1193+
1194+ <record id="seq_type_ddt" model="ir.sequence.type">
1195+ <field name="name">DDT</field>
1196+ <field name="code">stock.ddt</field>
1197+ </record>
1198+ <record id="seq_ddt" model="ir.sequence">
1199+ <field name="name">DDT</field>
1200+ <field name="code">stock.ddt</field>
1201+ <field name="prefix">DDT/</field>
1202+ </record>
1203+ </data>
1204+</openerp>
1205
1206=== added file 'l10n_it_sale/stock/transportation_reason_data.xml'
1207--- l10n_it_sale/stock/transportation_reason_data.xml 1970-01-01 00:00:00 +0000
1208+++ l10n_it_sale/stock/transportation_reason_data.xml 2013-03-14 11:13:28 +0000
1209@@ -0,0 +1,14 @@
1210+<?xml version="1.0" encoding="utf-8"?>
1211+<openerp>
1212+ <data>
1213+ <record id="transportation_reason_VEN" model="stock.picking.transportation_reason">
1214+ <field name="name">VENDITA</field>
1215+ </record>
1216+ <record id="transportation_reason_VIS" model="stock.picking.transportation_reason">
1217+ <field name="name">CONTO VISIONE</field>
1218+ </record>
1219+ <record id="transportation_reason_RES" model="stock.picking.transportation_reason">
1220+ <field name="name">RESO</field>
1221+ </record>
1222+ </data>
1223+</openerp>
1224
1225=== added file 'l10n_it_sale/stock/transportation_reason_view.xml'
1226--- l10n_it_sale/stock/transportation_reason_view.xml 1970-01-01 00:00:00 +0000
1227+++ l10n_it_sale/stock/transportation_reason_view.xml 2013-03-14 11:13:28 +0000
1228@@ -0,0 +1,42 @@
1229+<?xml version="1.0" encoding="utf-8"?>
1230+<openerp>
1231+ <data>
1232+
1233+ # -------------------------------------------------------------
1234+ # Transportation Reason
1235+ # -------------------------------------------------------------
1236+ <record id="view_transportation_reason_tree" model="ir.ui.view">
1237+ <field name="name">stock.picking.transportation_reason.tree</field>
1238+ <field name="model">stock.picking.transportation_reason</field>
1239+ <field name="type">tree</field>
1240+ <field name="arch" type="xml">
1241+ <tree string="Reasons for transportation">
1242+ <field name="name" select="1"/>
1243+ </tree>
1244+ </field>
1245+ </record>
1246+ <record id="view_transportation_reason_form" model="ir.ui.view">
1247+ <field name="name">stock.picking.transportation_reason.form</field>
1248+ <field name="model">stock.picking.transportation_reason</field>
1249+ <field name="type">form</field>
1250+ <field name="arch" type="xml">
1251+ <form string="Reason for transportation">
1252+ <field name="name" select="1"/>
1253+ <newline/>
1254+ <field name="note"/>
1255+ </form>
1256+ </field>
1257+ </record>
1258+
1259+ <record id="action_transportation_reason_tree" model="ir.actions.act_window">
1260+ <field name="name">Reasons for transportation</field>
1261+ <field name="res_model">stock.picking.transportation_reason</field>
1262+ <field name="type">ir.actions.act_window</field>
1263+ <field name="view_type">form</field>
1264+ <field name="view_mode">tree,form</field>
1265+ </record>
1266+
1267+ <menuitem action="action_transportation_reason_tree" id="menu_action_transportation_reason_tree" parent="stock.menu_stock_configuration"/>
1268+
1269+ </data>
1270+</openerp>
1271
1272=== added directory 'l10n_it_sale/wizard'
1273=== added file 'l10n_it_sale/wizard/__init__.py'
1274--- l10n_it_sale/wizard/__init__.py 1970-01-01 00:00:00 +0000
1275+++ l10n_it_sale/wizard/__init__.py 2013-03-14 11:13:28 +0000
1276@@ -0,0 +1,22 @@
1277+# -*- coding: utf-8 -*-
1278+##############################################################################
1279+#
1280+# Copyright (C) 2010 Associazione OpenERP Italia
1281+# (<http://www.openerp-italia.org>).
1282+#
1283+# This program is free software: you can redistribute it and/or modify
1284+# it under the terms of the GNU Affero General Public License as published
1285+# by the Free Software Foundation, either version 3 of the License, or
1286+# (at your option) any later version.
1287+#
1288+# This program is distributed in the hope that it will be useful,
1289+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1290+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1291+# GNU General Public License for more details.
1292+#
1293+# You should have received a copy of the GNU Affero General Public License
1294+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1295+#
1296+##############################################################################
1297+
1298+import assign_ddt
1299
1300=== added file 'l10n_it_sale/wizard/assign_ddt.py'
1301--- l10n_it_sale/wizard/assign_ddt.py 1970-01-01 00:00:00 +0000
1302+++ l10n_it_sale/wizard/assign_ddt.py 2013-03-14 11:13:28 +0000
1303@@ -0,0 +1,45 @@
1304+# -*- coding: utf-8 -*-
1305+##############################################################################
1306+#
1307+# Copyright (C) 2010 Associazione OpenERP Italia
1308+# (<http://www.openerp-italia.org>).
1309+#
1310+# This program is free software: you can redistribute it and/or modify
1311+# it under the terms of the GNU Affero General Public License as published
1312+# by the Free Software Foundation, either version 3 of the License, or
1313+# (at your option) any later version.
1314+#
1315+# This program is distributed in the hope that it will be useful,
1316+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1317+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1318+# GNU General Public License for more details.
1319+#
1320+# You should have received a copy of the GNU Affero General Public License
1321+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1322+#
1323+##############################################################################
1324+
1325+from openerp.osv import orm, fields
1326+from tools.translate import _
1327+import time
1328+
1329+class wizard_assign_ddt(orm.TransientModel):
1330+
1331+ _name = "wizard.assign.ddt"
1332+
1333+ def assign_ddt(self, cr, uid, ids, context=None):
1334+ picking_obj = self.pool.get('stock.picking.out')
1335+ for picking in picking_obj.browse(cr, uid, context.get('active_ids', []), context=context):
1336+ if picking.ddt_number:
1337+ raise osv.except_osv('Error', _('DTT number already assigned'))
1338+ picking.write({
1339+ 'ddt_number': self.pool.get('ir.sequence').get(cr, uid, 'stock.ddt'),
1340+ 'ddt_date': time.strftime('%Y-%m-%d'),
1341+ })
1342+ return {
1343+ 'type': 'ir.actions.act_window_close',
1344+ }
1345+
1346+wizard_assign_ddt()
1347+
1348+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1349
1350=== added file 'l10n_it_sale/wizard/assign_ddt.xml'
1351--- l10n_it_sale/wizard/assign_ddt.xml 1970-01-01 00:00:00 +0000
1352+++ l10n_it_sale/wizard/assign_ddt.xml 2013-03-14 11:13:28 +0000
1353@@ -0,0 +1,29 @@
1354+<?xml version="1.0" encoding="utf-8"?>
1355+<openerp>
1356+ <data>
1357+
1358+ <record id="wizard_assign_ddt" model="ir.ui.view">
1359+ <field name="name">Assign DDT</field>
1360+ <field name="model">wizard.assign.ddt</field>
1361+ <field name="type">form</field>
1362+ <field name="arch" type="xml">
1363+ <form string="Assign DDT">
1364+ <group col="2">
1365+ <label colspan="2" string="This will assign the DDT number"/>
1366+ <separator colspan="2"/>
1367+ <button icon="gtk-cancel" special="cancel" string="Cancel"/>
1368+ <button icon="gtk-ok" name="assign_ddt" string="Assign" type="object"/>
1369+ </group>
1370+ </form>
1371+ </field>
1372+ </record>
1373+
1374+ <act_window name="Assign DDT"
1375+ res_model="wizard.assign.ddt"
1376+ view_mode="form"
1377+ target="new"
1378+ key2="client_action_multi"
1379+ id="action_wizard_assign_ddt"
1380+ view_id="wizard_assign_ddt"/>
1381+ </data>
1382+</openerp>

Subscribers

People subscribed via source and target branches