mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 09:22:00 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
|
|
@ -1,22 +1,22 @@
|
|||
# l10n_it_stock_ddt
|
||||
# Italy - Stock DDT
|
||||
|
||||
|
||||
Documento di Trasporto (DDT)
|
||||
|
||||
Whenever goods are transferred between A and B, the DDT serves
|
||||
as a legitimation e.g. when the police would stop you.
|
||||
as a legitimation e.g. when the police would stop you.
|
||||
|
||||
When you want to print an outgoing picking in an Italian company,
|
||||
it will print you the DDT instead. It is like the delivery
|
||||
slip, but it also contains the value of the product,
|
||||
the transportation reason, the carrier, ... which make it a DDT.
|
||||
When you want to print an outgoing picking in an Italian company,
|
||||
it will print you the DDT instead. It is like the delivery
|
||||
slip, but it also contains the value of the product,
|
||||
the transportation reason, the carrier, ... which make it a DDT.
|
||||
|
||||
We also use a separate sequence for the DDT as the number should not
|
||||
have any gaps and should only be applied at the moment the goods are sent.
|
||||
We also use a separate sequence for the DDT as the number should not
|
||||
have any gaps and should only be applied at the moment the goods are sent.
|
||||
|
||||
When invoices are related to their sale order and the sale order with the
|
||||
delivery, the system will automatically calculate the linked DDTs for every
|
||||
invoice line to export in the FatturaPA XML.
|
||||
When invoices are related to their sale order and the sale order with the
|
||||
delivery, the system will automatically calculate the linked DDTs for every
|
||||
invoice line to export in the FatturaPA XML.
|
||||
|
||||
|
||||
## Installation
|
||||
|
|
@ -27,39 +27,16 @@ pip install odoo-bringout-oca-ocb-l10n_it_stock_ddt
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- l10n_it_edi
|
||||
- delivery
|
||||
- stock_delivery
|
||||
- stock_account
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: l10n_it_stock_ddt
|
||||
- **Version**: 0.1
|
||||
- **Category**: Accounting/Localizations/EDI
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: False
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_it_stock_ddt`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/l10n_it_stock_ddt
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def _create_picking_seq(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
def _create_picking_seq(env):
|
||||
ptypes = env['stock.picking.type'].search([('code', '=', 'outgoing'), ('warehouse_id', '!=', False)])
|
||||
for ptype in ptypes:
|
||||
wh = ptype.warehouse_id
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "l10n_it_stock_ddt",
|
||||
'icon': '/l10n_it/static/description/icon.png',
|
||||
'name': "Italy - Stock DDT",
|
||||
'website': 'https://www.odoo.com',
|
||||
'category': 'Accounting/Localizations/EDI',
|
||||
'version': '0.1',
|
||||
|
|
@ -9,21 +8,21 @@
|
|||
Documento di Trasporto (DDT)
|
||||
|
||||
Whenever goods are transferred between A and B, the DDT serves
|
||||
as a legitimation e.g. when the police would stop you.
|
||||
as a legitimation e.g. when the police would stop you.
|
||||
|
||||
When you want to print an outgoing picking in an Italian company,
|
||||
it will print you the DDT instead. It is like the delivery
|
||||
slip, but it also contains the value of the product,
|
||||
the transportation reason, the carrier, ... which make it a DDT.
|
||||
When you want to print an outgoing picking in an Italian company,
|
||||
it will print you the DDT instead. It is like the delivery
|
||||
slip, but it also contains the value of the product,
|
||||
the transportation reason, the carrier, ... which make it a DDT.
|
||||
|
||||
We also use a separate sequence for the DDT as the number should not
|
||||
have any gaps and should only be applied at the moment the goods are sent.
|
||||
We also use a separate sequence for the DDT as the number should not
|
||||
have any gaps and should only be applied at the moment the goods are sent.
|
||||
|
||||
When invoices are related to their sale order and the sale order with the
|
||||
delivery, the system will automatically calculate the linked DDTs for every
|
||||
invoice line to export in the FatturaPA XML.
|
||||
When invoices are related to their sale order and the sale order with the
|
||||
delivery, the system will automatically calculate the linked DDTs for every
|
||||
invoice line to export in the FatturaPA XML.
|
||||
""",
|
||||
'depends': ['l10n_it_edi', 'delivery', 'stock_account'],
|
||||
'depends': ['l10n_it_edi', 'stock_delivery', 'stock_account'],
|
||||
'data': [
|
||||
'report/l10n_it_ddt_report.xml',
|
||||
'views/stock_picking_views.xml',
|
||||
|
|
@ -32,5 +31,6 @@ invoice line to export in the FatturaPA XML.
|
|||
],
|
||||
'auto_install': True,
|
||||
'post_init_hook': '_create_picking_seq',
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,38 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_it_stock_ddt
|
||||
# * l10n_it_stock_ddt
|
||||
#
|
||||
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
|
||||
# "Marianna Ciofani (cima)" <cima@odoo.com>, 2025.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0+e\n"
|
||||
"Project-Id-Version: Odoo Server 17.5alpha1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-11 14:02+0000\n"
|
||||
"PO-Revision-Date: 2022-01-11 14:02+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"POT-Creation-Date: 2025-12-30 19:07+0000\n"
|
||||
"PO-Revision-Date: 2025-12-20 09:33+0000\n"
|
||||
"Last-Translator: \"Marianna Ciofani (cima)\" <cima@odoo.com>\n"
|
||||
"Language-Team: Italian <https://translate.odoo.com/projects/odoo-19-l10n/"
|
||||
"l10n_it_stock_ddt/it/>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ((n != 0 && n % 1000000 == "
|
||||
"0) ? 1 : 2);\n"
|
||||
"X-Generator: Weblate 5.14.3\n"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
|
||||
msgid "%(warehouse)s Sequence %(code)s"
|
||||
msgstr "%(warehouse)s Sequenza %(code)s"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.actions.report,print_report_name:l10n_it_stock_ddt.action_report_ddt
|
||||
msgid ""
|
||||
"'DDT - %s - %s' % (object.partner_id.name or '', object.l10n_it_ddt_number)"
|
||||
msgstr ""
|
||||
"'DDT - %s - %s' % (object.partner_id.name or '', object.l10n_it_ddt_number)"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
|
|
@ -36,30 +49,30 @@ msgstr "<b>Totale:</b>"
|
|||
msgid "<b>Transportation Method Details: </b>"
|
||||
msgstr "<b>Dettagli metodo di trasporto</b>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<span><strong>Customer Address:</strong></span>"
|
||||
msgstr "<span><strong>Indirizzo Cliente:</strong></span>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<span><strong>Warehouse Address:</strong></span>"
|
||||
msgstr "<span><strong>Indirizzo Magazzino:</strong></span>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Carrier Signature</strong>"
|
||||
msgstr "<strong>Firma Corriere</strong>"
|
||||
msgstr "<strong>Firma corriere</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Company Signature</strong>"
|
||||
msgstr "<strong>Firma Azienda</strong>"
|
||||
msgstr "<strong>Firma azienda</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Customer Address</strong>"
|
||||
msgstr "<strong>Indirizzo cliente</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Customer Signature</strong>"
|
||||
msgstr "<strong>Firma Cliente</strong>"
|
||||
msgstr "<strong>Firma cliente</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Disc.%</strong>"
|
||||
msgstr "<strong>Sconto%</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
|
|
@ -74,12 +87,17 @@ msgstr "<strong>Quantità</strong>"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Total Value</strong>"
|
||||
msgstr "<strong>Valore Totale</strong>"
|
||||
msgstr "<strong>Valore totale</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Warehouse Address</strong>"
|
||||
msgstr "<strong>Indirizzo magazzino</strong>"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__attemped_sale
|
||||
msgid "Attempted Sale"
|
||||
msgstr "Tentata Vendita"
|
||||
msgstr "Tentata vendita"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
|
|
@ -89,17 +107,12 @@ msgstr "Corriere"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "Carrier Condition"
|
||||
msgstr "Termini di Resa"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
|
||||
msgid "Country Code"
|
||||
msgstr "Codice Nazione"
|
||||
msgstr "Termini di resa"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__courier
|
||||
msgid "Courier service"
|
||||
msgstr "Servizio Corriere"
|
||||
msgstr "Servizio corriere"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.view_picking_form_inherit_l10n_it_ddt
|
||||
|
|
@ -131,12 +144,12 @@ msgstr "Nome visualizzato"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "Documento di Trasporto"
|
||||
msgstr ""
|
||||
msgstr "Documento di trasporto"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__evaluation
|
||||
msgid "Evaluation"
|
||||
msgstr "Conto Visione"
|
||||
msgstr "Conto visione"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__gift
|
||||
|
|
@ -153,7 +166,7 @@ msgstr "Peso lordo (kg)"
|
|||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__id
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
msgstr "ID"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model,name:l10n_it_stock_ddt.model_account_move
|
||||
|
|
@ -163,32 +176,28 @@ msgstr "Registrazione contabile"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_ids
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_ids
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_ids
|
||||
msgid "L10N It Ddt"
|
||||
msgstr ""
|
||||
msgstr "L10N It DDT"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_count
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_count
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_count
|
||||
msgid "L10N It Ddt Count"
|
||||
msgstr ""
|
||||
msgstr "Numero L10N It DDT"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__l10n_it_ddt_sequence_id
|
||||
msgid "L10N It Ddt Sequence"
|
||||
msgstr ""
|
||||
msgstr "Sequenza L10N It DDT"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Ultima modifica il"
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_show_print_ddt_button
|
||||
msgid "L10N It Show Print Ddt Button"
|
||||
msgstr "Mostra pulsante Stampa DDT L10N It"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
|
||||
#, python-format
|
||||
msgid "Linked deliveries"
|
||||
msgstr "Spedizioni associate"
|
||||
|
||||
|
|
@ -205,7 +214,7 @@ msgstr "Ordine"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__outsourcing
|
||||
msgid "Outsourcing"
|
||||
msgstr "Conto Lavorazione"
|
||||
msgstr "Conto lavorazione"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_parcels
|
||||
|
|
@ -236,7 +245,12 @@ msgstr "Destinatario"
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__repair
|
||||
msgid "Repair"
|
||||
msgstr "Conto Riparazione"
|
||||
msgstr "Conto riparazione"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
|
||||
msgid "Returned goods"
|
||||
msgstr "Reso"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__sale
|
||||
|
|
@ -249,32 +263,22 @@ msgid "Sender"
|
|||
msgstr "Mittente"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
|
||||
#, python-format
|
||||
msgid "Sequence"
|
||||
msgstr "Sequenza"
|
||||
msgid "Sequence %(code)s"
|
||||
msgstr "Sequenza %(code)s"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "Shipping Date"
|
||||
msgstr "Data transporto"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
|
||||
msgid "Returned goods"
|
||||
msgstr "Reso"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,help:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
||||
"Il codice ISO nazionale in 2 caratteri. \n"
|
||||
"Puoi usare questo campo per la ricerca veloce."
|
||||
msgstr "Data trasporto"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking
|
||||
msgid "Stock Picking - Delivery Guide (Uruguay)"
|
||||
msgstr "Prelievo scorte - Guida alla consegna (Uruguay)"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__transfer
|
||||
msgid "Transfer"
|
||||
msgstr "Trasferimento"
|
||||
|
|
@ -306,10 +310,11 @@ msgstr "Ragione trasporto"
|
|||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "VAT"
|
||||
msgstr "Pta IVA"
|
||||
msgid "VAT:"
|
||||
msgstr "Part. IVA:"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "VAT:"
|
||||
msgstr "Pta IVA:"
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
|
||||
msgid "id"
|
||||
msgstr "ID"
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0+e\n"
|
||||
"Project-Id-Version: Odoo Server 19.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-01-10 15:18+0000\n"
|
||||
"PO-Revision-Date: 2022-01-10 15:18+0000\n"
|
||||
"POT-Creation-Date: 2025-12-30 19:07+0000\n"
|
||||
"PO-Revision-Date: 2025-12-30 19:07+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
@ -15,6 +15,12 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
|
||||
msgid "%(warehouse)s Sequence %(code)s"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.actions.report,print_report_name:l10n_it_stock_ddt.action_report_ddt
|
||||
msgid ""
|
||||
|
|
@ -36,16 +42,6 @@ msgstr ""
|
|||
msgid "<b>Transportation Method Details: </b>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<span><strong>Customer Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<span><strong>Warehouse Address:</strong></span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Carrier Signature</strong>"
|
||||
|
|
@ -56,11 +52,21 @@ msgstr ""
|
|||
msgid "<strong>Company Signature</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Customer Address</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Customer Signature</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Disc.%</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Product</strong>"
|
||||
|
|
@ -76,6 +82,11 @@ msgstr ""
|
|||
msgid "<strong>Total Value</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "<strong>Warehouse Address</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__attemped_sale
|
||||
msgid "Attempted Sale"
|
||||
|
|
@ -91,11 +102,6 @@ msgstr ""
|
|||
msgid "Carrier Condition"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
|
||||
msgid "Country Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__courier
|
||||
msgid "Courier service"
|
||||
|
|
@ -163,14 +169,12 @@ msgstr ""
|
|||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_ids
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_ids
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_ids
|
||||
msgid "L10N It Ddt"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_count
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_count
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_count
|
||||
msgid "L10N It Ddt Count"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -180,15 +184,13 @@ msgid "L10N It Ddt Sequence"
|
|||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking____last_update
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type____last_update
|
||||
msgid "Last Modified on"
|
||||
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_show_print_ddt_button
|
||||
msgid "L10N It Show Print Ddt Button"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
|
||||
#, python-format
|
||||
msgid "Linked deliveries"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -238,6 +240,11 @@ msgstr ""
|
|||
msgid "Repair"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
|
||||
msgid "Returned goods"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__sale
|
||||
msgid "Sale"
|
||||
|
|
@ -249,10 +256,9 @@ msgid "Sender"
|
|||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
|
||||
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
|
||||
#, python-format
|
||||
msgid "Sequence"
|
||||
msgid "Sequence %(code)s"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
|
|
@ -260,20 +266,12 @@ msgstr ""
|
|||
msgid "Shipping Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
|
||||
msgid "Returned goods"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields,help:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
|
||||
msgid ""
|
||||
"The ISO country code in two chars. \n"
|
||||
"You can use this field for quick search."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking
|
||||
msgid "Stock Picking - Delivery Guide (Uruguay)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__transfer
|
||||
msgid "Transfer"
|
||||
msgstr ""
|
||||
|
|
@ -305,10 +303,11 @@ msgstr ""
|
|||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "VAT"
|
||||
msgid "VAT:"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_it_stock_ddt
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
|
||||
msgid "VAT:"
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
|
||||
msgid "id"
|
||||
msgstr ""
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@
|
|||
|
||||
from . import stock_picking
|
||||
from . import account_invoice
|
||||
from . import account_edi_format
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
# -*- coding:utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountEdiFormat(models.Model):
|
||||
_inherit = 'account.edi.format'
|
||||
|
||||
def _l10n_it_invoice_is_direct(self, invoice):
|
||||
""" An invoice is only direct if the Transport Documents are all done the same day as the invoice. """
|
||||
for ddt in invoice.l10n_it_ddt_ids:
|
||||
if not ddt.date_done or ddt.date_done.date() != invoice.invoice_date:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _l10n_it_get_invoice_features_for_document_type_selection(self, invoice):
|
||||
res = super()._l10n_it_get_invoice_features_for_document_type_selection(invoice)
|
||||
res['direct_invoice'] = self._l10n_it_invoice_is_direct(invoice)
|
||||
return res
|
||||
|
||||
def _l10n_it_document_type_mapping(self):
|
||||
""" Deferred invoices (not direct) require TD24 FatturaPA Document Type. """
|
||||
res = super()._l10n_it_document_type_mapping()
|
||||
for document_type, infos in res.items():
|
||||
if document_type == 'TD07':
|
||||
continue
|
||||
infos['direct_invoice'] = True
|
||||
res['TD24'] = dict(move_types=['out_invoice'], import_type='in_invoice', direct_invoice=False)
|
||||
return res
|
||||
|
|
@ -11,6 +11,28 @@ class AccountMove(models.Model):
|
|||
l10n_it_ddt_ids = fields.Many2many('stock.picking', compute="_compute_ddt_ids")
|
||||
l10n_it_ddt_count = fields.Integer(compute="_compute_ddt_ids")
|
||||
|
||||
def _l10n_it_edi_document_type_mapping(self):
|
||||
""" Deferred invoices (not direct) require TD24 FatturaPA Document Type. """
|
||||
res = super()._l10n_it_edi_document_type_mapping()
|
||||
for document_type, infos in res.items():
|
||||
if document_type == 'TD07':
|
||||
continue
|
||||
infos['direct_invoice'] = True
|
||||
res['TD24'] = {'move_types': ['out_invoice'], 'import_type': 'in_invoice', 'direct_invoice': False}
|
||||
return res
|
||||
|
||||
def _l10n_it_edi_invoice_is_direct(self):
|
||||
""" An invoice is only direct if the Transport Documents are all done the same day as the invoice. """
|
||||
for ddt in self.l10n_it_ddt_ids:
|
||||
if not ddt.date_done or ddt.date_done.date() != self.invoice_date:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _l10n_it_edi_features_for_document_type_selection(self):
|
||||
res = super()._l10n_it_edi_features_for_document_type_selection()
|
||||
res['direct_invoice'] = self._l10n_it_edi_invoice_is_direct()
|
||||
return res
|
||||
|
||||
def _get_ddt_values(self):
|
||||
"""
|
||||
We calculate the link between the invoice lines and the deliveries related to the invoice through the
|
||||
|
|
@ -23,7 +45,7 @@ class AccountMove(models.Model):
|
|||
return {}
|
||||
line_count = 0
|
||||
invoice_line_pickings = {}
|
||||
for line in self.invoice_line_ids.filtered(lambda l: l.display_type not in ('line_note', 'line_section')):
|
||||
for line in self.invoice_line_ids.filtered(lambda l: l.display_type not in ('line_section', 'line_subsection', 'line_note')):
|
||||
line_count += 1
|
||||
done_moves_related = line.sale_line_ids.mapped('move_ids').filtered(
|
||||
lambda m: m.state == 'done' and m.location_dest_id.usage == 'customer' and m.picking_type_id.code == 'outgoing')
|
||||
|
|
@ -74,13 +96,13 @@ class AccountMove(models.Model):
|
|||
self.ensure_one()
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'tree,form',
|
||||
'view_mode': 'list,form',
|
||||
'name': _("Linked deliveries"),
|
||||
'res_model': 'stock.picking',
|
||||
'domain': [('id', 'in', self.l10n_it_ddt_ids.ids)],
|
||||
}
|
||||
|
||||
def _prepare_fatturapa_export_values(self):
|
||||
template_values = super()._prepare_fatturapa_export_values()
|
||||
def _l10n_it_edi_get_values(self, pdf_values=None):
|
||||
template_values = super()._l10n_it_edi_get_values(pdf_values)
|
||||
template_values['ddt_dict'] = self._get_ddt_values()
|
||||
return template_values
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ class StockPicking(models.Model):
|
|||
and picking.is_locked
|
||||
and (picking.picking_type_code == 'outgoing'
|
||||
or (
|
||||
picking.move_ids_without_package
|
||||
and picking.move_ids_without_package[0].partner_id
|
||||
picking.move_ids
|
||||
and picking.move_ids[0].partner_id
|
||||
and picking.location_id.usage == 'supplier'
|
||||
and picking.location_dest_id.usage == 'customer'
|
||||
)
|
||||
|
|
@ -49,9 +49,9 @@ class StockPicking(models.Model):
|
|||
)
|
||||
|
||||
def _action_done(self):
|
||||
super(StockPicking, self)._action_done()
|
||||
for picking in self.filtered(lambda p: p.picking_type_id.l10n_it_ddt_sequence_id):
|
||||
picking.l10n_it_ddt_number = picking.picking_type_id.l10n_it_ddt_sequence_id.next_by_id()
|
||||
super()._action_done()
|
||||
|
||||
|
||||
class StockPickingType(models.Model):
|
||||
|
|
@ -62,10 +62,10 @@ class StockPickingType(models.Model):
|
|||
def _get_dtt_ir_seq_vals(self, warehouse_id, sequence_code):
|
||||
if warehouse_id:
|
||||
wh = self.env['stock.warehouse'].browse(warehouse_id)
|
||||
ir_seq_name = wh.name + ' ' + _('Sequence') + ' ' + sequence_code
|
||||
ir_seq_name = _('%(warehouse)s Sequence %(code)s', warehouse=wh.name, code=sequence_code)
|
||||
ir_seq_prefix = wh.code + '/' + sequence_code + '/DDT'
|
||||
else:
|
||||
ir_seq_name = _('Sequence') + ' ' + sequence_code
|
||||
ir_seq_name = _('Sequence %(code)s', code=sequence_code)
|
||||
ir_seq_prefix = sequence_code + '/DDT'
|
||||
return ir_seq_name, ir_seq_prefix
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
<template id="report_ddt_view">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="o" t-value="o.with_context(lang=lang)"/>
|
||||
<t t-if="o.move_ids_without_package and o.move_ids_without_package[0].partner_id and o.location_dest_id.usage == 'customer' and o.location_id.usage == 'supplier'">
|
||||
<t t-if="o.move_ids and o.move_ids[0].partner_id and o.location_dest_id.usage == 'customer' and o.location_id.usage == 'supplier'">
|
||||
<t t-set="delivery_from" t-value="o.partner_id"/>
|
||||
<t t-set="delivery_to" t-value="o.move_ids_without_package[0].partner_id"/>
|
||||
<t t-set="delivery_to" t-value="o.move_ids[0].partner_id"/>
|
||||
</t>
|
||||
<t t-elif="o.picking_type_id.warehouse_id.partner_id">
|
||||
<t t-set="delivery_from" t-value="o.picking_type_id.warehouse_id.partner_id"/>
|
||||
|
|
@ -18,14 +18,14 @@
|
|||
<div class="page">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<span><strong>Warehouse Address:</strong></span>
|
||||
<strong>Warehouse Address</strong>
|
||||
<div t-esc="delivery_from"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
||||
<p t-if="delivery_from.vat">VAT: <span t-field="delivery_from.vat"/></p>
|
||||
</div>
|
||||
<div class="col-5 offset-1">
|
||||
<div>
|
||||
<span><strong>Customer Address:</strong></span>
|
||||
<strong>Customer Address</strong>
|
||||
<div t-esc="delivery_to"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "vat"], "no_marker": True, "phone_icons": True}'/>
|
||||
</div>
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="mb32"/>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table table-bordered">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Transportation Reason</td>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-5 offset-1">
|
||||
<table class="table table-bordered">
|
||||
<table class="table table-borderless">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Order</td>
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
<div class="mt64"/>
|
||||
<div class="mt64"/>
|
||||
|
||||
<table class="table table-sm" name="document_details">
|
||||
<table class="table table-borderless" name="document_details">
|
||||
<t t-set="display_discount" t-value="any(m.sale_line_id.discount for m in o.move_ids)"/>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -114,13 +114,13 @@
|
|||
<tbody>
|
||||
<t t-set="total_value" t-value="0"/>
|
||||
<t t-foreach="o.move_ids" t-as="move">
|
||||
<t t-if="move.quantity_done">
|
||||
<t t-if="move.quantity">
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="move.product_id"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="move.quantity_done"/>
|
||||
<td class="o_td_quantity">
|
||||
<span t-field="move.quantity" class="text-nowrap"/>
|
||||
<span t-field="move.product_uom" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td t-if="display_discount">
|
||||
|
|
@ -128,10 +128,10 @@
|
|||
</td>
|
||||
<td>
|
||||
<t t-if="move.sale_line_id">
|
||||
<t t-set="lst_price" t-value="move.sale_line_id.price_reduce_taxinc * move.quantity_done"/>
|
||||
<t t-set="lst_price" t-value="move.sale_line_id.price_reduce_taxinc * move.product_id.uom_id._compute_quantity(move.quantity, move.sale_line_id.product_uom_id)"/>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-set="lst_price" t-value="move.product_id.lst_price * move.product_uom._compute_quantity(move.quantity_done, move.product_id.uom_id)"/>
|
||||
<t t-set="lst_price" t-value="move.product_id.lst_price * move.product_uom._compute_quantity(move.quantity, move.product_id.uom_id)"/>
|
||||
</t>
|
||||
<span t-esc="lst_price" t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'/>
|
||||
<t t-set="total_value" t-value="total_value + lst_price"/>
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
</table>
|
||||
<div class="mt64"/>
|
||||
<div class="mt64"/>
|
||||
<table class="table table-sm">
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="fa fa-pencil mt4"/><div class="ml4 d-inline-block"/><strong>Company Signature</strong></th>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
<FormatoTrasmissione>FPR12</FormatoTrasmissione>
|
||||
<CodiceDestinatario>0000000</CodiceDestinatario>
|
||||
<ContattiTrasmittente>
|
||||
<Telefono>0266766700</Telefono>
|
||||
<Email>test@test.it</Email>
|
||||
</ContattiTrasmittente>
|
||||
</DatiTrasmissione>
|
||||
<CedentePrestatore>
|
||||
|
|
@ -58,6 +60,9 @@
|
|||
<Numero>INV/2020/00001</Numero>
|
||||
<ImportoTotaleDocumento>2427.80</ImportoTotaleDocumento>
|
||||
</DatiGeneraliDocumento>
|
||||
<DatiOrdineAcquisto>
|
||||
<IdDocumento>SO-ITDDT0001</IdDocumento>
|
||||
</DatiOrdineAcquisto>
|
||||
<DatiDDT>
|
||||
<NumeroDDT>compa/OUT/DDT00001</NumeroDDT>
|
||||
<DataDDT>2020-02-02</DataDDT>
|
||||
|
|
@ -78,11 +83,11 @@
|
|||
<CodiceTipo>INTERNAL</CodiceTipo>
|
||||
<CodiceValore>PRE-PAID</CodiceValore>
|
||||
</CodiceArticolo>
|
||||
<Descrizione>product_service_order</Descrizione>
|
||||
<Descrizione>[PRE-PAID] product_service_order product_service_order</Descrizione>
|
||||
<Quantita>5.00</Quantita>
|
||||
<UnitaMisura>Hours</UnitaMisura>
|
||||
<PrezzoUnitario>90.000000</PrezzoUnitario>
|
||||
<PrezzoTotale>450.00</PrezzoTotale>
|
||||
<PrezzoUnitario>90.00000000</PrezzoUnitario>
|
||||
<PrezzoTotale>450.00000000</PrezzoTotale>
|
||||
<AliquotaIVA>22.00</AliquotaIVA>
|
||||
</DettaglioLinee>
|
||||
<DettaglioLinee>
|
||||
|
|
@ -91,10 +96,10 @@
|
|||
<CodiceTipo>INTERNAL</CodiceTipo>
|
||||
<CodiceValore>FURN_9999</CodiceValore>
|
||||
</CodiceArticolo>
|
||||
<Descrizione>product_order_no</Descrizione>
|
||||
<Descrizione>[FURN_9999] product_order_no product_order_no</Descrizione>
|
||||
<Quantita>5.00</Quantita>
|
||||
<PrezzoUnitario>280.000000</PrezzoUnitario>
|
||||
<PrezzoTotale>1400.00</PrezzoTotale>
|
||||
<PrezzoUnitario>280.00000000</PrezzoUnitario>
|
||||
<PrezzoTotale>1400.00000000</PrezzoTotale>
|
||||
<AliquotaIVA>22.00</AliquotaIVA>
|
||||
</DettaglioLinee>
|
||||
<DettaglioLinee>
|
||||
|
|
@ -103,10 +108,10 @@
|
|||
<CodiceTipo>INTERNAL</CodiceTipo>
|
||||
<CodiceValore>FURN_7777</CodiceValore>
|
||||
</CodiceArticolo>
|
||||
<Descrizione>product_delivery_no</Descrizione>
|
||||
<Descrizione>[FURN_7777] product_delivery_no product_delivery_no</Descrizione>
|
||||
<Quantita>2.00</Quantita>
|
||||
<PrezzoUnitario>70.000000</PrezzoUnitario>
|
||||
<PrezzoTotale>140.00</PrezzoTotale>
|
||||
<PrezzoUnitario>70.00000000</PrezzoUnitario>
|
||||
<PrezzoTotale>140.00000000</PrezzoTotale>
|
||||
<AliquotaIVA>22.00</AliquotaIVA>
|
||||
</DettaglioLinee>
|
||||
<DatiRiepilogo>
|
||||
|
|
@ -125,6 +130,5 @@
|
|||
<CodicePagamento>INV/2020/00001</CodicePagamento>
|
||||
</DettaglioPagamento>
|
||||
</DatiPagamento>
|
||||
<Allegati/>
|
||||
</FatturaElettronicaBody>
|
||||
</p:FatturaElettronica>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo.addons.sale.tests.common import TestSaleCommon
|
||||
from odoo.tests import tagged, Form
|
||||
from odoo.tests import Form, tagged
|
||||
|
||||
|
||||
@tagged('post_install_l10n', 'post_install', '-at_install')
|
||||
class TestDDT(TestSaleCommon):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls, chart_template_ref='l10n_it.l10n_it_chart_template_generic'):
|
||||
super().setUpClass(chart_template_ref=chart_template_ref)
|
||||
@TestSaleCommon.setup_country('it')
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.company_data['company'].write({
|
||||
'vat':"IT12345670017",
|
||||
'country_id': cls.env.ref('base.it').id,
|
||||
'l10n_it_codice_fiscale': '01234560157',
|
||||
'l10n_it_tax_system': 'RF01',
|
||||
'street': 'Via Giovanni Maria Platina 66',
|
||||
|
|
@ -22,6 +22,7 @@ class TestDDT(TestSaleCommon):
|
|||
cls.env['res.partner.bank'].create({
|
||||
'acc_number': 'IT60X0542811101000000123456',
|
||||
'partner_id': cls.company_data['company'].partner_id.id,
|
||||
'allow_out_payment': True,
|
||||
})
|
||||
cls.partner_a.write({
|
||||
'street': 'Piazza Guglielmo Marconi 5',
|
||||
|
|
@ -32,16 +33,9 @@ class TestDDT(TestSaleCommon):
|
|||
})
|
||||
|
||||
settings = cls.env['res.config.settings'].create({})
|
||||
if hasattr(settings, 'button_create_proxy_user'):
|
||||
if hasattr(settings, '_create_proxy_user'):
|
||||
# Needed when `l10n_it_edi_sdiscoop` is installed
|
||||
settings.button_create_proxy_user()
|
||||
|
||||
@classmethod
|
||||
def setup_company_data(cls, company_name, **kwargs):
|
||||
return super().setup_company_data(company_name, **{
|
||||
**kwargs,
|
||||
'country_id': cls.env.ref('base.it').id,
|
||||
})
|
||||
settings._create_proxy_user(cls.company_data['company'], 'demo')
|
||||
|
||||
def test_ddt_flow(self):
|
||||
"""
|
||||
|
|
@ -56,26 +50,22 @@ class TestDDT(TestSaleCommon):
|
|||
'order_line': [(0, 0, {'name': p.name,
|
||||
'product_id': p.id,
|
||||
'product_uom_qty': 5,
|
||||
'product_uom': p.uom_id.id,
|
||||
'price_unit': p.list_price,
|
||||
'tax_id': self.company_data['default_tax_sale']})
|
||||
'tax_ids': self.company_data['default_tax_sale']})
|
||||
for p in (
|
||||
self.company_data['product_order_no'],
|
||||
self.company_data['product_service_delivery'],
|
||||
self.company_data['product_service_order'],
|
||||
self.company_data['product_delivery_no'],
|
||||
)],
|
||||
'pricelist_id': self.company_data['default_pricelist'].id,
|
||||
'picking_policy': 'direct',
|
||||
})
|
||||
self.so.action_confirm()
|
||||
|
||||
# deliver partially
|
||||
pick = self.so.picking_ids
|
||||
pick.move_ids.write({'quantity_done': 1})
|
||||
wiz_act = pick.button_validate()
|
||||
wiz = Form(self.env[wiz_act['res_model']].with_context(wiz_act['context'])).save()
|
||||
wiz.process()
|
||||
pick.move_ids.write({'quantity': 1, 'picked': True})
|
||||
Form.from_action(self.env, pick.button_validate()).save().process()
|
||||
|
||||
self.assertTrue(pick.l10n_it_ddt_number, 'The outgoing picking should have a DDT number')
|
||||
self.inv1 = self.so._create_invoices()
|
||||
|
|
@ -84,17 +74,13 @@ class TestDDT(TestSaleCommon):
|
|||
|
||||
# deliver partially
|
||||
pickx1 = self.so.picking_ids.filtered(lambda p: p.state != 'done')
|
||||
pickx1.move_ids.write({'quantity_done': 1})
|
||||
wiz_act = pickx1.button_validate()
|
||||
wiz = Form(self.env[wiz_act['res_model']].with_context(wiz_act['context'])).save()
|
||||
wiz.process()
|
||||
pickx1.move_ids.write({'quantity': 1, 'picked': True})
|
||||
Form.from_action(self.env, pickx1.button_validate()).save().process()
|
||||
|
||||
# and again
|
||||
pickx2 = self.so.picking_ids.filtered(lambda p: p.state != 'done')
|
||||
pickx2.move_ids.write({'quantity_done': 2})
|
||||
wiz_act = pickx2.button_validate()
|
||||
wiz = Form(self.env[wiz_act['res_model']].with_context(wiz_act['context'])).save()
|
||||
wiz.process()
|
||||
pickx2.move_ids.write({'quantity': 2, 'picked': True})
|
||||
Form.from_action(self.env, pickx2.button_validate()).save().process()
|
||||
|
||||
self.inv2 = self.so._create_invoices()
|
||||
self.inv2.action_post()
|
||||
|
|
@ -117,29 +103,25 @@ class TestDDT(TestSaleCommon):
|
|||
'order_line': [(0, 0, {
|
||||
'product_id': self.product_a.id,
|
||||
'product_uom_qty': 3,
|
||||
'product_uom': self.product_a.uom_id.id,
|
||||
'price_unit': self.product_a.list_price,
|
||||
'tax_id': self.company_data['default_tax_sale']
|
||||
'tax_ids': self.company_data['default_tax_sale']
|
||||
}
|
||||
)],
|
||||
'pricelist_id': self.company_data['default_pricelist'].id,
|
||||
'picking_policy': 'direct',
|
||||
})
|
||||
so.action_confirm()
|
||||
|
||||
# deliver partially
|
||||
picking_1 = so.picking_ids
|
||||
picking_1.move_ids.write({'quantity_done': 1})
|
||||
wiz_act = picking_1.button_validate()
|
||||
wiz = Form(self.env[wiz_act['res_model']].with_context(wiz_act['context'])).save()
|
||||
wiz.process()
|
||||
picking_1.move_ids.write({'quantity': 1, 'picked': True})
|
||||
Form.from_action(self.env, picking_1.button_validate()).save().process()
|
||||
|
||||
invoice_1 = so._create_invoices()
|
||||
invoice_1.invoice_line_ids[0].quantity = 1.0
|
||||
invoice_1.action_post()
|
||||
|
||||
picking_2 = so.picking_ids.filtered(lambda p: p.state != 'done')
|
||||
picking_2.move_ids.write({'quantity_done': 2})
|
||||
picking_2.move_ids.write({'quantity': 2, 'picked': True})
|
||||
picking_2.button_validate()
|
||||
|
||||
invoice_2 = so._create_invoices()
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import logging
|
||||
from lxml import etree
|
||||
from freezegun import freeze_time
|
||||
from odoo import tools
|
||||
from odoo.tests import tagged, Form
|
||||
from odoo.tests import Form, tagged
|
||||
from odoo.addons.l10n_it_edi.tests.common import TestItEdi
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
|
@ -42,7 +43,6 @@ class TestItEdiDDT(TestItEdi):
|
|||
'list_price': 180.0,
|
||||
'type': 'service',
|
||||
'uom_id': uom_unit.id,
|
||||
'uom_po_id': uom_unit.id,
|
||||
'default_code': 'SERV_DEL',
|
||||
'invoice_policy': 'delivery',
|
||||
'taxes_id': [(6, 0, [])],
|
||||
|
|
@ -54,7 +54,6 @@ class TestItEdiDDT(TestItEdi):
|
|||
'list_price': 90.0,
|
||||
'type': 'service',
|
||||
'uom_id': uom_hour.id,
|
||||
'uom_po_id': uom_hour.id,
|
||||
'description': 'Example of product to invoice on order',
|
||||
'default_code': 'PRE-PAID',
|
||||
'invoice_policy': 'order',
|
||||
|
|
@ -68,7 +67,6 @@ class TestItEdiDDT(TestItEdi):
|
|||
'type': 'consu',
|
||||
'weight': 0.01,
|
||||
'uom_id': uom_unit.id,
|
||||
'uom_po_id': uom_unit.id,
|
||||
'default_code': 'FURN_9999',
|
||||
'invoice_policy': 'order',
|
||||
'expense_policy': 'no',
|
||||
|
|
@ -82,7 +80,6 @@ class TestItEdiDDT(TestItEdi):
|
|||
'type': 'consu',
|
||||
'weight': 0.01,
|
||||
'uom_id': uom_unit.id,
|
||||
'uom_po_id': uom_unit.id,
|
||||
'default_code': 'FURN_7777',
|
||||
'invoice_policy': 'delivery',
|
||||
'expense_policy': 'no',
|
||||
|
|
@ -91,17 +88,11 @@ class TestItEdiDDT(TestItEdi):
|
|||
}
|
||||
])
|
||||
|
||||
@classmethod
|
||||
def setup_company_data(cls, company_name, **kwargs):
|
||||
return super().setup_company_data(company_name, **{
|
||||
**kwargs,
|
||||
'country_id': cls.env.ref('base.it').id,
|
||||
})
|
||||
|
||||
def test_deferred_invoice(self):
|
||||
""" Create a sale order with multiple DDTs, and create an invoice with a later date.
|
||||
The export has to have the TipoDocumento TD24 for Deferred Invoice.
|
||||
"""
|
||||
self.env.user.group_ids |= self.env.ref("sales_team.group_sale_salesman")
|
||||
# Create sale order
|
||||
with freeze_time('2020-02-02 18:00'):
|
||||
self.sale_order = self.env['sale.order'].with_company(self.company).create({
|
||||
|
|
@ -113,18 +104,18 @@ class TestItEdiDDT(TestItEdi):
|
|||
'name': product.name,
|
||||
'product_id': product.id,
|
||||
'product_uom_qty': 5,
|
||||
'product_uom': product.uom_id.id,
|
||||
'price_unit': product.list_price,
|
||||
'tax_id': self.tax_22
|
||||
'tax_ids': self.tax_22
|
||||
}) for product in self.products
|
||||
],
|
||||
'pricelist_id': self.default_pricelist.id,
|
||||
'picking_policy': 'direct',
|
||||
'name': 'SO-ITDDT0001',
|
||||
})
|
||||
self.sale_order.action_confirm()
|
||||
|
||||
# Create two pickings, so 2 DDTs
|
||||
for dummy in range(2):
|
||||
for _i in range(2):
|
||||
self._create_delivery(self.sale_order, 1)
|
||||
|
||||
# Create one invoice
|
||||
|
|
@ -133,16 +124,16 @@ class TestItEdiDDT(TestItEdi):
|
|||
deferred_invoice.action_post()
|
||||
|
||||
# Check the XML output of the invoice
|
||||
invoice_xml = self.edi_format._l10n_it_edi_export_invoice_as_xml(deferred_invoice)
|
||||
invoice_xml = deferred_invoice._l10n_it_edi_render_xml()
|
||||
expected_xml = self._get_stock_ddt_test_file_content("deferred_invoice.xml")
|
||||
result = self._cleanup_etree(invoice_xml, {"//DatiGeneraliDocumento/Numero": "<Numero/>",})
|
||||
expected = self._cleanup_etree(expected_xml, {"//DatiGeneraliDocumento/Numero": "<Numero/>",})
|
||||
result = etree.fromstring(invoice_xml)
|
||||
expected = etree.fromstring(expected_xml)
|
||||
self.assertXmlTreeEqual(result, expected)
|
||||
|
||||
def _create_delivery(self, sale_order, qty=1):
|
||||
""" Create a picking of a limited quantity and create a backorder """
|
||||
pickings = sale_order.picking_ids.filtered(lambda picking: picking.state != 'done')
|
||||
pickings.move_ids.write({'quantity_done': qty})
|
||||
pickings.move_ids.write({'quantity': qty})
|
||||
wizard_action = pickings.button_validate()
|
||||
context = wizard_action['context']
|
||||
wizard = Form(self.env['stock.backorder.confirmation'].with_context(context))
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="get_linked_ddts" type="object" class="oe_stat_button" icon="fa-calendar" attrs="{'invisible':[('l10n_it_ddt_count','=', 0)]}">
|
||||
<button name="get_linked_ddts" type="object" class="oe_stat_button" icon="fa-calendar" invisible="l10n_it_ddt_count == 0">
|
||||
<field name="l10n_it_ddt_count" widget="statinfo" string="DDTs"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
|
|
|||
|
|
@ -6,17 +6,16 @@
|
|||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='do_print_picking']" position="after">
|
||||
<field name="country_code" invisible="1"/>
|
||||
<field name="l10n_it_show_print_ddt_button" invisible="1"/>
|
||||
<button name="%(l10n_it_stock_ddt.action_report_ddt)d" type="action" string="Print"
|
||||
attrs="{'invisible': [('l10n_it_show_print_ddt_button', '=', False)]}"
|
||||
invisible="not l10n_it_show_print_ddt_button"
|
||||
groups="base.group_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='%(stock.action_report_delivery)d']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|', ('l10n_it_show_print_ddt_button', '=', True), '&', ('picking_type_code', '=', 'outgoing'), ('country_code', '=', 'IT')]}</attribute>
|
||||
<attribute name="invisible">l10n_it_show_print_ddt_button or picking_type_code == 'outgoing' and country_code == 'IT'</attribute>
|
||||
</xpath>
|
||||
<group name='carrier_data' position="after">
|
||||
<group string="DDT Information" attrs="{'invisible': ['|', ('country_code', '!=', 'IT'), ('picking_type_code', '!=', 'outgoing')]}">
|
||||
<group string="DDT Information" invisible="country_code != 'IT' or picking_type_code != 'outgoing'">
|
||||
<field name="country_code" invisible="1"/>
|
||||
<field name="l10n_it_ddt_number"/>
|
||||
<field name="l10n_it_transport_reason"/>
|
||||
|
|
@ -40,7 +39,7 @@
|
|||
</record>
|
||||
|
||||
<record id="view_picking_tree_inherit_l10n_it_ddt" model="ir.ui.view">
|
||||
<field name="name">stock.picking.tree.l10n.it.ddt</field>
|
||||
<field name="name">stock.picking.list.l10n.it.ddt</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.vpicktree"/>
|
||||
<field name="arch" type="xml">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_it_stock_ddt"
|
||||
version = "16.0.0"
|
||||
description = "l10n_it_stock_ddt - Odoo addon"
|
||||
description = "Italy - Stock DDT -
|
||||
Odoo addon
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-l10n_it_edi>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-delivery>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-stock_account>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-l10n_it_edi>=19.0.0",
|
||||
"TODO_MAP-stock_delivery>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-stock_account>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -18,7 +20,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue