← Back to team overview

openobject-italia-core-devs team mailing list archive

[Merge] lp:~scigghia/openobject-italia/7.0 into lp:openobject-italia/7.0

 

Andrea Cometa has proposed merging lp:~scigghia/openobject-italia/7.0 into lp:openobject-italia/7.0.

Requested reviews:
  OpenERP Italia core devs (openobject-italia-core-devs)

For more details, see:
https://code.launchpad.net/~scigghia/openobject-italia/7.0/+merge/153079

Ho aggiunto il modulo l10n_it_sale, convertito e testato per OpenERP 7
-- 
https://code.launchpad.net/~scigghia/openobject-italia/7.0/+merge/153079
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~scigghia/openobject-italia/7.0 into lp:openobject-italia/7.0.
=== added directory 'l10n_it_sale'
=== added file 'l10n_it_sale/AUTHORS.txt'
--- l10n_it_sale/AUTHORS.txt	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/AUTHORS.txt	2013-03-13 08:23:20 +0000
@@ -0,0 +1,10 @@
+Davide Corio <davide.corio@xxxxxxxxxxxx>
+Luca Subiaco <subluca@xxxxxxxxx>
+Simone Orsi <simone.orsi@xxxxxxxxxxxx>
+Mario Riva <mario.riva@xxxxxxxxxxxx>
+Mauro Soligo <mauro.soligo@xxxxxxxxxx>
+Giovanni Barzan <giovanni.barzan@xxxxxxxxx>
+Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxx>
+Roberto Onnis <onnis.roberto@xxxxxxxxx>
+Franco Tampieri <franco.tampieri@xxxxxxxxxxx>
+Andrea Cometa <info@xxxxxxxxxxxxxxx>

=== added file 'l10n_it_sale/__init__.py'
--- l10n_it_sale/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import sale
+import stock
+import account 
+import partner
+import wizard

=== added file 'l10n_it_sale/__openerp__.py'
--- l10n_it_sale/__openerp__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/__openerp__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    'name': 'Italian Localisation - Sale',
+    'version': '0.2',
+    'category': 'Localisation/Italy',
+    'description': """OpenERP Italian Localization - Sale version
+
+Functionalities:
+
+- Documento di trasporto
+
+""",
+    'author': 'OpenERP Italian Community',
+    'website': 'http://www.openerp-italia.org',
+    'license': 'AGPL-3',
+    "depends" : ['stock', 'sale', 'account', 'delivery'],
+    "init_xml" : [
+    ],
+    "update_xml" : [
+        'wizard/assign_ddt.xml',
+        'stock/picking_view.xml',
+        'stock/carriage_condition_view.xml',
+        'stock/transportation_reason_view.xml',
+        'stock/goods_description_view.xml',
+        'stock/transportation_reason_data.xml',
+        'stock/goods_description_data.xml',
+        'stock/carriage_condition_data.xml',
+        'stock/sequence.xml',
+        'sale/sale_view.xml',
+        "security/ir.model.access.csv",
+        'partner/partner_view.xml',
+        'account/invoice_view.xml',
+        ],
+    "demo_xml" : [],
+    "active": False,
+    "installable": True
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+

=== added directory 'l10n_it_sale/account'
=== added file 'l10n_it_sale/account/__init__.py'
--- l10n_it_sale/account/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/account/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import invoice 
+

=== added file 'l10n_it_sale/account/invoice.py'
--- l10n_it_sale/account/invoice.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/account/invoice.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+import pooler, tools
+
+from osv import fields, osv
+from tools.translate import _
+
+class account_invoice(osv.osv):
+    
+    _inherit = 'account.invoice'
+        
+    _columns = {
+#        'order_id':fields.many2one('sale.order','Sale Order'),
+        'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
+        'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
+        'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
+        }
+
+    def onchange_partner_id(self, cr, uid, ids, type, partner_id,
+            date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
+        result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id,
+            date_invoice, payment_term, partner_bank_id, company_id)
+        if partner_id:
+            partner = self.pool.get('res.partner').browse(cr, uid, partner_id)
+            result['value']['carriage_condition_id'] = partner.carriage_condition_id.id
+            result['value']['goods_description_id'] = partner.goods_description_id.id
+            result['value']['transportation_reason_id'] = partner.transportation_reason_id.id
+        return result
+    
+account_invoice()
+

=== added file 'l10n_it_sale/account/invoice_view.xml'
--- l10n_it_sale/account/invoice_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/account/invoice_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,25 @@
+<?xml version="1.0" ?>
+<openerp>
+	<data>
+		<record model="ir.ui.view" id="invoice_form_inherit_contractual_conditions">
+			<field name="name">invoice.form.contractual.conditions</field>
+			<field name="model">account.invoice</field>
+			<field name="inherit_id" ref="account.invoice_form"/>
+			<field name="type">form</field>
+
+			<field name="arch" type="xml">
+				<page string="Payments" position="after">
+					<page string="Shipping">
+						<field name="carriage_condition_id" string="Carriage condition"/>
+						<newline/>
+						<field name="goods_description_id" string="Description of goods"/>
+						<newline/>
+						<field name="transportation_reason_id" string="Reason for transportation"/>
+					</page>
+
+				</page>
+			</field>
+		</record>
+	</data>
+</openerp>
+

=== added directory 'l10n_it_sale/i18n'
=== added file 'l10n_it_sale/i18n/it.po'
--- l10n_it_sale/i18n/it.po	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/i18n/it.po	2013-03-13 08:23:20 +0000
@@ -0,0 +1,202 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_it_sale
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.2\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-05-12 20:12+0000\n"
+"PO-Revision-Date: 2011-05-12 22:18+0100\n"
+"Last-Translator: Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: l10n_it_sale
+#: field:account.invoice,goods_description_id:0
+#: field:res.partner,goods_description_id:0
+#: field:stock.picking,goods_description_id:0
+msgid "Description of goods"
+msgstr "Aspetto dei Beni"
+
+#. module: l10n_it_sale
+#: field:stock.picking.carriage_condition,note:0
+#: field:stock.picking.goods_description,note:0
+#: field:stock.picking.transportation_reason,note:0
+msgid "Note"
+msgstr "Note"
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_transportation_reason_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_transportation_reason_tree
+#: view:stock.picking.transportation_reason:0
+msgid "Reasons for transportation"
+msgstr "Causale del trasporto"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking
+msgid "Picking List"
+msgstr "Picking List"
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_wizard_assign_ddt
+#: view:stock.picking:0
+#: view:wizard.assign.ddt:0
+msgid "Assign DDT"
+msgstr "Assegna DDT"
+
+#. module: l10n_it_sale
+#: sql_constraint:sale.order:0
+msgid "Order Reference must be unique !"
+msgstr "Il riferimento ordine deve essere unico!"
+
+#. module: l10n_it_sale
+#: model:ir.module.module,shortdesc:l10n_it_sale.module_meta_information
+msgid "Italian Localisation - Sale"
+msgstr "Localizzazione Italiana - Vendite"
+
+#. module: l10n_it_sale
+#: field:sale.order,validity:0
+msgid "Validity"
+msgstr "Validità"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_wizard_assign_ddt
+msgid "wizard.assign.ddt"
+msgstr "wizard.assign.ddt"
+
+#. module: l10n_it_sale
+#: view:res.partner:0
+msgid "Notes"
+msgstr "Note"
+
+#. module: l10n_it_sale
+#: view:account.invoice:0
+msgid "Shipping"
+msgstr "Trasporto"
+
+#. module: l10n_it_sale
+#: field:stock.picking,ddt_number:0
+msgid "DDT"
+msgstr "DDT"
+
+#. module: l10n_it_sale
+#: field:stock.picking,ddt_date:0
+msgid "DDT date"
+msgstr "Data DDT"
+
+#. module: l10n_it_sale
+#: view:account.invoice:0
+msgid "Payments"
+msgstr "Pagamenti"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_carriage_condition
+#: view:stock.picking.carriage_condition:0
+#: field:stock.picking.carriage_condition,name:0
+msgid "Carriage Condition"
+msgstr "Resa merce"
+
+#. module: l10n_it_sale
+#: field:account.invoice,transportation_reason_id:0
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_transportation_reason
+#: field:res.partner,transportation_reason_id:0
+#: field:stock.picking,transportation_reason_id:0
+#: view:stock.picking.transportation_reason:0
+msgid "Reason for transportation"
+msgstr "Causale del trasporto"
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "Assign"
+msgstr "Assegna"
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "This will assign the DDT number"
+msgstr "Questo assegnerà il numero del DDT"
+
+#. module: l10n_it_sale
+#: code:addons/l10n_it_sale/wizard/assign_ddt.py:32
+#, python-format
+msgid "DTT number already assigned"
+msgstr "Numero DDT già assegnato"
+
+#. module: l10n_it_sale
+#: field:stock.picking.transportation_reason,name:0
+msgid "Reason For Transportation"
+msgstr "Causale del trasporto"
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_goods_description_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_good_description_tree
+#: view:stock.picking.goods_description:0
+msgid "Descriptions of Goods"
+msgstr "Aspetto dei Beni"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_goods_description
+#: view:stock.picking.goods_description:0
+#: field:stock.picking.goods_description,name:0
+msgid "Description of Goods"
+msgstr "Aspetto dei Beni"
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_carriage_condition_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_carriage_condition_tree
+#: view:stock.picking.carriage_condition:0
+msgid "Carriage Conditions"
+msgstr "Resa merce"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_account_invoice
+msgid "Invoice"
+msgstr "Fattura"
+
+#. module: l10n_it_sale
+#: field:account.invoice,carriage_condition_id:0
+#: field:res.partner,carriage_condition_id:0
+#: field:stock.picking,carriage_condition_id:0
+msgid "Carriage condition"
+msgstr "Resa merce"
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_sale_order
+msgid "Sales Order"
+msgstr "Ordine di vendita"
+
+#. module: l10n_it_sale
+#: view:res.partner:0
+msgid "Default shipping conditions"
+msgstr "Dati DDT"
+
+#. module: l10n_it_sale
+#: model:ir.module.module,description:l10n_it_sale.module_meta_information
+msgid ""
+"OpenERP Italian Localization - Sale version\n"
+"\n"
+"Functionalities:\n"
+"\n"
+"- Documento di trasporto\n"
+"\n"
+msgstr ""
+"Localizzazione Italiana - Versione Sale\n"
+"\n"
+"Funzionalità:\n"
+"\n"
+"- Documento di trasporto\n"
+"\n"
+

=== added file 'l10n_it_sale/i18n/l10n_it_sale.pot'
--- l10n_it_sale/i18n/l10n_it_sale.pot	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/i18n/l10n_it_sale.pot	2013-03-13 08:23:20 +0000
@@ -0,0 +1,196 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_it_sale
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.2\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-05-12 20:12+0000\n"
+"PO-Revision-Date: 2011-05-12 20:12+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: l10n_it_sale
+#: field:account.invoice,goods_description_id:0
+#: field:res.partner,goods_description_id:0
+#: field:stock.picking,goods_description_id:0
+msgid "Description of goods"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:stock.picking.carriage_condition,note:0
+#: field:stock.picking.goods_description,note:0
+#: field:stock.picking.transportation_reason,note:0
+msgid "Note"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_transportation_reason_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_transportation_reason_tree
+#: view:stock.picking.transportation_reason:0
+msgid "Reasons for transportation"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking
+msgid "Picking List"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_wizard_assign_ddt
+#: view:stock.picking:0
+#: view:wizard.assign.ddt:0
+msgid "Assign DDT"
+msgstr ""
+
+#. module: l10n_it_sale
+#: sql_constraint:sale.order:0
+msgid "Order Reference must be unique !"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.module.module,shortdesc:l10n_it_sale.module_meta_information
+msgid "Italian Localisation - Sale"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:sale.order,validity:0
+msgid "Validity"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_wizard_assign_ddt
+msgid "wizard.assign.ddt"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:res.partner:0
+msgid "Notes"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:account.invoice:0
+msgid "Shipping"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:stock.picking,ddt_number:0
+msgid "DDT"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:stock.picking,ddt_date:0
+msgid "DDT date"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:account.invoice:0
+msgid "Payments"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_carriage_condition
+#: view:stock.picking.carriage_condition:0
+#: field:stock.picking.carriage_condition,name:0
+msgid "Carriage Condition"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:account.invoice,transportation_reason_id:0
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_transportation_reason
+#: field:res.partner,transportation_reason_id:0
+#: field:stock.picking,transportation_reason_id:0
+#: view:stock.picking.transportation_reason:0
+msgid "Reason for transportation"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "Assign"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "This will assign the DDT number"
+msgstr ""
+
+#. module: l10n_it_sale
+#: code:addons/l10n_it_sale/wizard/assign_ddt.py:32
+#, python-format
+msgid "DTT number already assigned"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:stock.picking.transportation_reason,name:0
+msgid "Reason For Transportation"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_goods_description_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_good_description_tree
+#: view:stock.picking.goods_description:0
+msgid "Descriptions of Goods"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_stock_picking_goods_description
+#: view:stock.picking.goods_description:0
+#: field:stock.picking.goods_description,name:0
+msgid "Description of Goods"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.actions.act_window,name:l10n_it_sale.action_carriage_condition_tree
+#: model:ir.ui.menu,name:l10n_it_sale.menu_action_carriage_condition_tree
+#: view:stock.picking.carriage_condition:0
+msgid "Carriage Conditions"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: l10n_it_sale
+#: field:account.invoice,carriage_condition_id:0
+#: field:res.partner,carriage_condition_id:0
+#: field:stock.picking,carriage_condition_id:0
+msgid "Carriage condition"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:wizard.assign.ddt:0
+msgid "Cancel"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.model,name:l10n_it_sale.model_sale_order
+msgid "Sales Order"
+msgstr ""
+
+#. module: l10n_it_sale
+#: view:res.partner:0
+msgid "Default shipping conditions"
+msgstr ""
+
+#. module: l10n_it_sale
+#: model:ir.module.module,description:l10n_it_sale.module_meta_information
+msgid "OpenERP Italian Localization - Sale version\n"
+"\n"
+"Functionalities:\n"
+"\n"
+"- Documento di trasporto\n"
+"\n"
+""
+msgstr ""
+

=== added directory 'l10n_it_sale/partner'
=== added file 'l10n_it_sale/partner/__init__.py'
--- l10n_it_sale/partner/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/partner/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import partner

=== added file 'l10n_it_sale/partner/partner.py'
--- l10n_it_sale/partner/partner.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/partner/partner.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+
+class res_partner(osv.osv):
+    _inherit = "res.partner"
+    _columns =  {
+        'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
+        'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
+        'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
+    }
+res_partner()

=== added file 'l10n_it_sale/partner/partner_view.xml'
--- l10n_it_sale/partner/partner_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/partner/partner_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" ?>
+<openerp>
+	<data>
+		<record model="ir.ui.view" id="view_partner_form_inherit_shipping_conditions">
+			<field name="name">partner.form.shipping.conditions</field>
+			<field name="model">res.partner</field>
+			<field name="inherit_id" ref="base.view_partner_form"/>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<page string="Sales &amp; Purchases" position="inside">
+					<group colspan="2" col="2" groups="base.group_sale_salesman">
+						<separator string="Default shipping conditions" colspan="2"/>
+						<field name="carriage_condition_id" groups="base.group_sale_salesman"/>
+						<field name="goods_description_id" groups="base.group_sale_salesman"/>
+						<field name="transportation_reason_id" groups="base.group_sale_salesman"/>
+					</group>
+				</page>
+			</field>
+		</record>
+	</data>
+</openerp>

=== added directory 'l10n_it_sale/sale'
=== added file 'l10n_it_sale/sale/__init__.py'
--- l10n_it_sale/sale/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/sale/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import sale
+

=== added file 'l10n_it_sale/sale/sale.py'
--- l10n_it_sale/sale/sale.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/sale/sale.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from osv import fields, osv
+
+class sale_order(osv.osv):
+    _inherit = "sale.order"
+    _columns =  {
+        'validity': fields.date('Validity'),
+    }
+
+    def _make_invoice(self, cr, uid, order, lines, context={}):
+        inv_id = super(sale_order, self)._make_invoice(cr, uid, order, lines, context)
+        partner = self.pool.get('res.partner').browse(cr , uid, order.partner_id.id)
+        self.pool.get('account.invoice').write(cr, uid, inv_id, {
+#            'order_id': order.id,
+            'carriage_condition_id': partner.carriage_condition_id.id,
+            'goods_description_id': partner.goods_description_id.id,
+            'transportation_reason_id': partner.transportation_reason_id.id,
+            })
+        return inv_id
+
+    def action_ship_create(self, cr, uid, ids, *args):
+        super(sale_order, self).action_ship_create(cr, uid, ids, *args)
+        for order in self.browse(cr, uid, ids, context={}):
+            partner = self.pool.get('res.partner').browse(cr , uid, order.partner_id.id)
+            picking_obj = self.pool.get('stock.picking')
+            picking_ids = picking_obj.search(cr, uid, [('sale_id', '=', order.id)])
+            for picking_id in picking_ids:
+                picking_obj.write(cr, uid, picking_id, {
+#                    'order_id': order.id,
+                    'carriage_condition_id': partner.carriage_condition_id.id,
+                    'goods_description_id': partner.goods_description_id.id,
+                    'transportation_reason_id': partner.transportation_reason_id.id,
+                    })
+        return True
+  
+sale_order()
+
+

=== added file 'l10n_it_sale/sale/sale_view.xml'
--- l10n_it_sale/sale/sale_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/sale/sale_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+		<record id="view_order_form_other_data_inherit" model="ir.ui.view">
+			<field name="name">sale.order.form.other.data.inherit</field>
+			<field name="model">sale.order</field>
+			<field name="inherit_id" ref="sale.view_order_form"/>
+			<field name="arch" type="xml">
+				<field name="fiscal_position" position="after">
+					<field name="validity"/>
+				</field>
+			</field>
+		</record>
+	</data>
+</openerp>

=== added directory 'l10n_it_sale/security'
=== added file 'l10n_it_sale/security/ir.model.access.csv'
--- l10n_it_sale/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/security/ir.model.access.csv	2013-03-13 08:23:20 +0000
@@ -0,0 +1,7 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_stock_picking_transportation_reason_manager","stock.picking.transportation_reason manager","model_stock_picking_transportation_reason","stock.group_stock_manager",1,1,1,1
+"access_stock_picking_transportation_reason_user","stock.picking.transportation_reason user","model_stock_picking_transportation_reason","base.group_user",1,0,0,0
+"access_stock_picking_goods_description_manager","stock.picking.goods_description manager","model_stock_picking_goods_description","stock.group_stock_manager",1,1,1,1
+"access_stock_picking_goods_description_user","stock.picking.goods_description.user","model_stock_picking_goods_description","base.group_user",1,0,0,0
+"access_stock_picking_carriage_condition_manager","stock.picking.carriage_condition manager","model_stock_picking_carriage_condition","stock.group_stock_manager",1,1,1,1
+"access_stock_picking_goods_description_user","stock.picking.carriage_condition user","model_stock_picking_carriage_condition","base.group_user",1,0,0,0

=== added directory 'l10n_it_sale/stock'
=== added file 'l10n_it_sale/stock/__init__.py'
--- l10n_it_sale/stock/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import picking
+
+

=== added file 'l10n_it_sale/stock/carriage_condition_data.xml'
--- l10n_it_sale/stock/carriage_condition_data.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/carriage_condition_data.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="carriage_condition_PF" model="stock.picking.carriage_condition">
+            <field name="name">PORTO FRANCO</field>
+        </record>
+        <record id="carriage_condition_PA" model="stock.picking.carriage_condition">
+            <field name="name">PORTO ASSEGNATO</field>
+        </record>
+        <record id="carriage_condition_PAF" model="stock.picking.carriage_condition">
+            <field name="name">CON ADDEBITO IN FATTURA</field>
+        </record>
+     </data>
+</openerp>

=== added file 'l10n_it_sale/stock/carriage_condition_view.xml'
--- l10n_it_sale/stock/carriage_condition_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/carriage_condition_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+    
+        # -------------------------------------------------------------
+        # Carriage Condition
+        # -------------------------------------------------------------
+        <record id="view_carriage_condition_tree" model="ir.ui.view">
+            <field name="name">stock.picking.carriage_condition.tree</field>
+            <field name="model">stock.picking.carriage_condition</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Carriage Conditions">
+                    <field name="name" select="1"/>
+                </tree>
+            </field>
+        </record>
+        <record id="view_carriage_condition_form" model="ir.ui.view">
+            <field name="name">stock.picking.carriage_condition.form</field>
+            <field name="model">stock.picking.carriage_condition</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Carriage Condition">
+                    <field name="name" select="1"/>
+		    <newline/>
+                    <field name="note"/>
+                </form>
+            </field>
+        </record>
+        
+        <record id="action_carriage_condition_tree" model="ir.actions.act_window">
+            <field name="name">Carriage Conditions</field>
+            <field name="res_model">stock.picking.carriage_condition</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+        
+        <menuitem action="action_carriage_condition_tree" id="menu_action_carriage_condition_tree" parent="stock.menu_stock_configuration"/>
+    
+    </data>
+</openerp>

=== added file 'l10n_it_sale/stock/goods_description_data.xml'
--- l10n_it_sale/stock/goods_description_data.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/goods_description_data.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="goods_description_CAR" model="stock.picking.goods_description">
+            <field name="name">CARTONE</field>
+        </record>
+        <record id="goods_description_BAN" model="stock.picking.goods_description">
+            <field name="name">BANCALE</field>
+        </record>
+        <record id="goods_description_SFU" model="stock.picking.goods_description">
+            <field name="name">SFUSI</field>
+        </record>
+        <record id="goods_description_CBA" model="stock.picking.goods_description">
+            <field name="name">CARTONI-BANCALI</field>
+        </record>
+     </data>
+</openerp>

=== added file 'l10n_it_sale/stock/goods_description_view.xml'
--- l10n_it_sale/stock/goods_description_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/goods_description_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+    
+        # -------------------------------------------------------------
+        # Description of Goods
+        # -------------------------------------------------------------
+        <record id="view_goods_description_tree" model="ir.ui.view">
+            <field name="name">stock.picking.goods_description.tree</field>
+            <field name="model">stock.picking.goods_description</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Descriptions of Goods">
+                    <field name="name" select="1"/>
+                </tree>
+            </field>
+        </record>
+        <record id="stock_goods_description_form" model="ir.ui.view">
+            <field name="name">stock.picking.goods_description.form</field>
+            <field name="model">stock.picking.goods_description</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Description of Goods">
+                  <field name="name" select="1"/>
+		    <newline/>
+                    <field name="note"/>
+                </form>
+            </field>
+        </record>
+        
+        <record id="action_goods_description_tree" model="ir.actions.act_window">
+            <field name="name">Descriptions of Goods</field>
+            <field name="res_model">stock.picking.goods_description</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+        
+        <menuitem action="action_goods_description_tree" id="menu_action_good_description_tree" parent="stock.menu_stock_configuration"/>
+    
+    </data>
+</openerp>

=== added file 'l10n_it_sale/stock/picking.py'
--- l10n_it_sale/stock/picking.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/picking.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,106 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010-2012 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+import pooler, tools
+
+from osv import fields, osv
+
+class stock_picking_carriage_condition(osv.osv):
+    """
+    Carriage condition
+    """
+    _name = "stock.picking.carriage_condition"
+    _description = "Carriage Condition"
+    _columns = {
+	'name':fields.char('Carriage Condition', size=64, required=True, readonly=False),
+	'note': fields.text('Note'),
+    }
+stock_picking_carriage_condition()
+
+class stock_picking_goods_description(osv.osv):
+    """
+    Description of Goods
+    """
+    _name = 'stock.picking.goods_description'
+    _description = "Description of Goods"
+
+    _columns = {
+	'name':fields.char('Description of Goods', size=64, required=True, readonly=False),
+	'note': fields.text('Note'),
+    }
+stock_picking_goods_description()
+
+
+class stock_picking_reason(osv.osv):
+    """
+    Reason for Transportation
+    """
+    _name = 'stock.picking.transportation_reason'
+    _description = 'Reason for transportation'
+
+    _columns = {
+	'name':fields.char('Reason For Transportation', size=64, required=True, readonly=False),
+	'note': fields.text('Note'),
+    }
+stock_picking_reason()
+
+class stock_picking(osv.osv):
+    _inherit = "stock.picking.out"
+    _columns =  {
+        'carriage_condition_id': fields.many2one('stock.picking.carriage_condition', 'Carriage condition'),
+        'goods_description_id': fields.many2one('stock.picking.goods_description', 'Description of goods'),
+        'transportation_reason_id': fields.many2one('stock.picking.transportation_reason', 'Reason for transportation'),
+        'ddt_number':  fields.char('DDT', size=64),
+        'ddt_date':  fields.date('DDT date'),
+    }
+
+    def create(self, cr, user, vals, context=None):
+        if ('name' not in vals) or (vals.get('name')=='/'):
+	    if 'type' in vals.keys() and vals['type']=='out':
+            	vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.out')
+	    elif 'type' in vals.keys() and vals['type']=='internal':
+            	vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.internal')
+	    else:
+		vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking.in')		
+
+        return super(stock_picking, self).create(cr, user, vals, context)
+
+    def action_invoice_create(self, cursor, user, ids, journal_id=False,
+            group=False, type='out_invoice', context=None):
+        res = super(stock_picking, self).action_invoice_create(cursor, user, ids, journal_id,
+            group, type, context)
+        for picking in self.browse(cursor, user, ids, context=context):
+            self.pool.get('account.invoice').write(cursor, user, res[picking.id], {
+                'carriage_condition_id': picking.carriage_condition_id.id,
+                'goods_description_id': picking.goods_description_id.id,
+                'transportation_reason_id': picking.transportation_reason_id.id,
+                })
+        return res
+
+    #-----------------------------------------------------------------------------
+    # EVITARE LA COPIA DI 'NUMERO DDT'
+    #-----------------------------------------------------------------------------
+    def copy(self, cr, uid, id, default={}, context=None):
+        default.update({'ddt_number': ''})
+        return super(stock_picking, self).copy(cr, uid, id, default, context)
+
+stock_picking()

=== added file 'l10n_it_sale/stock/picking_view.xml'
--- l10n_it_sale/stock/picking_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/picking_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,53 @@
+<openerp>
+	<data>
+
+		<record id="stock_picking_form_ddt_inherit" model="ir.ui.view">
+			<field name="name">stock.picking.form.ddt.inherit</field>
+			<field name="model">stock.picking.out</field>
+			<field name="inherit_id" ref="stock.view_picking_form"/>
+			<field name="arch" type="xml">
+				<field name="move_type" position="after">
+					<field name="goods_description_id"/>
+					<field name="transportation_reason_id"/>
+					<field name="carriage_condition_id"/>
+					<field name="ddt_date"/>
+				</field>
+			</field>
+		</record>
+
+	<record id="stock_picking_tree_ddt_inherit" model="ir.ui.view">
+			<field name="name">stock.picking.tree.ddt.inherit</field>
+			<field name="model">stock.picking.out</field>
+			<field name="inherit_id" ref="stock.vpicktree"/>
+			<field name="arch" type="xml">
+				<field name="name" position="before">
+					<field name="ddt_number"/>
+					<field name="ddt_date"/>
+				</field>
+			</field>
+		</record>
+
+		<record id="stock_view_picking_form_ddt" model="ir.ui.view">
+			<field name="name">stock.view.picking.form.ddt</field>
+			<field name="model">stock.picking.out</field>
+			<field name="inherit_id" ref="stock.view_picking_form"/>
+			<field name="arch" type="xml">
+				<field name="backorder_id" position="after">
+					<field name="ddt_number" readonly="1"/>
+				</field>
+			</field>
+		</record>
+
+		<record id="stock_view_picking_form_assign_ddt" model="ir.ui.view">
+			<field name="name">stock.view.picking.form.assign.ddt</field>
+			<field name="model">stock.picking.out</field>
+			<field name="inherit_id" ref="delivery.view_delivery_order_inherit_stock"/>
+			<field name="arch" type="xml">
+				<button name="%(delivery.report_shipping)d" position="replace">
+					<button name="%(action_wizard_assign_ddt)d" string="Assign DDT" states="done,assigned" type="action"/>
+				</button>
+			</field>
+		</record>
+
+    </data>
+</openerp>

=== added file 'l10n_it_sale/stock/sequence.xml'
--- l10n_it_sale/stock/sequence.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/sequence.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <!--
+    Sequence types for pickings
+    -->
+
+        <record id="seq_type_ddt" model="ir.sequence.type">
+            <field name="name">DDT</field>
+            <field name="code">stock.ddt</field>
+        </record>
+        <record id="seq_ddt" model="ir.sequence">
+            <field name="name">DDT</field>
+            <field name="code">stock.ddt</field>
+            <field name="prefix">DDT/</field>
+        </record>
+    </data>
+</openerp>

=== added file 'l10n_it_sale/stock/transportation_reason_data.xml'
--- l10n_it_sale/stock/transportation_reason_data.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/transportation_reason_data.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="transportation_reason_VEN" model="stock.picking.transportation_reason">
+            <field name="name">VENDITA</field>
+        </record>
+        <record id="transportation_reason_VIS" model="stock.picking.transportation_reason">
+            <field name="name">CONTO VISIONE</field>
+        </record>
+        <record id="transportation_reason_RES" model="stock.picking.transportation_reason">
+            <field name="name">RESO</field>
+        </record>
+     </data>
+</openerp>

=== added file 'l10n_it_sale/stock/transportation_reason_view.xml'
--- l10n_it_sale/stock/transportation_reason_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/stock/transportation_reason_view.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+    
+        # -------------------------------------------------------------
+        # Transportation Reason
+        # -------------------------------------------------------------
+        <record id="view_transportation_reason_tree" model="ir.ui.view">
+            <field name="name">stock.picking.transportation_reason.tree</field>
+            <field name="model">stock.picking.transportation_reason</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Reasons for transportation">
+                    <field name="name" select="1"/>
+                </tree>
+            </field>
+        </record>
+        <record id="view_transportation_reason_form" model="ir.ui.view">
+            <field name="name">stock.picking.transportation_reason.form</field>
+            <field name="model">stock.picking.transportation_reason</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Reason for transportation">
+                    <field name="name" select="1"/>
+		    <newline/>
+                    <field name="note"/>
+                </form>
+            </field>
+        </record>
+        
+        <record id="action_transportation_reason_tree" model="ir.actions.act_window">
+            <field name="name">Reasons for transportation</field>
+            <field name="res_model">stock.picking.transportation_reason</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+        
+        <menuitem action="action_transportation_reason_tree" id="menu_action_transportation_reason_tree" parent="stock.menu_stock_configuration"/>
+    
+    </data>
+</openerp>

=== added directory 'l10n_it_sale/wizard'
=== added file 'l10n_it_sale/wizard/__init__.py'
--- l10n_it_sale/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/wizard/__init__.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import assign_ddt

=== added file 'l10n_it_sale/wizard/assign_ddt.py'
--- l10n_it_sale/wizard/assign_ddt.py	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/wizard/assign_ddt.py	2013-03-13 08:23:20 +0000
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2010 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields,osv
+from tools.translate import _
+import time
+
+class wizard_assign_ddt(osv.osv_memory):
+
+    _name = "wizard.assign.ddt"
+
+    def assign_ddt(self, cr, uid, ids, context=None):
+        picking_obj = self.pool.get('stock.picking.out')
+        for picking in picking_obj.browse(cr, uid, context.get('active_ids', []), context=context):
+            if picking.ddt_number:
+                raise osv.except_osv('Error', _('DTT number already assigned'))
+            picking.write({
+                'ddt_number': self.pool.get('ir.sequence').get(cr, uid, 'stock.ddt'),
+                'ddt_date': time.strftime('%Y-%m-%d'),
+                })
+        return {
+            'type': 'ir.actions.act_window_close',
+        }
+
+wizard_assign_ddt()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_it_sale/wizard/assign_ddt.xml'
--- l10n_it_sale/wizard/assign_ddt.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_sale/wizard/assign_ddt.xml	2013-03-13 08:23:20 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record id="wizard_assign_ddt" model="ir.ui.view">
+            <field name="name">Assign DDT</field>
+            <field name="model">wizard.assign.ddt</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Assign DDT">
+                    <group col="2">
+                        <label colspan="2" string="This will assign the DDT number"/>
+                        <separator colspan="2"/>
+                        <button icon="gtk-cancel" special="cancel" string="Cancel"/>
+                        <button icon="gtk-ok" name="assign_ddt" string="Assign" type="object"/>
+                    </group>
+                </form>
+            </field>
+        </record>
+
+       <act_window name="Assign DDT"
+            res_model="wizard.assign.ddt"
+            view_mode="form"
+            target="new"
+            key2="client_action_multi"
+            id="action_wizard_assign_ddt"
+            view_id="wizard_assign_ddt"/>
+    </data>
+</openerp>


Follow ups