Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

14.0 mig l10n it fatturapa in purchase #2229

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dc7aead
l10n_it_ipa ADD is_pa bool field
eLBati Sep 10, 2018
e56a4ee
IMP decimal precision
eLBati Oct 8, 2018
b80b400
[UPD] Update l10n_it_fatturapa_in_purchase.pot
oca-travis Oct 11, 2018
e97b79f
Translated using Weblate (Italian)
primes2h Oct 15, 2018
7957fba
[IMP] l10n_it_fatturapa_in_purchase revamp manifest and README
primes2h Dec 1, 2018
848d710
[UPD] Update l10n_it_fatturapa_in_purchase.pot
oca-travis Dec 4, 2018
2363e3d
[IMP] fatturapa modules, set ITA name and summary (#694)
primes2h Dec 4, 2018
98b06da
[FIX] fatturapa titles using italian guidelines (#708)
primes2h Dec 12, 2018
2ab19f3
[ADD] icon.png
OCA-git-bot Apr 3, 2019
1795ca1
FIX l10n_it_fatturapa_in_purchase: allow to set PO line in invoice line
eLBati Jun 27, 2019
30024bd
[UPD] Update l10n_it_fatturapa_in_purchase.pot
oca-travis Jul 18, 2019
bab1f78
[MIG] l10n_it_fatturapa_in_purchase: Migration to 12.0
SimoRubi Aug 30, 2019
aa08d84
[IMP] l10n_it_fatturapa_in_purchase: Compute to_invoice according to …
SimoRubi Aug 30, 2019
93f0c9e
Update translation files
oca-travis Sep 30, 2019
7bdfba6
Translated using Weblate (Italian)
primes2h Jan 8, 2020
e1d3d2c
merge PR 1264 1717 1728 1737 1739
May 13, 2020
f504300
FIX license compatibility
eLBati Sep 10, 2020
7ac4b95
[UPD] README.rst
OCA-git-bot Sep 14, 2020
17608b5
l10n_it_fatturapa_in_purchase 12.0.1.0.2
OCA-git-bot Sep 14, 2020
d4b4ec1
[IMP] l10n_it_fatturapa_in_purchase: black, isort, prettier
fredzamoabg Apr 22, 2021
093e876
[MIG] l10n_it_fatturapa_in_purchase: Migration to 14.0
fredzamoabg Apr 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions l10n_it_fatturapa_in_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
=================================================
ITA - Fattura elettronica - Integrazione acquisti
=================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/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/14.0/l10n_it_fatturapa_in_purchase
: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-14-0/l10n-italy-14-0-l10n_it_fatturapa_in_purchase
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/122/14.0
:alt: Try me on Runbot

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

**Italiano**

Integra gli ordini di acquisto con le fatture elettroniche fornitore.

Con questo modulo è possibile collegare una fattura elettronica fornitore a un ordine di acquisto esistente.

In questo modo si tiene traccia della fatturazione o meno dell'ordine.

**English**

Integrate purchase orders with supplier electronic bills.

With this module you can link a supplier electronic bill to an existing purchase order.

In this way, you track whether the order is invoiced or not.

**Table of contents**

.. contents::
:local:

Usage
=====

**Italiano**

Nelle fatture elettroniche fornitore in bozza, aprire la riga da collegare a una riga dell'ordine di acquisto e compilare il campo "Riga ordine di acquisto".

**English**

In draft supplier electronic bills, open the line to be linked to a purchase order line and fill in the 'Purchase order line' field.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa_in_purchase%0Aversion:%2014.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
* Sergio Zanchetta <https://github.com/primes2h>

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 <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_fatturapa_in_purchase>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions l10n_it_fatturapa_in_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions l10n_it_fatturapa_in_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2018 Lorenzo Battistini
# Copyright 2018 Sergio Zanchetta (Associazione PNLUG - Gruppo Odoo)
# Copyright 2019 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


{
"name": "ITA - Fattura elettronica - Integrazione acquisti",
"summary": "Modulo ponte tra ricezione fatture elettroniche e acquisti",
"version": "14.0.1.0.0",
"category": "Hidden",
"author": "Agile Business Group, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"l10n_it_fatturapa_in",
"purchase",
],
"data": [
"views/invoice_view.xml",
],
"installable": True,
"auto_install": True,
}
39 changes: 39 additions & 0 deletions l10n_it_fatturapa_in_purchase/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_in_purchase
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:55+0000\n"
"PO-Revision-Date: 2020-01-08 12:13+0000\n"
"Last-Translator: Sergio Zanchetta <[email protected]>\n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: l10n_it_fatturapa_in_purchase
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in_purchase.invoice_supplier_form_po_line
msgid "PO line"
msgstr "Riga OA"

#. module: l10n_it_fatturapa_in_purchase
#: model:ir.model,name:l10n_it_fatturapa_in_purchase.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Riga ordine di acquisto"

#. module: l10n_it_fatturapa_in_purchase
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in_purchase.field_purchase_order_line__to_invoice
msgid "To Invoice"
msgstr "Da fatturare"

#~ msgid "E-Invoice Import File"
#~ msgstr "File importazione fattura elettronica"

#~ msgid "Invoice Line"
#~ msgstr "Riga Fattura"
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_fatturapa_in_purchase
#
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_fatturapa_in_purchase
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in_purchase.invoice_supplier_form_po_line
msgid "PO line"
msgstr ""

#. module: l10n_it_fatturapa_in_purchase
#: model:ir.model,name:l10n_it_fatturapa_in_purchase.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""

#. module: l10n_it_fatturapa_in_purchase
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in_purchase.field_purchase_order_line__to_invoice
msgid "To Invoice"
msgstr ""

1 change: 1 addition & 0 deletions l10n_it_fatturapa_in_purchase/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_order
31 changes: 31 additions & 0 deletions l10n_it_fatturapa_in_purchase/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2018 Lorenzo Battistini
# Copyright 2018 Sergio Zanchetta (Associazione PNLUG - Gruppo Odoo)
# Copyright 2019 Simone Rubino - Agile Business Group

from odoo import fields, models
from odoo.tools import float_compare


class POLine(models.Model):
_inherit = "purchase.order.line"
to_invoice = fields.Boolean(
"To Invoice", compute="_compute_qty_invoiced", store=True
)

def _compute_qty_invoiced(self):
super()._compute_qty_invoiced()
precision = self.env["decimal.precision"].precision_get(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qui sotto puoi usare line.qty_to_invoice invece di ricalcolarlo?
Oppure puoi includere il calcolo del nuovo campo to_invoice dentro il metodo _compute_qty_invoiced che calcola entrambe le quantità che ti servono.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modifica fatta

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

"Product Unit of Measure"
)
for line in self:
if float_compare(line.qty_to_invoice, 0.0, precision_digits=precision) == 1:
line.to_invoice = True
else:
line.to_invoice = False

def name_get(self):
res = []
for line in self:
name = "{}: {}".format(line.order_id.name, line.name)
res.append((line.id, name))
return res
2 changes: 2 additions & 0 deletions l10n_it_fatturapa_in_purchase/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Lorenzo Battistini
* Sergio Zanchetta <https://github.com/primes2h>
15 changes: 15 additions & 0 deletions l10n_it_fatturapa_in_purchase/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**Italiano**

Integra gli ordini di acquisto con le fatture elettroniche fornitore.

Con questo modulo è possibile collegare una fattura elettronica fornitore a un ordine di acquisto esistente.

In questo modo si tiene traccia della fatturazione o meno dell'ordine.

**English**

Integrate purchase orders with supplier electronic bills.

With this module you can link a supplier electronic bill to an existing purchase order.

In this way, you track whether the order is invoiced or not.
7 changes: 7 additions & 0 deletions l10n_it_fatturapa_in_purchase/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Italiano**

Nelle fatture elettroniche fornitore in bozza, aprire la riga da collegare a una riga dell'ordine di acquisto e compilare il campo "Riga ordine di acquisto".

**English**

In draft supplier electronic bills, open the line to be linked to a purchase order line and fill in the 'Purchase order line' field.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading