Skip to content

Commit

Permalink
[IMP] l10n_it_accompanying_invoice: pre-commit execution
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech authored and odooNextev committed Aug 6, 2024
1 parent ffcf08a commit 03c57d9
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 54 deletions.
29 changes: 16 additions & 13 deletions l10n_it_accompanying_invoice/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,26 @@ ITA - Fattura accompagnatoria
: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_accompanying_invoice
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_accompanying_invoice
:alt: OCA/l10n-italy
.. |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_accompanying_invoice
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_accompanying_invoice
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=12.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

**Italiano**

Questo modulo consente di stampare una fattura accompagnatoria, per visualizzare i dati di *Informazioni di spedizione* nella fattura.
Questo modulo consente di stampare una fattura accompagnatoria, per
visualizzare i dati di *Informazioni di spedizione* nella fattura.

**English**

This module allows you to print an accompanying invoice, to view *Shipping Information* data inside the invoice.
This module allows you to print an accompanying invoice, to view
*Shipping Information* data inside the invoice.

**Table of contents**

Expand All @@ -46,34 +48,35 @@ Usage

Valorizzare i campi del foglio *Informazioni di spedizione*.

Usare l'azione *Fattura accompagnatoria* all'interno della lista di azioni *Stampa*, nella vista delle fatture.
Usare l'azione *Fattura accompagnatoria* all'interno della lista di
azioni *Stampa*, nella vista delle fatture.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_accompanying_invoice%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_accompanying_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~
-------

* Agile Business Group

Contributors
~~~~~~~~~~~~
------------

* Lorenzo Battistini <[email protected]>
* Simone Vanin <[email protected]>
- Lorenzo Battistini <[email protected]>
- Simone Vanin <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -85,6 +88,6 @@ 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 <https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_accompanying_invoice>`_ project on GitHub.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_accompanying_invoice>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 3 additions & 4 deletions l10n_it_accompanying_invoice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

{
"name": "ITA - Fattura accompagnatoria",
'summary': 'Stampa della fattura accompagnatoria',
"summary": "Stampa della fattura accompagnatoria",
"version": "12.0.1.0.0",
"category": "Accounting",
"website": "https://github.com/OCA/l10n-italy"
"/tree/12.0/l10n_it_accompanying_invoice",
"author": "Agile Business Group, "
"Odoo Community Association (OCA)",
"/tree/12.0/l10n_it_accompanying_invoice",
"author": "Agile Business Group, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
Expand Down
7 changes: 3 additions & 4 deletions l10n_it_accompanying_invoice/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@


class AccountInvoice(models.Model):

_inherit = 'account.invoice'
_inherit = "account.invoice"
# we need this to be able to call l10n_it_ddt.delivery_data
note = fields.Text('Notes', readonly=True, related="comment")
date_done = fields.Datetime(string='Shipping Date')
note = fields.Text("Notes", readonly=True, related="comment")
date_done = fields.Datetime(string="Shipping Date")
3 changes: 3 additions & 0 deletions l10n_it_accompanying_invoice/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions l10n_it_accompanying_invoice/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Lorenzo Battistini \<<[email protected]>\>
- Simone Vanin \<<[email protected]>\>
2 changes: 0 additions & 2 deletions l10n_it_accompanying_invoice/readme/CONTRIBUTORS.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
**Italiano**

Questo modulo consente di stampare una fattura accompagnatoria, per visualizzare i dati di *Informazioni di spedizione* nella fattura.
Questo modulo consente di stampare una fattura accompagnatoria, per
visualizzare i dati di *Informazioni di spedizione* nella fattura.

**English**

This module allows you to print an accompanying invoice, to view *Shipping Information* data inside the invoice.
This module allows you to print an accompanying invoice, to view
*Shipping Information* data inside the invoice.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Valorizzare i campi del foglio *Informazioni di spedizione*.

Usare l'azione *Fattura accompagnatoria* all'interno della lista di azioni *Stampa*, nella vista delle fatture.
Usare l'azione *Fattura accompagnatoria* all'interno della lista di
azioni *Stampa*, nella vista delle fatture.
16 changes: 9 additions & 7 deletions l10n_it_accompanying_invoice/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -369,11 +368,13 @@ <h1 class="title">ITA - Fattura accompagnatoria</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47e2b4ae93928006b62502df808ccab3b5f961ed66ec2be01da41807a4c16011
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_accompanying_invoice"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_accompanying_invoice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=12.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_accompanying_invoice"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_accompanying_invoice"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><strong>Italiano</strong></p>
<p>Questo modulo consente di stampare una fattura accompagnatoria, per visualizzare i dati di <em>Informazioni di spedizione</em> nella fattura.</p>
<p>Questo modulo consente di stampare una fattura accompagnatoria, per
visualizzare i dati di <em>Informazioni di spedizione</em> nella fattura.</p>
<p><strong>English</strong></p>
<p>This module allows you to print an accompanying invoice, to view <em>Shipping Information</em> data inside the invoice.</p>
<p>This module allows you to print an accompanying invoice, to view
<em>Shipping Information</em> data inside the invoice.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -390,14 +391,15 @@ <h1 class="title">ITA - Fattura accompagnatoria</h1>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>Valorizzare i campi del foglio <em>Informazioni di spedizione</em>.</p>
<p>Usare l’azione <em>Fattura accompagnatoria</em> all’interno della lista di azioni <em>Stampa</em>, nella vista delle fatture.</p>
<p>Usare l’azione <em>Fattura accompagnatoria</em> all’interno della lista di
azioni <em>Stampa</em>, nella vista delle fatture.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_accompanying_invoice%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_accompanying_invoice%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -422,7 +424,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_accompanying_invoice">OCA/l10n-italy</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_accompanying_invoice">OCA/l10n-italy</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions l10n_it_accompanying_invoice/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@

class TestReport(odoo.tests.TransactionCase):
def test_report(self):
report = self.env['ir.actions.report']._get_report_from_name(
'l10n_it_accompanying_invoice.accompanying_invoice_template'
report = self.env["ir.actions.report"]._get_report_from_name(
"l10n_it_accompanying_invoice.accompanying_invoice_template"
)

partner1 = self.env.ref('base.res_partner_1')
invoice = self.env['account.invoice'].create({
'partner_id': partner1.id
})
partner1 = self.env.ref("base.res_partner_1")
invoice = self.env["account.invoice"].create({"partner_id": partner1.id})

html = report.render_qweb_html([invoice.id])

Expand Down
8 changes: 4 additions & 4 deletions l10n_it_accompanying_invoice/views/account.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 Simone Vanin - Agile Business Group
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<odoo>
<record id="invoice_form_view_uom" model="ir.ui.view">
<field name="name">account.invoice.form.ddt.uom</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="l10n_it_ddt.invoice_form_view_ddt"/>
<field name="inherit_id" ref="l10n_it_ddt.invoice_form_view_ddt" />
<field name="arch" type="xml">
<xpath expr="//field[@name='weight']/ancestor::group" position="inside">
<field name="date_done"/>
<field name="date_done" />
</xpath>
</field>
</record>
Expand Down
25 changes: 14 additions & 11 deletions l10n_it_accompanying_invoice/views/report_invoice.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>

<report
id="accompanying_invoice_report"
model="account.invoice"
string="Accompanying Invoice"
report_type="qweb-pdf"
name="l10n_it_accompanying_invoice.accompanying_invoice_template"
file="l10n_it_accompanying_invoice.accompanying_invoice_template"
/>
id="accompanying_invoice_report"
model="account.invoice"
string="Accompanying Invoice"
report_type="qweb-pdf"
name="l10n_it_accompanying_invoice.accompanying_invoice_template"
file="l10n_it_accompanying_invoice.accompanying_invoice_template"
/>

<template id="accompanying_invoice_template">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="account.report_invoice_document" t-lang="o.partner_id.lang">
<t t-set="print_ddt_data" t-value="True"/>
<t t-set="print_ddt_data" t-value="True" />
</t>
</t>
</t>
</template>
<template id="report_accompanying_invoice" inherit_id="account.report_invoice_document">
<template
id="report_accompanying_invoice"
inherit_id="account.report_invoice_document"
>
<xpath expr="//p[@t-if='o.fiscal_position_id.note']" position="after">
<p t-if="print_ddt_data">
<t t-call="l10n_it_ddt.delivery_data">
<t t-set="ddt" t-value="o"/>
<t t-set="ddt" t-value="o" />
</t>
</p>
</xpath>
Expand Down
6 changes: 6 additions & 0 deletions setup/l10n_it_accompanying_invoice/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 03c57d9

Please sign in to comment.