From b7166a7a22a24f010a22dcff5b413308148d615c Mon Sep 17 00:00:00 2001 From: "gborruso@dinamicheaziendali.it" Date: Mon, 26 Oct 2020 17:06:14 +0100 Subject: [PATCH 01/16] [ADD] Aggiunto modulo base ddt --- l10n_it_delivery_note_base/README.rst | 94 ++++ l10n_it_delivery_note_base/__init__.py | 1 + l10n_it_delivery_note_base/__manifest__.py | 37 ++ .../data/delivery_note_data.xml | 106 +++++ l10n_it_delivery_note_base/i18n/it.po | 377 +++++++++++++++ l10n_it_delivery_note_base/models/__init__.py | 5 + .../models/stock_delivery_note_type.py | 78 ++++ .../models/stock_picking_goods_appearance.py | 26 ++ .../stock_picking_transport_condition.py | 44 ++ .../models/stock_picking_transport_method.py | 26 ++ .../models/stock_picking_transport_reason.py | 26 ++ .../readme/CONTRIBUTORS.rst | 8 + .../readme/DESCRIPTION.rst | 16 + .../security/ir_module_category.xml | 18 + .../security/ir_rule.xml | 18 + .../security/res_groups.xml | 15 + .../security/res_users.xml | 22 + .../static/description/index.html | 436 ++++++++++++++++++ .../views/stock_delivery_note_type.xml | 73 +++ .../views/stock_picking_goods_appearance.xml | 46 ++ .../stock_picking_transport_condition.xml | 51 ++ .../views/stock_picking_transport_method.xml | 46 ++ .../views/stock_picking_transport_reason.xml | 46 ++ 23 files changed, 1615 insertions(+) create mode 100644 l10n_it_delivery_note_base/README.rst create mode 100644 l10n_it_delivery_note_base/__init__.py create mode 100644 l10n_it_delivery_note_base/__manifest__.py create mode 100644 l10n_it_delivery_note_base/data/delivery_note_data.xml create mode 100644 l10n_it_delivery_note_base/i18n/it.po create mode 100644 l10n_it_delivery_note_base/models/__init__.py create mode 100644 l10n_it_delivery_note_base/models/stock_delivery_note_type.py create mode 100644 l10n_it_delivery_note_base/models/stock_picking_goods_appearance.py create mode 100644 l10n_it_delivery_note_base/models/stock_picking_transport_condition.py create mode 100644 l10n_it_delivery_note_base/models/stock_picking_transport_method.py create mode 100644 l10n_it_delivery_note_base/models/stock_picking_transport_reason.py create mode 100644 l10n_it_delivery_note_base/readme/CONTRIBUTORS.rst create mode 100644 l10n_it_delivery_note_base/readme/DESCRIPTION.rst create mode 100644 l10n_it_delivery_note_base/security/ir_module_category.xml create mode 100644 l10n_it_delivery_note_base/security/ir_rule.xml create mode 100644 l10n_it_delivery_note_base/security/res_groups.xml create mode 100644 l10n_it_delivery_note_base/security/res_users.xml create mode 100644 l10n_it_delivery_note_base/static/description/index.html create mode 100644 l10n_it_delivery_note_base/views/stock_delivery_note_type.xml create mode 100644 l10n_it_delivery_note_base/views/stock_picking_goods_appearance.xml create mode 100644 l10n_it_delivery_note_base/views/stock_picking_transport_condition.xml create mode 100644 l10n_it_delivery_note_base/views/stock_picking_transport_method.xml create mode 100644 l10n_it_delivery_note_base/views/stock_picking_transport_reason.xml diff --git a/l10n_it_delivery_note_base/README.rst b/l10n_it_delivery_note_base/README.rst new file mode 100644 index 000000000000..8e791576fdd4 --- /dev/null +++ b/l10n_it_delivery_note_base/README.rst @@ -0,0 +1,94 @@ +================================= +ITA - Documento di Trasporto Base +================================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note_base + :alt: OCA/l10n-italy +.. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_delivery_note_base + :alt: Translate me on Weblate +.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/122/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| + +**English** + +This module is base layer. + +Within there are principal tables, +so anybody can use it with another modules. + + +**Italiano** + +Questo modulo è un livello base. + +All'interno ci sono le tabelle principali, +in modo che chiunque possa usarlo con altri +moduli. + + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Marco Calcagni +* Gianmarco Conte +* Link IT Europe Srl + +Contributors +~~~~~~~~~~~~ + +* Riccardo Bellanova +* Matteo Bilotta +* Giuseppe Borruso +* Marco Calcagni +* Marco Colombo +* Gianmarco Conte +* Letizia Freda +* Andrea Piovesana + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/l10n-italy `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_delivery_note_base/__init__.py b/l10n_it_delivery_note_base/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/l10n_it_delivery_note_base/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_it_delivery_note_base/__manifest__.py b/l10n_it_delivery_note_base/__manifest__.py new file mode 100644 index 000000000000..2f291a0ac333 --- /dev/null +++ b/l10n_it_delivery_note_base/__manifest__.py @@ -0,0 +1,37 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# Copyright (c) 2019, Link IT Europe Srl +# @author: Matteo Bilotta +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2015 Associazione Odoo Italia () +# noinspection PyStatementEffect +{ + 'name': "ITA - Documento di trasporto - Base", + 'summary': "Crea e gestisce tabelle principali per gestire i DDT", + + 'author': "Marco Calcagni, Gianmarco Conte, Link IT Europe Srl, " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/l10n-italy/tree/12.0/' + 'l10n_it_delivery_note_base', + 'version': '12.0.1.0.0', + 'category': "Localization", + 'license': 'AGPL-3', + 'maintainers': ['As400it', 'Byloth'], + 'depends': ['base'], + 'data': [ + 'data/delivery_note_data.xml', + + 'security/ir_module_category.xml', + 'security/ir_rule.xml', + 'security/res_groups.xml', + 'security/res_users.xml', + + 'views/stock_delivery_note_type.xml', + 'views/stock_picking_goods_appearance.xml', + 'views/stock_picking_transport_condition.xml', + 'views/stock_picking_transport_method.xml', + 'views/stock_picking_transport_reason.xml' + ] +} diff --git a/l10n_it_delivery_note_base/data/delivery_note_data.xml b/l10n_it_delivery_note_base/data/delivery_note_data.xml new file mode 100644 index 000000000000..764fc1c195e4 --- /dev/null +++ b/l10n_it_delivery_note_base/data/delivery_note_data.xml @@ -0,0 +1,106 @@ + + + + + + + + + Incoming DdT sequence + stock.delivery.note.din + DIN/ + no_gap + + + + Outgoing DdT sequence + stock.delivery.note.ddt + DDT/ + no_gap + + + + Internal DdT sequence + stock.delivery.note.int + INT/ + no_gap + + + + + + Incoming + + + incoming + + + Outgoing + + + outgoing + + + Outgoing (with prices) + + + outgoing + + + Internal transfer + + + internal + + + + + Carriage paid + + + Carriage forward + + + Charged in invoice + + + + + Box + + + Pallet + + + Bulk + + + Box / Pallet + + + + + Sale + + + Goods on approval + + + Returned + + + + + Sender + + + Recipient + + + Carrier + + + diff --git a/l10n_it_delivery_note_base/i18n/it.po b/l10n_it_delivery_note_base/i18n/it.po new file mode 100644 index 000000000000..320fc3846bcf --- /dev/null +++ b/l10n_it_delivery_note_base/i18n/it.po @@ -0,0 +1,377 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_it_delivery_note_base +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-15 08:40+0000\n" +"PO-Revision-Date: 2020-10-15 08:40+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_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__active +msgid "Active" +msgstr "Attivo" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__next_sequence_number +msgid "Actual Next Number" +msgstr "Prossimo numero attuale" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__name +msgid "Appearance name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_goods_appearance +msgid "Appearance of Goods" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_goods_appearance_id +msgid "Appearance of goods" +msgstr "Aspetto dei beni" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_CAR +msgid "Box" +msgstr "Cartone" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_CBA +msgid "Box / Pallet" +msgstr "Cartone / Bancale" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_SFU +msgid "Bulk" +msgstr "Sfusi" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PA +msgid "Carriage forward" +msgstr "Porto assegnato" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PF +msgid "Carriage paid" +msgstr "Porto franco" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_COR +msgid "Carrier" +msgstr "Vettore" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PAF +msgid "Charged in invoice" +msgstr "Con addebito in fattura" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__company_id +msgid "Company" +msgstr "Azienda" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__name +msgid "Condition name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_condition +msgid "Condition of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_condition_id +msgid "Condition of transport" +msgstr "Condizione di trasporto" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: l10n_it_delivery_note_base +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_ddt +msgid "DdT" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.module.category,description:l10n_it_delivery_note_base.module_category_inventory_checkboxes +msgid "Define some other extra rights on inventory management." +msgstr "Definisce alcuni permessi extra sulla gestione dei contatti." + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_delivery_note_type +msgid "Delivery Note Type" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: l10n_it_delivery_note_base +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_delivery_note_type_tree_view +msgid "Go to sequence" +msgstr "Vai alla sequenza" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_VIS +msgid "Goods on approval" +msgstr "Conto visione" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__id +msgid "ID" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_incoming_ddt +msgid "Incoming" +msgstr "In arrivo" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +msgid "Internal" +msgstr "Interno" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__note +msgid "Internal note" +msgstr "Nota interna" + +#. module: l10n_it_delivery_note_base +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_delivery_note_type_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_goods_appearance_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_condition_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_method_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_reason_form_view +msgid "Internal notes" +msgstr "Note interne" + +#. module: l10n_it_delivery_note_base +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_internal_ddt +msgid "Internal transfer" +msgstr "Trasferimento interno" + +#. module: l10n_it_delivery_note_base +#: model:ir.module.category,name:l10n_it_delivery_note_base.module_category_inventory_checkboxes +msgid "Inventory settings" +msgstr "Impostazioni del magazzino" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__name +msgid "Method name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_method +msgid "Method of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_method_id +msgid "Method of transport" +msgstr "Metodo di trasporto" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__name +msgid "Name" +msgstr "Nome" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,help:l10n_it_delivery_note_base.field_stock_delivery_note_type__next_sequence_number +msgid "Next number that will be used. This number can be incremented frequently so the displayed value might already be obsolete" +msgstr "Il numero che verrà usato come successivo. Il valore visualizzato potrebbe essere già obsoleto dato che può essere incrementato in modo frequente" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "None" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__sequence_id +msgid "Numeration" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +msgid "Outgoing" +msgstr "In uscita" + +#. module: l10n_it_delivery_note_base +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_priced_ddt +msgid "Outgoing (with prices)" +msgstr "In uscita (con prezzi)" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_BAN +msgid "Pallet" +msgstr "Bancale" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__price_to_show +msgid "Price to show" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__name +msgid "Reason name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_reason +msgid "Reason of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_reason_id +msgid "Reason of transport" +msgstr "Causale di trasporto" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_DES +msgid "Recipient" +msgstr "Destinatario" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_RES +msgid "Returned" +msgstr "Reso" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_VEN +msgid "Sale" +msgstr "Vendita" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_MIT +msgid "Sender" +msgstr "Mittente" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__sequence +msgid "Sequence" +msgstr "Sequenza" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__print_prices +msgid "Show prices on printed DN" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:res.groups,name:l10n_it_delivery_note_base.show_product_related_fields +msgid "Show product information in delivery note lines" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.goods.appearance:0 +msgid "This appearance of goods already exists!" +msgstr "Questo aspetto dei beni esiste già!" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.condition:0 +msgid "This condition of transport already exists!" +msgstr "Questa condizione di trasporto esiste già!" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.delivery.note.type:0 +msgid "This delivery note type already exists!" +msgstr "Questo tipo di DdT esiste già!" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.method:0 +msgid "This method of transport already exists!" +msgstr "Questo metodo di trasporto esiste già!" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.reason:0 +msgid "This reason of transport already exists!" +msgstr "Questa causale di trasporto esiste già!" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "Total price" +msgstr "Prezzo totale" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__code +msgid "Type of Operation" +msgstr "Tipo di operazione" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "Unit price" +msgstr "Prezzo unitario" + diff --git a/l10n_it_delivery_note_base/models/__init__.py b/l10n_it_delivery_note_base/models/__init__.py new file mode 100644 index 000000000000..dba0227a8c30 --- /dev/null +++ b/l10n_it_delivery_note_base/models/__init__.py @@ -0,0 +1,5 @@ +from . import stock_delivery_note_type +from . import stock_picking_goods_appearance +from . import stock_picking_transport_condition +from . import stock_picking_transport_method +from . import stock_picking_transport_reason diff --git a/l10n_it_delivery_note_base/models/stock_delivery_note_type.py b/l10n_it_delivery_note_base/models/stock_delivery_note_type.py new file mode 100644 index 000000000000..e1914ea00a4a --- /dev/null +++ b/l10n_it_delivery_note_base/models/stock_delivery_note_type.py @@ -0,0 +1,78 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# @author: Giuseppe Borruso +# Copyright (c) 2020, Link IT Europe Srl +# @author: Matteo Bilotta +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + +DELIVERY_NOTE_TYPE_CODES = [ + ('incoming', "Incoming"), + ('outgoing', "Outgoing"), + ('internal', "Internal") +] +DOMAIN_DELIVERY_NOTE_TYPE_CODES = [s[0] for s in DELIVERY_NOTE_TYPE_CODES] + + +class StockDeliveryNoteType(models.Model): + _name = 'stock.delivery.note.type' + _description = "Delivery Note Type" + _order = 'sequence, name, id' + + active = fields.Boolean(default=True) + sequence = fields.Integer(string="Sequence", index=True, default=10) + name = fields.Char(string="Name", index=True, required=True, + translate=True) + print_prices = fields.Boolean(string="Show prices on printed DN", + default=False) + code = fields.Selection(DELIVERY_NOTE_TYPE_CODES, + string="Type of Operation", + required=True, + default=DOMAIN_DELIVERY_NOTE_TYPE_CODES[1]) + + default_transport_condition_id = fields.Many2one( + 'stock.picking.transport.condition', + string="Condition of transport") + default_goods_appearance_id = fields.Many2one( + 'stock.picking.goods.appearance', + string="Appearance of goods") + default_transport_reason_id = fields.Many2one( + 'stock.picking.transport.reason', + string="Reason of transport") + default_transport_method_id = fields.Many2one( + 'stock.picking.transport.method', + string="Method of transport") + + sequence_id = fields.Many2one( + 'ir.sequence', + string="Numeration", + required=True) + next_sequence_number = fields.Integer( + related='sequence_id.number_next_actual') + company_id = fields.Many2one('res.company', + string="Company", + default=lambda self: self.env.user.company_id) + note = fields.Html(string="Internal note") + + _sql_constraints = [( + 'name_uniq', + 'unique(name, company_id)', + "This delivery note type already exists!" + )] + + def goto_sequence(self, **kwargs): + self.ensure_one() + + return { + 'type': 'ir.actions.act_window', + 'res_model': 'ir.sequence', + 'res_id': self.sequence_id.id, + 'views': [(False, 'form')], + 'view_type': 'form', + 'view_mode': 'form', + 'target': 'current', + **kwargs + } diff --git a/l10n_it_delivery_note_base/models/stock_picking_goods_appearance.py b/l10n_it_delivery_note_base/models/stock_picking_goods_appearance.py new file mode 100644 index 000000000000..7530a5cb8e63 --- /dev/null +++ b/l10n_it_delivery_note_base/models/stock_picking_goods_appearance.py @@ -0,0 +1,26 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# @author: Giuseppe Borruso +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPickingGoodsAppearance(models.Model): + _name = 'stock.picking.goods.appearance' + _description = "Appearance of Goods" + _order = 'sequence, name, id' + + active = fields.Boolean(default=True) + sequence = fields.Integer(string="Sequence", index=True, default=10) + name = fields.Char(string="Appearance name", index=True, + required=True, translate=True) + note = fields.Html(string="Internal note") + + _sql_constraints = [( + 'name_uniq', + 'unique(name)', + "This appearance of goods already exists!" + )] diff --git a/l10n_it_delivery_note_base/models/stock_picking_transport_condition.py b/l10n_it_delivery_note_base/models/stock_picking_transport_condition.py new file mode 100644 index 000000000000..ca1a43204ed0 --- /dev/null +++ b/l10n_it_delivery_note_base/models/stock_picking_transport_condition.py @@ -0,0 +1,44 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# @author: Giuseppe Borruso +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + +PRICES_TO_SHOW = [ + ('unit', "Unit price"), + ('total', "Total price"), + ('none', "None") +] +DOMAIN_PRICES_TO_SHOW = [p[0] for p in PRICES_TO_SHOW] + + +class StockPickingTransportCondition(models.Model): + _name = 'stock.picking.transport.condition' + _description = "Condition of Transport" + _order = 'sequence, name, id' + + active = fields.Boolean(default=True) + sequence = fields.Integer(string="Sequence", index=True, default=10) + name = fields.Char(string="Condition name", index=True, + required=True, translate=True) + price_to_show = fields.Selection(PRICES_TO_SHOW, + string="Price to show", + required=True, + default=DOMAIN_PRICES_TO_SHOW[0]) + + # + # TODO: Capire come dev'essere utilizzato questo campo. + # Deve influenzare il comportamento del campo "prezzo" + # solo ed esclusivamente nelle stampe del DdT? + # + + note = fields.Html(string="Internal note") + + _sql_constraints = [( + 'name_uniq', + 'unique(name)', + "This condition of transport already exists!" + )] diff --git a/l10n_it_delivery_note_base/models/stock_picking_transport_method.py b/l10n_it_delivery_note_base/models/stock_picking_transport_method.py new file mode 100644 index 000000000000..a3c0dba242fb --- /dev/null +++ b/l10n_it_delivery_note_base/models/stock_picking_transport_method.py @@ -0,0 +1,26 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# @author: Giuseppe Borruso +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPickingTransportMethod(models.Model): + _name = 'stock.picking.transport.method' + _description = "Method of Transport" + _order = 'sequence, name, id' + + active = fields.Boolean(default=True) + sequence = fields.Integer(string="Sequence", index=True, default=10) + name = fields.Char(string="Method name", index=True, + required=True, translate=True) + note = fields.Html(string="Internal note") + + _sql_constraints = [( + 'name_uniq', + 'unique(name)', + "This method of transport already exists!" + )] diff --git a/l10n_it_delivery_note_base/models/stock_picking_transport_reason.py b/l10n_it_delivery_note_base/models/stock_picking_transport_reason.py new file mode 100644 index 000000000000..c15cf91df612 --- /dev/null +++ b/l10n_it_delivery_note_base/models/stock_picking_transport_reason.py @@ -0,0 +1,26 @@ +# Copyright 2014-2019 Dinamiche Aziendali srl +# (http://www.dinamicheaziendali.it/) +# @author: Marco Calcagni +# @author: Gianmarco Conte +# @author: Giuseppe Borruso +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPickingTransportReason(models.Model): + _name = 'stock.picking.transport.reason' + _description = "Reason of Transport" + _order = 'sequence, name, id' + + active = fields.Boolean(default=True) + sequence = fields.Integer(string="Sequence", index=True, default=10) + name = fields.Char(string="Reason name", index=True, + required=True, translate=True) + note = fields.Html(string="Internal note") + + _sql_constraints = [( + 'name_uniq', + 'unique(name)', + "This reason of transport already exists!" + )] diff --git a/l10n_it_delivery_note_base/readme/CONTRIBUTORS.rst b/l10n_it_delivery_note_base/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..c29befc2a353 --- /dev/null +++ b/l10n_it_delivery_note_base/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* Riccardo Bellanova +* Matteo Bilotta +* Giuseppe Borruso +* Marco Calcagni +* Marco Colombo +* Gianmarco Conte +* Letizia Freda +* Andrea Piovesana diff --git a/l10n_it_delivery_note_base/readme/DESCRIPTION.rst b/l10n_it_delivery_note_base/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..c082c7cf1160 --- /dev/null +++ b/l10n_it_delivery_note_base/readme/DESCRIPTION.rst @@ -0,0 +1,16 @@ +**English** + +This module is base layer. + +Within there are principal tables, +so anybody can use it with another modules. + + +**Italiano** + +Questo modulo è un livello base. + +All'interno ci sono le tabelle principali, +in modo che chiunque possa usarlo con altri +moduli. + diff --git a/l10n_it_delivery_note_base/security/ir_module_category.xml b/l10n_it_delivery_note_base/security/ir_module_category.xml new file mode 100644 index 000000000000..e3251831459b --- /dev/null +++ b/l10n_it_delivery_note_base/security/ir_module_category.xml @@ -0,0 +1,18 @@ + + + + + + + + + Inventory settings + Define some other extra rights on inventory management. + 10 + + + + diff --git a/l10n_it_delivery_note_base/security/ir_rule.xml b/l10n_it_delivery_note_base/security/ir_rule.xml new file mode 100644 index 000000000000..8910806e27bf --- /dev/null +++ b/l10n_it_delivery_note_base/security/ir_rule.xml @@ -0,0 +1,18 @@ + + + + + + + + Delivery note type multi-company + + + ['|', ('company_id' , '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + + diff --git a/l10n_it_delivery_note_base/security/res_groups.xml b/l10n_it_delivery_note_base/security/res_groups.xml new file mode 100644 index 000000000000..9b4562fe9a24 --- /dev/null +++ b/l10n_it_delivery_note_base/security/res_groups.xml @@ -0,0 +1,15 @@ + + + + + + + + Show product information in delivery note lines + + + + diff --git a/l10n_it_delivery_note_base/security/res_users.xml b/l10n_it_delivery_note_base/security/res_users.xml new file mode 100644 index 000000000000..bd3a32c78a42 --- /dev/null +++ b/l10n_it_delivery_note_base/security/res_users.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/l10n_it_delivery_note_base/static/description/index.html b/l10n_it_delivery_note_base/static/description/index.html new file mode 100644 index 000000000000..eeae9f785d87 --- /dev/null +++ b/l10n_it_delivery_note_base/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +ITA - Documento di Trasporto Base + + + +
+

ITA - Documento di Trasporto Base

+ + +

Beta OCA/l10n-italy Translate me on Weblate Try me on Runbot

+

English

+

This module is base layer.

+

Within there are principal tables, +so anybody can use it with another modules.

+

Italiano

+

Questo modulo è un livello base.

+

All’interno ci sono le tabelle principali, +in modo che chiunque possa usarlo con altri +moduli.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Marco Calcagni
  • +
  • Gianmarco Conte
  • +
  • Link IT Europe Srl
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/l10n-italy project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_it_delivery_note_base/views/stock_delivery_note_type.xml b/l10n_it_delivery_note_base/views/stock_delivery_note_type.xml new file mode 100644 index 000000000000..5744faeccc0f --- /dev/null +++ b/l10n_it_delivery_note_base/views/stock_delivery_note_type.xml @@ -0,0 +1,73 @@ + + + + + + stock.delivery.note.type.form + stock.delivery.note.type + form + +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + stock.delivery.note.type.tree + stock.delivery.note.type + + + + + + +
+
+ + + + + + + + +
+
+ + + stock.picking.goods.appearance.tree + stock.picking.goods.appearance + tree + + + + + + + + +
diff --git a/l10n_it_delivery_note_base/views/stock_picking_transport_condition.xml b/l10n_it_delivery_note_base/views/stock_picking_transport_condition.xml new file mode 100644 index 000000000000..8da60e076ea8 --- /dev/null +++ b/l10n_it_delivery_note_base/views/stock_picking_transport_condition.xml @@ -0,0 +1,51 @@ + + + + + + stock.picking.transport.condition.form + stock.picking.transport.condition + form + +
+ +
+ +
+
+
+ + + + + + + + + + +
+
+
+
+ + + stock.picking.transport.condition.tree + stock.picking.transport.condition + tree + + + + + + + + + +
diff --git a/l10n_it_delivery_note_base/views/stock_picking_transport_method.xml b/l10n_it_delivery_note_base/views/stock_picking_transport_method.xml new file mode 100644 index 000000000000..1ed09d95715c --- /dev/null +++ b/l10n_it_delivery_note_base/views/stock_picking_transport_method.xml @@ -0,0 +1,46 @@ + + + + + + stock.picking.transport.method.form + stock.picking.transport.method + form + +
+ +
+ +
+
+
+ + + + + + +
+
+
+
+ + + stock.picking.transport.method.tree + stock.picking.transport.method + tree + + + + + + + + +
diff --git a/l10n_it_delivery_note_base/views/stock_picking_transport_reason.xml b/l10n_it_delivery_note_base/views/stock_picking_transport_reason.xml new file mode 100644 index 000000000000..79d56002734a --- /dev/null +++ b/l10n_it_delivery_note_base/views/stock_picking_transport_reason.xml @@ -0,0 +1,46 @@ + + + + + + stock.picking.transport.reason.form + stock.picking.transport.reason + form + +
+ +
+ +
+
+
+ + + + + + +
+
+
+
+ + + stock.picking.transport.reason.tree + stock.picking.transport.reason + tree + + + + + + + + +
From c4933942f967aceff5d514fc08a2e38ac73a524c Mon Sep 17 00:00:00 2001 From: oca-travis Date: Tue, 27 Oct 2020 09:14:45 +0000 Subject: [PATCH 02/16] [UPD] Update l10n_it_delivery_note_base.pot --- l10n_it_delivery_note_base/i18n/it.po | 18 +- .../i18n/l10n_it_delivery_note_base.pot | 371 ++++++++++++++++++ 2 files changed, 380 insertions(+), 9 deletions(-) create mode 100644 l10n_it_delivery_note_base/i18n/l10n_it_delivery_note_base.pot diff --git a/l10n_it_delivery_note_base/i18n/it.po b/l10n_it_delivery_note_base/i18n/it.po index 320fc3846bcf..c0a12ce70609 100644 --- a/l10n_it_delivery_note_base/i18n/it.po +++ b/l10n_it_delivery_note_base/i18n/it.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * l10n_it_delivery_note_base +# * l10n_it_delivery_note_base # msgid "" msgstr "" @@ -10,6 +10,7 @@ msgstr "" "PO-Revision-Date: 2020-10-15 08:40+0000\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -117,11 +118,6 @@ msgstr "Creato da" msgid "Created on" msgstr "Creato il" -#. module: l10n_it_delivery_note_base -#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_ddt -msgid "DdT" -msgstr "" - #. module: l10n_it_delivery_note_base #: model:ir.module.category,description:l10n_it_delivery_note_base.module_category_inventory_checkboxes msgid "Define some other extra rights on inventory management." @@ -248,8 +244,12 @@ msgstr "Nome" #. module: l10n_it_delivery_note_base #: model:ir.model.fields,help:l10n_it_delivery_note_base.field_stock_delivery_note_type__next_sequence_number -msgid "Next number that will be used. This number can be incremented frequently so the displayed value might already be obsolete" -msgstr "Il numero che verrà usato come successivo. Il valore visualizzato potrebbe essere già obsoleto dato che può essere incrementato in modo frequente" +msgid "" +"Next number that will be used. This number can be incremented frequently so " +"the displayed value might already be obsolete" +msgstr "" +"Il numero che verrà usato come successivo. Il valore visualizzato potrebbe " +"essere già obsoleto dato che può essere incrementato in modo frequente" #. module: l10n_it_delivery_note_base #: selection:stock.picking.transport.condition,price_to_show:0 @@ -263,6 +263,7 @@ msgstr "" #. module: l10n_it_delivery_note_base #: selection:stock.delivery.note.type,code:0 +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_ddt msgid "Outgoing" msgstr "In uscita" @@ -374,4 +375,3 @@ msgstr "Tipo di operazione" #: selection:stock.picking.transport.condition,price_to_show:0 msgid "Unit price" msgstr "Prezzo unitario" - diff --git a/l10n_it_delivery_note_base/i18n/l10n_it_delivery_note_base.pot b/l10n_it_delivery_note_base/i18n/l10n_it_delivery_note_base.pot new file mode 100644 index 000000000000..cbf5cc753ac3 --- /dev/null +++ b/l10n_it_delivery_note_base/i18n/l10n_it_delivery_note_base.pot @@ -0,0 +1,371 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_it_delivery_note_base +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \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_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__active +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__active +msgid "Active" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__next_sequence_number +msgid "Actual Next Number" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__name +msgid "Appearance name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_goods_appearance +msgid "Appearance of Goods" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_goods_appearance_id +msgid "Appearance of goods" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_CAR +msgid "Box" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_CBA +msgid "Box / Pallet" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_SFU +msgid "Bulk" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PA +msgid "Carriage forward" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PF +msgid "Carriage paid" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_COR +msgid "Carrier" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.condition,name:l10n_it_delivery_note_base.transport_condition_PAF +msgid "Charged in invoice" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__company_id +msgid "Company" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__name +msgid "Condition name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_condition +msgid "Condition of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_condition_id +msgid "Condition of transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__create_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__create_uid +msgid "Created by" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__create_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__create_date +msgid "Created on" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.module.category,description:l10n_it_delivery_note_base.module_category_inventory_checkboxes +msgid "Define some other extra rights on inventory management." +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_delivery_note_type +msgid "Delivery Note Type" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__display_name +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_delivery_note_type_tree_view +msgid "Go to sequence" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_VIS +msgid "Goods on approval" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__id +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__id +msgid "ID" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_incoming_ddt +msgid "Incoming" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +msgid "Internal" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__note +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__note +msgid "Internal note" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_delivery_note_type_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_goods_appearance_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_condition_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_method_form_view +#: model_terms:ir.ui.view,arch_db:l10n_it_delivery_note_base.stock_picking_transport_reason_form_view +msgid "Internal notes" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_internal_ddt +msgid "Internal transfer" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.module.category,name:l10n_it_delivery_note_base.module_category_inventory_checkboxes +msgid "Inventory settings" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method____last_update +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__write_uid +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__write_date +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__write_date +msgid "Last Updated on" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__name +msgid "Method name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_method +msgid "Method of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_method_id +msgid "Method of transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__name +msgid "Name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,help:l10n_it_delivery_note_base.field_stock_delivery_note_type__next_sequence_number +msgid "Next number that will be used. This number can be incremented frequently so the displayed value might already be obsolete" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "None" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__sequence_id +msgid "Numeration" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.delivery.note.type,code:0 +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_ddt +msgid "Outgoing" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.delivery.note.type,name:l10n_it_delivery_note_base.delivery_note_type_priced_ddt +msgid "Outgoing (with prices)" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.goods.appearance,name:l10n_it_delivery_note_base.goods_appearance_BAN +msgid "Pallet" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__price_to_show +msgid "Price to show" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__name +msgid "Reason name" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model,name:l10n_it_delivery_note_base.model_stock_picking_transport_reason +msgid "Reason of Transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__default_transport_reason_id +msgid "Reason of transport" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_DES +msgid "Recipient" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_RES +msgid "Returned" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.reason,name:l10n_it_delivery_note_base.transport_reason_VEN +msgid "Sale" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:stock.picking.transport.method,name:l10n_it_delivery_note_base.transport_method_MIT +msgid "Sender" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_goods_appearance__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_condition__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_method__sequence +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_picking_transport_reason__sequence +msgid "Sequence" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__print_prices +msgid "Show prices on printed DN" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:res.groups,name:l10n_it_delivery_note_base.show_product_related_fields +msgid "Show product information in delivery note lines" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.goods.appearance:0 +msgid "This appearance of goods already exists!" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.condition:0 +msgid "This condition of transport already exists!" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.delivery.note.type:0 +msgid "This delivery note type already exists!" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.method:0 +msgid "This method of transport already exists!" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: sql_constraint:stock.picking.transport.reason:0 +msgid "This reason of transport already exists!" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "Total price" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: model:ir.model.fields,field_description:l10n_it_delivery_note_base.field_stock_delivery_note_type__code +msgid "Type of Operation" +msgstr "" + +#. module: l10n_it_delivery_note_base +#: selection:stock.picking.transport.condition,price_to_show:0 +msgid "Unit price" +msgstr "" + From cac003842198a5d28586995c8fa4a4bf75b64527 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 27 Oct 2020 09:56:55 +0000 Subject: [PATCH 03/16] [UPD] README.rst --- l10n_it_delivery_note_base/README.rst | 28 ++++++++++++++----- .../static/description/index.html | 8 ++++-- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/l10n_it_delivery_note_base/README.rst b/l10n_it_delivery_note_base/README.rst index 8e791576fdd4..7e5c5133e4cc 100644 --- a/l10n_it_delivery_note_base/README.rst +++ b/l10n_it_delivery_note_base/README.rst @@ -1,6 +1,6 @@ -================================= -ITA - Documento di Trasporto Base -================================= +=================================== +ITA - Documento di trasporto - Base +=================================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -10,17 +10,20 @@ ITA - Documento di Trasporto Base .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github :target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note_base :alt: OCA/l10n-italy -.. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_delivery_note_base :alt: Translate me on Weblate -.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png :target: https://runbot.odoo-community.org/runbot/122/12.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| +|badge1| |badge2| |badge3| |badge4| |badge5| **English** @@ -89,6 +92,17 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. |maintainer-As400it| image:: https://github.com/As400it.png?size=40px + :target: https://github.com/As400it + :alt: As400it +.. |maintainer-Byloth| image:: https://github.com/Byloth.png?size=40px + :target: https://github.com/Byloth + :alt: Byloth + +Current `maintainers `__: + +|maintainer-As400it| |maintainer-Byloth| + This module is part of the `OCA/l10n-italy `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_delivery_note_base/static/description/index.html b/l10n_it_delivery_note_base/static/description/index.html index eeae9f785d87..54c68d707d8c 100644 --- a/l10n_it_delivery_note_base/static/description/index.html +++ b/l10n_it_delivery_note_base/static/description/index.html @@ -4,7 +4,7 @@ -ITA - Documento di Trasporto Base +ITA - Documento di trasporto - Base + + +
+

ITA - Documento di Trasporto

+ + +

Beta OCA/l10n_it_delivery_note Translate me on Weblate

+

English

+

This module manage the Italian DDT (Delivery note).

+

From a Picking is possible to generate a Delivery note, group more picking in one delivery note. Is possible to invoice from the Delivery note form.

+

This module is alternative to DDT l10n_it_ddt it follow the odoo way to process sale order, picking and invoice.

+

Italiano

+

Questo modulo consente di gestire i DDT.

+

Questo modulo è un alternativa al modulo DDT l10n_it_ddt segue la modalità di odoo di gestire ordini di vendita, picking e fatture. +Non è possibile avere installato contemporaneamente l10n_it_ddt e l10n_it_delivery_note.

+

Ci sono due impostazioni possibili: +Base di default un picking un DDT. +Avanzato più picking in un DDT.

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to: +- Inventory -> Configuration -> Settings - Delivery note

+

Use the advanced delivery notes behaviour allow to menage more picking on one delivery note. +- Inventory -> Configuration -> Warehouse Management -> Delivery note types

+

is possible to indicate in delivery note type if the product price have to be printed in the delivery note report/slip +- Inventory -> Configuration -> Delivery notes -> Condition of trasport +- Inventory -> Configuration -> Delivery notes -> Appearances of goods +- Inventory -> Configuration -> Delivery notes -> Reasons of trasport +- Inventory -> Configuration -> Delivery notes -> Methods of trasport

+
    +
  • Settings -> User & Companies -> Users - “Show product information in the delivery note lines” allow to show the price in the form
  • +
+
+
+

Usage

+

Funzionalità base.

+

Quando un picking è validato si visualizza un tab DdT. +Dal tab “Crea nuovo” si apre un wizard dove scegliere il tipo di DDT e poi conferma. Immettere i dati richiesti poi “Valida” per numerare il DDT. +Una volta Validato il DDT è possibile emettere fattura direttamente dal DDT, se il DDT è di tipo consegna a cliente (outgoing) e si hanno i permessi sull’utente. +E’ possibile annullare il DDT reimpostarlo in bozza e poi modificarlo. Se il DDT è fatturato il numero e data non sono modificabili. +per i trasferimenti tra magazzini creare un picking di tipo interno, con le ubicazioni relative, validare il picking e il tab DDT viene visualizzato. +è possibile anche avere i ddt in ingresso ovvero validato il picking si apre il tab DDT per indicare il numero DDT fornitore e data .

+

Funzionalità Avanzata.

+

vengono attivate varie funzionalità aggiuntive: +- più picking per un DDT +- selezione multipla di picking e generazione di DDT +- aggiunta righe note e righe sezione descrittive. +- lista dei DDT.

+

Il report DDT stampa in righe aggiuntive i lotti/ seriali scadenze del prodotto.

+

Il prezzo può essere indicato anche nel report DDT se il tiipo DDT è indicata la stampa prezzi. +La visibilità dei prezzi è sui permessi dell’utente.

+

Le fatture generate dai DDT hanno nelle righe note i riferimenti al DDT.

+

Se è installato :code: “l10n_it_ddt” seguire i seguenti passi.

+

Migrazione dei dati da “l10n_it_ddt” +Il modulo presenta una funzione di migrazione dei dati dal modulo OCA “l10n_it_ddt” da eseguire manualmente. +Al momento, non è ancora presente un menù oppure una voce in interfaccia che permetta di eseguire questa operazione; bensì, è stato definito un CLI da eseguire all’avvio di Odoo. +Di seguito, una piccola lista di passi da seguire per portare a termine la migrazione:

+

Eseguire un back-up del database. +Questa procedura di migrazione dei dati è stata, sì, sviluppata e testata MA solamente per un numero limitato di casi. +NON mi sento, assolutamente, confidente nel definirla una feature production-ready.

+

Installare il modulo “l10n_it_delivery_note” SENZA prima disinstallare il modulo OCA “l10n_it_ddt”.

+

NON iniziare ad usare il modulo “l10n_it_delivery_note” senza aver prima migrato i dati. +Potrebbero verificarsi, in prima battuta, problemi legati alla numerazione dei documenti creati. +Inoltre, la procedura di migrazione stessa, è progettata affinché verifichi non siano presenti documenti di “l10n_it_delivery_note”; qualora ne rilevi alcuni, si interromperà non eseguendo alcuna migrazione.

+

Terminata l’installazione del modulo, terminate in sicurezza il processo di Odoo. +Lanciare, nella maniera in cui si è soliti fare, Odoo aggiungendo alcuni parametri al comando d’avvio:

+

./odoo-bin migrate_ddt_data –database <nome_database> […]

+

Una volta terminata l’esecuzione della procedura, verificare che tutti i documenti siano stati migrati con successo e nella maniera in cui ci si aspetterebbe. +Verificata l’esattezza dei dati migrati, disinstallare il modulo “l10n_it_ddt”. +È possibile iniziare ad utilizzare “l10n_it_delivery_note”.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Marco Calcagni
  • +
  • Gianmarco Conte
  • +
  • Link IT Europe Srl
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/l10n_it_delivery_note project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_it_delivery_note/static/src/scss/stock_delivery_note.scss b/l10n_it_delivery_note/static/src/scss/stock_delivery_note.scss new file mode 100644 index 000000000000..51b714d28bf2 --- /dev/null +++ b/l10n_it_delivery_note/static/src/scss/stock_delivery_note.scss @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2019, Link IT Europe Srl + * @author: Matteo Bilotta + */ + +.o_form_view .o_notebook > .tab-content > .tab-pane +{ + & > .no-margin-page-content + { + margin-bottom: -46px; + margin-left: -16px; + margin-right: -16px; + margin-top: -16px; + + min-height: 83px; + + & > .header + { + border-bottom: 1px solid #ced4da; + border-top: 1px solid #ced4da; + display: flex; + margin-top: -17px; + min-height: 34px; + padding-left: 16px; + + & > div > .btn, + & > div > div > .btn + { + margin: 4px 3px 4px 0px; + min-height: 25px; + padding-bottom: 2px; + padding-top: 2px; + } + + & > .statusbar_status + { + align-content: space-around; + align-items: center; + align-self: stretch; + display: flex; + flex-flow: row-reverse wrap-reverse; + margin-bottom: 0px; + margin-left: auto; + overflow: hidden; + + & > .arrow_button + { + background-color: #FFFFFF; + border-left: 1px solid #DEE2E6; + border-radius: 0; + border-width: 0 0 0; + color: #ADB5BD; + cursor: default; + font-size: 11px; + font-weight: bold; + margin: 0px; + min-height: 33px; + opacity: 1.0; + padding-left: 22px; + pointer-events: none; + position: relative; + transition: all 0.1s ease 0s; + + &:not(:first-child):before, + &:not(:first-child):after + { + border-bottom: 17px solid transparent; + border-left: 11px solid white; + border-right: none; + border-top: 16px solid transparent; + bottom: auto; + content: " "; + display: block; + left: auto; + position: absolute; + right: -10px; + transition: border 0.2s ease 0s; + top: 0; + } + &:not(:first-child):before + { + border-left-color: #DEE2E6; + right: -11px; + } + + &.first_arrow + { + padding-left: 15px; + border-left: 1px solid #CED4DA; + } + + &.active + { + background-color: #E9ECEF; + color: #7C7BAD; + + &:after + { + border-left-color: #E9ECEF; + } + } + } + } + } + & > .content + { + box-shadow: inset 0px 5px 10px -4px rgba(0, 0, 0, 0.1); + padding: 16px; + + & > :first-child + { + margin-top: 0; + + &.o_field_x2many.o_field_x2many_list tr > :first-child, + &.o_field_x2many.o_field_x2many_list tr > :first-child .o_input + { + padding-left: 16px; + } + } + } + } +} + +.btn, +.o_icon_button +{ + &.fa + { + font-family: FontAwesome, Roboto, sans-serif; + } + + & > .fa:not(:last-child):before + { + margin-right: 0.5em; + } +} + +table.o_list_view tr.o_data_row > td.o_list_button +{ + padding-left: 16px !important; + width: 1px; + + & > button.o_icon_button > .fa:before + { + margin: 0px; + } +} diff --git a/l10n_it_delivery_note/tests/__init__.py b/l10n_it_delivery_note/tests/__init__.py new file mode 100644 index 000000000000..e1f46a858e91 --- /dev/null +++ b/l10n_it_delivery_note/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_delivery_note_invoicing diff --git a/l10n_it_delivery_note/tests/test_stock_delivery_note_invoicing.py b/l10n_it_delivery_note/tests/test_stock_delivery_note_invoicing.py new file mode 100644 index 000000000000..a8e48313d920 --- /dev/null +++ b/l10n_it_delivery_note/tests/test_stock_delivery_note_invoicing.py @@ -0,0 +1,1300 @@ +from datetime import datetime, timedelta +from odoo.tests.common import TransactionCase + +DOWNPAYMENT_METHODS = ['fixed', 'percentage'] + + +class StockDeliveryNoteInvoicingTest(TransactionCase): + at_install = False + post_install = True + + sender = None + recipient = None + + desk_combination_line = None + customizable_desk_line = None + right_corner_desk_line = None + large_cabinet_line = None + storage_box_line = None + large_desk_line = None + + def create_partner(self, name, **kwargs): + return self.env['res.partner'].create({'name': name, **kwargs}) + + def create_sales_order(self, lines, **kwargs): + vals = {'partner_id': self.recipient.id} + + if lines: + vals['order_line'] = lines + + vals.update(kwargs) + + return self.env['sale.order'].create(vals) + + def prepare_sales_order_line(self, product, quantity=1.0, price=None, + **kwargs): + vals = { + 'product_id': product.id, + 'product_uom_qty': quantity + } + + if price: + vals['price_unit'] = price + + vals.update(kwargs) + + return 0, False, vals + + def add_downpayment_line(self, sales_order, method, amount, **kwargs): + if method not in DOWNPAYMENT_METHODS: + raise ValueError("Downpayment method must be 'fixed' or 'percentage'.") + + return self.env['sale.advance.payment.inv'] \ + .with_context(active_ids=sales_order.ids) \ + .create({ + 'advance_payment_method': method, + 'amount': amount, + **kwargs + }).create_invoices() + + def create_delivery_note(self, **kwargs): + vals = { + 'partner_sender_id': self.sender.id, + 'partner_id': self.recipient.id, + 'partner_shipping_id': self.recipient.id + } + + vals.update(kwargs) + + return self.env['stock.delivery.note'].create(vals) + + def setUp(self): + super().setUp() + + self.env.user.write({ + 'groups_id': [(4, self.env.ref('l10n_it_delivery_note.' + 'use_advanced_delivery_notes').id)] + }) + + self.sender = self.env.ref('base.main_partner') + self.recipient = self.create_partner("Mario Rossi") + + try: + self.desk_combination_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_3'), 1) + self.customizable_desk_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_4'), 3) + self.right_corner_desk_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_5'), 2) + self.large_cabinet_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_6'), 11) + self.storage_box_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_7'), 5) + self.large_desk_line = \ + self.prepare_sales_order_line(self.env.ref('product.' + 'product_product_8'), 1) + + except ValueError as exc: + raise RuntimeError("It seems you're not using a database with" + " demonstration data loaded for this tests.") \ + from exc + + # ⇒ "Ordine singolo: fatturazione completa" + def test_complete_invoicing_single_so(self): + # + # SO ┐ ┌ DdT + # └ Picking ┘ + # + + sales_order = self.create_sales_order([ + self.desk_combination_line, + self.right_corner_desk_line, + self.large_cabinet_line, + self.large_desk_line + ]) + self.assertEqual(len(sales_order.order_line), 4) + + sales_order.action_confirm() + self.add_downpayment_line(sales_order, 'percentage', 10) + self.assertEqual(len(sales_order.order_line), 5) + self.assertEqual(sales_order.invoice_status, 'no') + + downpayment_order_line = sales_order.order_line[4] + self.assertEqual(downpayment_order_line.invoice_status, 'to invoice') + self.assertEqual(downpayment_order_line.qty_to_invoice, -1) + self.assertEqual(downpayment_order_line.qty_invoiced, 1) + + downpayment_invoice = sales_order.invoice_ids + self.assertEqual(len(downpayment_invoice), 1) + + downpayment_invoice_line = downpayment_invoice.invoice_line_ids + self.assertEqual(len(downpayment_invoice_line), 1) + self.assertEqual(downpayment_invoice_line.quantity, 1) + + picking = sales_order.picking_ids + self.assertEqual(len(picking), 1) + self.assertEqual(len(picking.move_lines), 4) + + picking.move_lines[0].quantity_done = 1 + picking.move_lines[1].quantity_done = 2 + picking.move_lines[2].quantity_done = 11 + picking.move_lines[3].quantity_done = 1 + + result = picking.button_validate() + self.assertIsNone(result) + + delivery_note = self.create_delivery_note() + delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + delivery_note.picking_ids = picking + delivery_note.action_confirm() + self.assertEqual(len(delivery_note.line_ids), 4) + self.assertEqual(delivery_note.state, 'confirm') + self.assertEqual(delivery_note.invoice_status, 'to invoice') + + delivery_note.action_invoice() + self.assertEqual(len(delivery_note.line_ids), 4) + self.assertEqual(delivery_note.state, 'invoiced') + self.assertEqual(delivery_note.invoice_status, 'invoiced') + + self.assertEqual(len(sales_order.order_line), 5) + self.assertEqual(sales_order.invoice_status, 'invoiced') + + invoices = sales_order.invoice_ids + self.assertEqual(len(invoices), 2) + + final_invoice = invoices[0] + self.assertEqual(len(final_invoice.invoice_line_ids), 6) + self.assertEqual(final_invoice.delivery_note_ids, delivery_note) + + self.assertEqual(delivery_note.invoice_ids, final_invoice) + + # + # Linea 1 + # + order_line = sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Linea 2 + # + order_line = sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 2) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 2) + + delivery_note_line = delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = final_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Linea 3 + # + order_line = sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 11) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 11) + + delivery_note_line = delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 11) + + invoice_line = final_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 11) + + # + # Linea 4 + # + order_line = sales_order.order_line[3] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = delivery_note.line_ids[3] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Linea 5 (Downpayment) + # + order_line = sales_order.order_line[4] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 0) + + move = order_line.move_ids + self.assertEqual(len(move), 0) + + delivery_note_line = delivery_note.line_ids \ + .filtered(lambda l: l.sale_line_id == order_line) + + self.assertEqual(len(delivery_note_line), 0) + + invoice_line = final_invoice.invoice_line_ids[4] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, -1) + + # + # Linea 6 (DdT in fattura) + # + invoice_line = final_invoice.invoice_line_ids[5] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, delivery_note) + + # ⇒ "Ordine singolo: fatturazione parziale" + def test_partial_invoicing_single_so(self): + # + # SO ┐ ┌ DdT + # ├ Picking ┘ + # │ + # └ Picking ┐ + # └ DdT + # + + StockPicking = self.env['stock.picking'] + StockBackorderConfirmationWizard = self.env[ + 'stock.backorder.confirmation'] + + sales_order = self.create_sales_order([ + self.customizable_desk_line, + self.right_corner_desk_line, + self.large_cabinet_line, + self.storage_box_line + ]) + self.assertEqual(len(sales_order.order_line), 4) + + sales_order.action_confirm() + self.add_downpayment_line(sales_order, 'percentage', 10) + self.assertEqual(len(sales_order.order_line), 5) + self.assertEqual(sales_order.invoice_status, 'no') + + downpayment_order_line = sales_order.order_line[4] + self.assertEqual(downpayment_order_line.invoice_status, 'to invoice') + self.assertEqual(downpayment_order_line.qty_to_invoice, -1) + self.assertEqual(downpayment_order_line.qty_invoiced, 1) + + downpayment_invoice = sales_order.invoice_ids + self.assertEqual(len(downpayment_invoice), 1) + + downpayment_invoice_line = downpayment_invoice.invoice_line_ids + self.assertEqual(len(downpayment_invoice_line), 1) + self.assertEqual(downpayment_invoice_line.quantity, 1) + + picking = sales_order.picking_ids + self.assertEqual(len(picking), 1) + self.assertEqual(len(picking.move_lines), 4) + + picking.move_lines[0].quantity_done = 2 # 3 + picking.move_lines[1].quantity_done = 2 + picking.move_lines[2].quantity_done = 6 # 11 + picking.move_lines[3].quantity_done = 3 # 5 + + wizard = StockBackorderConfirmationWizard.create({ + 'pick_ids': [(4, picking.id)] + }) + wizard.process() + + first_delivery_note = self.create_delivery_note() + first_delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + first_delivery_note.picking_ids = picking + first_delivery_note.action_confirm() + self.assertEqual(len(first_delivery_note.line_ids), 4) + self.assertEqual(first_delivery_note.state, 'confirm') + self.assertEqual(first_delivery_note.invoice_status, 'to invoice') + + sales_order.action_invoice_create(final=False) + self.assertEqual(len(sales_order.order_line), 5) + self.assertEqual(sales_order.invoice_status, 'no') + + invoices = sales_order.invoice_ids + self.assertEqual(len(invoices), 2) + + partial_invoice = invoices[0] + self.assertEqual(len(partial_invoice.invoice_line_ids), 5) + self.assertEqual(partial_invoice.delivery_note_ids, + first_delivery_note) + + self.assertEqual(len(first_delivery_note.line_ids), 4) + self.assertEqual(first_delivery_note.state, 'invoiced') + self.assertEqual(first_delivery_note.invoice_status, 'invoiced') + self.assertEqual(first_delivery_note.invoice_ids, partial_invoice) + + # + # = = - = = - = = - = = + # + + backorder = StockPicking.search([('backorder_id', '=', picking.id)]) + self.assertEqual(len(backorder), 1) + self.assertEqual(len(backorder.move_lines), 3) + + backorder.move_lines[0].quantity_done = 1 + backorder.move_lines[1].quantity_done = 5 + backorder.move_lines[2].quantity_done = 2 + + result = backorder.button_validate() + self.assertIsNone(result) + + second_delivery_note = self.create_delivery_note() + second_delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + second_delivery_note.picking_ids = backorder + second_delivery_note.action_confirm() + self.assertEqual(len(second_delivery_note.line_ids), 3) + self.assertEqual(second_delivery_note.state, 'confirm') + self.assertEqual(second_delivery_note.invoice_status, 'to invoice') + + # + # Linea 1 + # + order_line = sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 1) + self.assertEqual(order_line.qty_invoiced, 2) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 2) + + delivery_note_line = first_delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = partial_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Linea 2 + # + order_line = sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 2) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 2) + + delivery_note_line = first_delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = partial_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Linea 3 + # + order_line = sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 5) + self.assertEqual(order_line.qty_invoiced, 6) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 6) + + delivery_note_line = first_delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 6) + + invoice_line = partial_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 6) + + # + # Linea 4 + # + order_line = sales_order.order_line[3] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 2) + self.assertEqual(order_line.qty_invoiced, 3) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 3) + + delivery_note_line = first_delivery_note.line_ids[3] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 3) + + invoice_line = partial_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 3) + + # + # Linea 5 (DdT in fattura) + # + invoice_line = partial_invoice.invoice_line_ids[4] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, first_delivery_note) + + # + # = = - = = - = = - = = + # + + second_delivery_note.action_invoice() + self.assertEqual(len(second_delivery_note.line_ids), 3) + self.assertEqual(second_delivery_note.state, 'invoiced') + self.assertEqual(second_delivery_note.invoice_status, 'invoiced') + + self.assertEqual(len(sales_order.order_line), 5) + self.assertEqual(sales_order.invoice_status, 'invoiced') + + invoices = sales_order.invoice_ids + self.assertEqual(len(invoices), 3) + + final_invoice = invoices[0] + self.assertEqual(len(final_invoice.invoice_line_ids), 5) + self.assertEqual(final_invoice.delivery_note_ids, second_delivery_note) + + self.assertEqual(second_delivery_note.invoice_ids, final_invoice) + + # + # Linea ordine 1 + # Linea fattura 1 + # + order_line = sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 3) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 1) + + delivery_note_line = second_delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Linea ordine 3 + # Linea fattura 2 + # + order_line = sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 11) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 5) + + delivery_note_line = second_delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 5) + + invoice_line = final_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 5) + + # + # Linea ordine 4 + # Linea fattura 3 + # + order_line = sales_order.order_line[3] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 5) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 2) + + delivery_note_line = second_delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = final_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Linea ordine 5 (Downpayment) + # Linea fattura 4 + # + order_line = sales_order.order_line[4] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 0) + + move = order_line.move_ids + self.assertEqual(len(move), 0) + + delivery_notes = first_delivery_note | second_delivery_note + delivery_note_line = delivery_notes.mapped('line_ids') \ + .filtered(lambda l: l.sale_line_id == order_line) + + self.assertEqual(len(delivery_note_line), 0) + + invoice_line = final_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, -1) + + # + # Linea fattura 5 (DdT in fattura) + # + invoice_line = final_invoice.invoice_line_ids[4] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, second_delivery_note) + + # ⇒ "Ordini multipli: fatturazione completa" + def test_complete_invoicing_multiple_so(self): + # + # SO ┐ + # └ Picking ┐ + # ├ DdT + # ┌ Picking ┘ + # SO ┘ + # + + first_sales_order = self.create_sales_order([ + self.desk_combination_line, + self.customizable_desk_line, + self.right_corner_desk_line + ]) + self.assertEqual(len(first_sales_order.order_line), 3) + + first_sales_order.action_confirm() + self.add_downpayment_line(first_sales_order, 'percentage', 10) + self.assertEqual(len(first_sales_order.order_line), 4) + self.assertEqual(first_sales_order.invoice_status, 'no') + + downpayment_order_line = first_sales_order.order_line[3] + self.assertEqual(downpayment_order_line.invoice_status, 'to invoice') + self.assertEqual(downpayment_order_line.qty_to_invoice, -1) + self.assertEqual(downpayment_order_line.qty_invoiced, 1) + + downpayment_invoice = first_sales_order.invoice_ids + self.assertEqual(len(downpayment_invoice), 1) + + downpayment_invoice_line = downpayment_invoice.invoice_line_ids + self.assertEqual(len(downpayment_invoice_line), 1) + self.assertEqual(downpayment_invoice_line.quantity, 1) + + first_picking = first_sales_order.picking_ids + self.assertEqual(len(first_picking), 1) + self.assertEqual(len(first_picking.move_lines), 3) + + first_picking.move_lines[0].quantity_done = 1 + first_picking.move_lines[1].quantity_done = 3 + first_picking.move_lines[2].quantity_done = 2 + + result = first_picking.button_validate() + self.assertIsNone(result) + + # + # = = - = = - = = - = = + # + + second_sales_order = self.create_sales_order([ + self.large_cabinet_line, + self.storage_box_line, + self.large_desk_line + ]) + self.assertEqual(len(second_sales_order.order_line), 3) + + second_sales_order.action_confirm() + self.assertEqual(second_sales_order.invoice_status, 'no') + + second_picking = second_sales_order.picking_ids + self.assertEqual(len(second_picking), 1) + self.assertEqual(len(second_picking.move_lines), 3) + + second_picking.move_lines[0].quantity_done = 11 + second_picking.move_lines[1].quantity_done = 5 + second_picking.move_lines[2].quantity_done = 1 + + result = second_picking.button_validate() + self.assertIsNone(result) + + # + # = = - = = - = = - = = + # + + pickings = first_picking | second_picking + delivery_note = self.create_delivery_note() + delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + delivery_note.picking_ids = pickings + delivery_note.action_confirm() + self.assertEqual(len(delivery_note.line_ids), 6) + self.assertEqual(delivery_note.state, 'confirm') + self.assertEqual(delivery_note.invoice_status, 'to invoice') + + delivery_note.action_invoice() + self.assertEqual(len(delivery_note.line_ids), 6) + self.assertEqual(delivery_note.state, 'invoiced') + self.assertEqual(delivery_note.invoice_status, 'invoiced') + + self.assertEqual(len(first_sales_order.order_line), 4) + self.assertEqual(first_sales_order.invoice_status, 'invoiced') + + self.assertEqual(len(second_sales_order.order_line), 3) + self.assertEqual(second_sales_order.invoice_status, 'invoiced') + + sales_orders = first_sales_order | second_sales_order + + invoices = sales_orders.mapped('invoice_ids') + self.assertEqual(len(invoices), 2) + + final_invoice = invoices[0] + self.assertEqual(len(final_invoice.invoice_line_ids), 8) + self.assertEqual(final_invoice.delivery_note_ids, delivery_note) + + self.assertEqual(delivery_note.invoice_ids, final_invoice) + + # + # Ordine 1 - Linea 1 + # Linea fattura 1 + # + order_line = first_sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Ordine 1 - Linea 2 + # Linea fattura 2 + # + order_line = first_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 3) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 3) + + delivery_note_line = delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 3) + + invoice_line = final_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 3) + + # + # Ordine 1 - Linea 3 + # Linea fattura 3 + # + order_line = first_sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 2) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 2) + + delivery_note_line = delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = final_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Ordine 1 - Linea 4 (Downpayment) + # Linea fattura 4 + # + order_line = first_sales_order.order_line[3] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 0) + + move = order_line.move_ids + self.assertEqual(len(move), 0) + + delivery_note_line = delivery_note.line_ids \ + .filtered(lambda l: l.sale_line_id == order_line) + + self.assertEqual(len(delivery_note_line), 0) + + invoice_line = final_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, -1) + + # + # Ordine 2 - Linea 1 + # Linea fattura 5 + # + order_line = second_sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 11) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 11) + + delivery_note_line = delivery_note.line_ids[3] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 11) + + invoice_line = final_invoice.invoice_line_ids[4] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 11) + + # + # Ordine 2 - Linea 2 + # Linea fattura 6 + # + order_line = second_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 5) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 5) + + delivery_note_line = delivery_note.line_ids[4] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 5) + + invoice_line = final_invoice.invoice_line_ids[5] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 5) + + # + # Ordine 2 - Linea 3 + # Linea fattura 7 + # + order_line = second_sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = delivery_note.line_ids[5] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[6] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Linea fattura 8 (DdT in fattura) + # + invoice_line = final_invoice.invoice_line_ids[7] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, delivery_note) + + # ⇒ "Ordini multipli: fatturazione parziale" + def test_partial_invoicing_multiple_so(self): + # + # ┌ Picking ──────┐ + # SO ┤ ├ DdT + # │ ┌ Picking ┘ + # │ SO ┤ + # │ └ Picking ┐ + # │ ├ DdT + # └ Picking ──────┘ + # + + StockPicking = self.env['stock.picking'] + StockBackorderConfirmationWizard = self.env[ + 'stock.backorder.confirmation'] + + first_sales_order = self.create_sales_order([ + self.desk_combination_line, + self.right_corner_desk_line, + self.large_desk_line + ]) + self.assertEqual(len(first_sales_order.order_line), 3) + + first_sales_order.action_confirm() + self.add_downpayment_line(first_sales_order, 'percentage', 10) + self.assertEqual(len(first_sales_order.order_line), 4) + self.assertEqual(first_sales_order.invoice_status, 'no') + + downpayment_order_line = first_sales_order.order_line[3] + self.assertEqual(downpayment_order_line.invoice_status, 'to invoice') + self.assertEqual(downpayment_order_line.qty_to_invoice, -1) + self.assertEqual(downpayment_order_line.qty_invoiced, 1) + + downpayment_invoice = first_sales_order.invoice_ids + self.assertEqual(len(downpayment_invoice), 1) + + downpayment_invoice_line = downpayment_invoice.invoice_line_ids + self.assertEqual(len(downpayment_invoice_line), 1) + self.assertEqual(downpayment_invoice_line.quantity, 1) + + first_picking = first_sales_order.picking_ids + self.assertEqual(len(first_picking), 1) + self.assertEqual(len(first_picking.move_lines), 3) + + first_picking.move_lines[0].quantity_done = 1 + first_picking.move_lines[1].quantity_done = 1 # 2 + first_picking.move_lines[2].quantity_done = 1 + + wizard = StockBackorderConfirmationWizard.create({ + 'pick_ids': [(4, first_picking.id)] + }) + wizard.process() + + # + # = = - = = - = = - = = + # + + second_sales_order = self.create_sales_order([ + self.customizable_desk_line, + self.large_cabinet_line, + self.storage_box_line + ]) + self.assertEqual(len(second_sales_order.order_line), 3) + + second_sales_order.action_confirm() + self.assertEqual(second_sales_order.invoice_status, 'no') + + second_picking = second_sales_order.picking_ids + self.assertEqual(len(second_picking), 1) + self.assertEqual(len(second_picking.move_lines), 3) + + second_picking.move_lines[0].quantity_done = 3 + second_picking.move_lines[1].quantity_done = 3 # 11 + second_picking.move_lines[2].quantity_done = 3 # 5 + + wizard = StockBackorderConfirmationWizard.create({ + 'pick_ids': [(4, second_picking.id)] + }) + wizard.process() + + # + # = = - = = - = = - = = + # + + pickings = first_picking | second_picking + first_delivery_note = self.create_delivery_note() + first_delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + first_delivery_note.picking_ids = pickings + first_delivery_note.action_confirm() + self.assertEqual(len(first_delivery_note.line_ids), 6) + self.assertEqual(first_delivery_note.state, 'confirm') + self.assertEqual(first_delivery_note.invoice_status, 'to invoice') + + first_sales_order.action_invoice_create(final=False) + self.assertEqual(len(first_sales_order.order_line), 4) + self.assertEqual(first_sales_order.invoice_status, 'no') + + second_sales_order.action_invoice_create(final=False) + self.assertEqual(len(second_sales_order.order_line), 3) + self.assertEqual(second_sales_order.invoice_status, 'no') + + sales_orders = first_sales_order | second_sales_order + + invoices = sales_orders.mapped('invoice_ids') + self.assertEqual(len(invoices), 3) + + first_partial_invoice = invoices[0] + self.assertEqual(len(first_partial_invoice.invoice_line_ids), 4) + self.assertEqual(first_partial_invoice.delivery_note_ids, + first_delivery_note) + + second_partial_invoice = invoices[2] + self.assertEqual(len(second_partial_invoice.invoice_line_ids), 4) + self.assertEqual(second_partial_invoice.delivery_note_ids, + first_delivery_note) + + self.assertEqual(len(first_delivery_note.line_ids), 6) + # + # TODO: self.assertEqual(first_delivery_note.state, 'invoiced')? + # + self.assertEqual(len(first_delivery_note.invoice_ids), 2) + self.assertEqual(first_delivery_note.invoice_ids[1], + first_partial_invoice) + self.assertEqual(first_delivery_note.invoice_ids[0], + second_partial_invoice) + + # + # = = - = = - = = - = = + # + + first_backorder = \ + StockPicking.search([('backorder_id', '=', first_picking.id)]) + self.assertEqual(len(first_backorder), 1) + self.assertEqual(len(first_backorder.move_lines), 1) + + first_backorder.move_lines[0].quantity_done = 1 + + result = first_backorder.button_validate() + self.assertIsNone(result) + + # + # = = - = = - = = - = = + # + + second_backorder = \ + StockPicking.search([('backorder_id', '=', second_picking.id)]) + self.assertEqual(len(second_backorder), 1) + self.assertEqual(len(second_backorder.move_lines), 2) + + second_backorder.move_lines[0].quantity_done = 8 + second_backorder.move_lines[1].quantity_done = 2 + + result = second_backorder.button_validate() + self.assertIsNone(result) + + backorders = first_backorder | second_backorder + second_delivery_note = self.create_delivery_note() + second_delivery_note.transport_datetime = \ + datetime.now() + timedelta(days=1, hours=3) + second_delivery_note.picking_ids = backorders + second_delivery_note.action_confirm() + self.assertEqual(len(second_delivery_note.line_ids), 3) + self.assertEqual(second_delivery_note.state, 'confirm') + self.assertEqual(second_delivery_note.invoice_status, 'to invoice') + + # + # Ordine 1 - Linea 1 + # Fattura 1 - Linea 1 + # + order_line = first_sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = first_delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = first_partial_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Ordine 1 - Linea 2 + # Fattura 1 - Linea 2 + # + order_line = first_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 1) + self.assertEqual(order_line.qty_invoiced, 1) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 1) + + delivery_note_line = first_delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = first_partial_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Ordine 1 - Linea 3 + # Fattura 1 - Linea 3 + # + order_line = first_sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 1) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 1) + + delivery_note_line = first_delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = first_partial_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Fattura 1 - Linea 4 (DdT in fattura) + # + invoice_line = first_partial_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, first_delivery_note) + + # + # Ordine 2 - Linea 1 + # Fattura 2 - Linea 1 + # + order_line = second_sales_order.order_line[0] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 3) + + move = order_line.move_ids + self.assertEqual(len(move), 1) + self.assertEqual(move.quantity_done, 3) + + delivery_note_line = first_delivery_note.line_ids[3] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 3) + + invoice_line = second_partial_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 3) + + # + # Ordine 2 - Linea 2 + # Fattura 2 - Linea 2 + # + order_line = second_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 8) + self.assertEqual(order_line.qty_invoiced, 3) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 3) + + delivery_note_line = first_delivery_note.line_ids[4] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 3) + + invoice_line = second_partial_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 3) + + # + # Ordine 2 - Linea 3 + # Fattura 2 - Linea 3 + # + order_line = second_sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'to invoice') + self.assertEqual(order_line.qty_to_invoice, 2) + self.assertEqual(order_line.qty_invoiced, 3) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[0].quantity_done, 3) + + delivery_note_line = first_delivery_note.line_ids[5] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 3) + + invoice_line = second_partial_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 3) + + # + # Fattura 2 - Linea 4 (DdT in fattura) + # + invoice_line = second_partial_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, first_delivery_note) + + # + # = = - = = - = = - = = + # + + second_delivery_note.action_invoice() + self.assertEqual(len(second_delivery_note.line_ids), 3) + self.assertEqual(second_delivery_note.state, 'invoiced') + self.assertEqual(second_delivery_note.invoice_status, 'invoiced') + + self.assertEqual(len(first_sales_order.order_line), 4) + self.assertEqual(first_sales_order.invoice_status, 'invoiced') + + self.assertEqual(len(second_sales_order.order_line), 3) + self.assertEqual(second_sales_order.invoice_status, 'invoiced') + + invoices = sales_orders.mapped('invoice_ids') + self.assertEqual(len(invoices), 4) + + final_invoice = invoices[1] + self.assertEqual(len(final_invoice.invoice_line_ids), 5) + self.assertEqual(final_invoice.delivery_note_ids, second_delivery_note) + + self.assertEqual(second_delivery_note.invoice_ids, final_invoice) + + # + # Ordine 1 - Linea 2 + # Fattura 3 - Linea 1 + # + order_line = first_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 2) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 1) + + delivery_note_line = second_delivery_note.line_ids[0] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 1) + + invoice_line = final_invoice.invoice_line_ids[0] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 1) + + # + # Ordine 1 - Linea 4 (Downpayment) + # Fattura 3 - Linea 2 + # + order_line = first_sales_order.order_line[3] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 0) + + move = order_line.move_ids + self.assertEqual(len(move), 0) + + delivery_notes = first_delivery_note | second_delivery_note + delivery_note_line = delivery_notes.mapped('line_ids') \ + .filtered(lambda l: l.sale_line_id == order_line) + + self.assertEqual(len(delivery_note_line), 0) + + invoice_line = final_invoice.invoice_line_ids[1] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, -1) + + # + # Ordine 2 - Linea 2 + # Fattura 3 - Linea 3 + # + order_line = second_sales_order.order_line[1] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 11) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 8) + + delivery_note_line = second_delivery_note.line_ids[1] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 8) + + invoice_line = final_invoice.invoice_line_ids[2] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 8) + + # + # Ordine 2 - Linea 3 + # Fattura 3 - Linea 4 + # + order_line = second_sales_order.order_line[2] + self.assertEqual(order_line.invoice_status, 'invoiced') + self.assertEqual(order_line.qty_to_invoice, 0) + self.assertEqual(order_line.qty_invoiced, 5) + + moves = order_line.move_ids + self.assertEqual(len(moves), 2) + self.assertEqual(moves[1].quantity_done, 2) + + delivery_note_line = second_delivery_note.line_ids[2] + self.assertEqual(delivery_note_line.invoice_status, 'invoiced') + self.assertEqual(delivery_note_line.sale_line_id, order_line) + self.assertEqual(delivery_note_line.product_qty, 2) + + invoice_line = final_invoice.invoice_line_ids[3] + self.assertEqual(invoice_line.sale_line_ids, order_line) + self.assertEqual(invoice_line.quantity, 2) + + # + # Fattura 3 - Linea 5 (DdT in fattura) + # + invoice_line = final_invoice.invoice_line_ids[4] + self.assertEqual(invoice_line.display_type, 'line_note') + self.assertEqual(invoice_line.quantity, 0) + self.assertEqual(invoice_line.delivery_note_id, second_delivery_note) diff --git a/l10n_it_delivery_note/views/account_invoice.xml b/l10n_it_delivery_note/views/account_invoice.xml new file mode 100644 index 000000000000..e4300022cdbc --- /dev/null +++ b/l10n_it_delivery_note/views/account_invoice.xml @@ -0,0 +1,28 @@ + + + + + + + + account.invoice.form + account.invoice + + + + + + + + + diff --git a/l10n_it_delivery_note/views/assets.xml b/l10n_it_delivery_note/views/assets.xml new file mode 100644 index 000000000000..95937968c3cc --- /dev/null +++ b/l10n_it_delivery_note/views/assets.xml @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/l10n_it_delivery_note/views/res_config_settings.xml b/l10n_it_delivery_note/views/res_config_settings.xml new file mode 100644 index 000000000000..5a8015b4ca7d --- /dev/null +++ b/l10n_it_delivery_note/views/res_config_settings.xml @@ -0,0 +1,53 @@ + + + + + + + + res.config.settings.form + res.config.settings + + + +

Delivery Notes

+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
diff --git a/l10n_it_delivery_note/views/res_partner.xml b/l10n_it_delivery_note/views/res_partner.xml new file mode 100644 index 000000000000..98048560f769 --- /dev/null +++ b/l10n_it_delivery_note/views/res_partner.xml @@ -0,0 +1,26 @@ + + + + + + + + res.partner.form + res.partner + + + + + + + + + + + + + + diff --git a/l10n_it_delivery_note/views/sale_order.xml b/l10n_it_delivery_note/views/sale_order.xml new file mode 100644 index 000000000000..1e1bc65c277b --- /dev/null +++ b/l10n_it_delivery_note/views/sale_order.xml @@ -0,0 +1,24 @@ + + + + + + + + sale.order.form + sale.order + + + + + + + + + + + + diff --git a/l10n_it_delivery_note/views/stock_delivery_note.xml b/l10n_it_delivery_note/views/stock_delivery_note.xml new file mode 100644 index 000000000000..b6dfc32388ee --- /dev/null +++ b/l10n_it_delivery_note/views/stock_delivery_note.xml @@ -0,0 +1,419 @@ + + + + + + + + stock.delivery.note.form + stock.delivery.note + form + +
+ + + + + + + +
+
+ +
+ + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + +
+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+ + + stock.picking.tree + stock.picking + + + +