Skip to content

Commit

Permalink
[MIG] l10n_it_fatturapa_in_purchase: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fredzamoabg committed Apr 23, 2021
1 parent 30e564c commit 16556ff
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 31 deletions.
10 changes: 5 additions & 5 deletions l10n_it_fatturapa_in_purchase/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ ITA - Fattura elettronica - Integrazione acquisti
: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_fatturapa_in_purchase
: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-12-0/l10n-italy-12-0-l10n_it_fatturapa_in_purchase
: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/12.0
:target: https://runbot.odoo-community.org/runbot/122/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -63,7 +63,7 @@ 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:%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_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.

Expand Down Expand Up @@ -94,6 +94,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_fatturapa_in_purchase>`_ project on GitHub.
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.
4 changes: 2 additions & 2 deletions l10n_it_fatturapa_in_purchase/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
{
"name": "ITA - Fattura elettronica - Integrazione acquisti",
"summary": "Modulo ponte tra ricezione fatture elettroniche e acquisti",
"version": "12.0.1.0.2",
"version": "14.0.1.0.0",
"category": "Hidden",
"author": "Agile Business Group, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy" "l10n_it_fatturapa_in_purchase",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"depends": [
"l10n_it_fatturapa_in",
Expand Down
5 changes: 2 additions & 3 deletions l10n_it_fatturapa_in_purchase/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class POLine(models.Model):
to_invoice = fields.Boolean("To Invoice", compute="_compute_to_invoice", store=True)

@api.depends(
"invoice_lines.invoice_id.state",
"invoice_lines.move_id.state",
"product_qty",
"product_uom",
"invoice_lines.quantity",
"invoice_lines.uom_id",
"invoice_lines.product_uom_id",
)
def _compute_to_invoice(self):
precision = self.env["decimal.precision"].precision_get(
Expand All @@ -37,7 +37,6 @@ def _compute_to_invoice(self):
else:
line.to_invoice = False

@api.multi
def name_get(self):
res = []
for line in self:
Expand Down
8 changes: 4 additions & 4 deletions l10n_it_fatturapa_in_purchase/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>ITA - Fattura elettronica - Integrazione acquisti</title>
<style type="text/css">

Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">ITA - Fattura elettronica - Integrazione acquisti</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" 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" 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" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_fatturapa_in_purchase"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in_purchase"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" 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" 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" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_fatturapa_in_purchase"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_fatturapa_in_purchase"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><strong>Italiano</strong></p>
<p>Integra gli ordini di acquisto con le fatture elettroniche fornitore.</p>
<p>Con questo modulo è possibile collegare una fattura elettronica fornitore a un ordine di acquisto esistente.</p>
Expand Down Expand Up @@ -401,7 +401,7 @@ <h1><a class="toc-backref" href="#id2">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 smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa_in_purchase%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_fatturapa_in_purchase%0Aversion:%2014.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 @@ -426,7 +426,7 @@ <h2><a class="toc-backref" href="#id6">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_fatturapa_in_purchase">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/14.0/l10n_it_fatturapa_in_purchase">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
33 changes: 16 additions & 17 deletions l10n_it_fatturapa_in_purchase/views/invoice_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
Copyright 2018 Sergio Zanchetta (Associazione PNLUG - Gruppo Odoo) -->
<odoo>

<record id="view_invoice_line_form_fatturapa_po_line" model="ir.ui.view">
<field name="name">view_invoice_line_form_fatturapa_po_line</field>
<field name="model">account.invoice.line</field>
<field
name="inherit_id"
ref="l10n_it_fatturapa.view_invoice_line_form_fatturapa"
/>
<record id="view_invoice_form_fatturapa_po_line" model="ir.ui.view">
<field name="name">view_invoice_form_fatturapa_po_line</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="l10n_it_fatturapa.view_invoice_form_fatturapa" />
<field name="arch" type="xml">
<xpath expr="//div[@id='admin_ref']" position="after">
<group>
Expand All @@ -27,21 +24,23 @@
</record>
<record id="invoice_supplier_form_po_line" model="ir.ui.view">
<field name="name">invoice_supplier_form_po_line</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<field name="model">account.move</field>
<field name="inherit_id" ref="purchase.view_move_form_inherit_purchase" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']"
expr="//field[@name='invoice_line_ids']/tree/field[@name='purchase_line_id']"
position="after"
>
<field name="partner_id" invisible="1" />
<field
name="purchase_line_id"
domain="[('partner_id', '=', partner_id), ('to_invoice', '=', True)]"
readonly="0"
string="PO line"
options="{'no_create': True}"
/>
</xpath>
<xpath
expr="//field[@name='invoice_line_ids']/tree/field[@name='purchase_line_id']"
position="attributes"
>
<attribute name="invisible" />
<attribute
name="attrs"
>{'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}</attribute>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 16556ff

Please sign in to comment.