Skip to content

Commit

Permalink
[MIG] l10n_it_delivery_note_order_link: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borruso committed Apr 23, 2021
1 parent b68d2d0 commit eb61727
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 46 deletions.
28 changes: 13 additions & 15 deletions l10n_it_delivery_note_order_link/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=================================================================
ITA - Documento di trasporto - Collegamento con ordine di vendita
=================================================================
==========================================================================
ITA - Documento di trasporto - Collegamento con ordine di vendita/acquisto
==========================================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand All @@ -14,25 +14,24 @@ ITA - Documento di trasporto - Collegamento con ordine di vendita
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note_order_link
:target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_delivery_note_order_link
: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_delivery_note_order_link
:target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_delivery_note_order_link
: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|

**English**

This module link delivery notes to purchase orders.
This module link delivery notes to sale/purchase orders.

**Italiano**

Questo modulo consente di collegare gli ordini di acquisto ai DDT.

Questo modulo consente di collegare gli ordini di vendita/acquisto ai DDT.

**Table of contents**

Expand All @@ -50,26 +49,24 @@ No configuration required after module installation.

Dopo l'installazione del modulo non sono necessarie ulteriori configurazioni.


Usage
=====

**English**

A smart button will appear on each purchase order, so you can link them to DNs.
A smart button will appear on each sale/purchase order, so you can link them to DNs.

**Italiano**

Su ciascun ordine di acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.

Su ciascun ordine di vendita/acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.

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_delivery_note_order_link%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_delivery_note_order_link%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 All @@ -85,6 +82,7 @@ Contributors
~~~~~~~~~~~~

* Andrea Piovesana <andrea.m.piovesana@gmail.com>
* Giuseppe Borruso - Dinamiche Aziendali srl <gborruso@dinamicheaziendali.com>

Maintainers
~~~~~~~~~~~
Expand All @@ -110,6 +108,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-As400it| |maintainer-andreampiovesana|

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note_order_link>`_ project on GitHub.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_delivery_note_order_link>`_ project on GitHub.

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

# noinspection PyStatementEffect
{
"name": "ITA - Documento di trasporto - Collegamento con ordine di vendita",
"summary": "Crea collegamento tra i DDT e ordine di vendita",
"name": "ITA - Documento di trasporto - Collegamento con ordine di "
"vendita/acquisto",
"summary": "Crea collegamento tra i DDT e ordine di vendita/acquisto",
"author": "Openindustry.it Sas, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy" "l10n_it_delivery_note_order_link",
"version": "12.0.1.0.0",
"website": "https://github.com/OCA/l10n-italy",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"maintainers": ["As400it", "andreampiovesana"],
"category": "Localization",
"maintainers": ["andreampiovesana"],
"category": "Localization/Italy",
"depends": [
"purchase_stock",
"sale_stock",
Expand Down
8 changes: 3 additions & 5 deletions l10n_it_delivery_note_order_link/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2019, Link IT Europe Srl
# @author: Matteo Bilotta <mbilotta@linkeurope.it>

from odoo import api, fields, models
from odoo import fields, models


class PurchaseOrder(models.Model):
Expand All @@ -12,7 +12,6 @@ class PurchaseOrder(models.Model):
)
delivery_note_count = fields.Integer(compute="_compute_delivery_notes")

@api.multi
def _compute_delivery_notes(self):
for order in self:
delivery_notes = order.order_line.mapped(
Expand All @@ -22,11 +21,10 @@ def _compute_delivery_notes(self):
order.delivery_note_ids = delivery_notes
order.delivery_note_count = len(delivery_notes)

@api.multi
def goto_delivery_notes(self, **kwargs):
delivery_notes = self.mapped("delivery_note_ids")
action = self.env.ref(
"l10n_it_delivery_note.stock_delivery_note_action"
"l10n_it_delivery_note." "stock_delivery_note_action"
).read()[0]
action.update(kwargs)

Expand All @@ -37,7 +35,7 @@ def goto_delivery_notes(self, **kwargs):
action["views"] = [
(
self.env.ref(
"l10n_it_delivery_note.stock_delivery_note_form_view"
"l10n_it_delivery_note." "stock_delivery_note_form_view"
).id,
"form",
)
Expand Down
3 changes: 1 addition & 2 deletions l10n_it_delivery_note_order_link/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2019, Openindustry.it Sas
# @author: Andrea Piovesana <andrea.m.piovesana@gmail.com>

from odoo import api, fields, models
from odoo import fields, models


class SaleOrder(models.Model):
Expand All @@ -12,7 +12,6 @@ class SaleOrder(models.Model):
)
delivery_note_count = fields.Integer(compute="_compute_delivery_notes")

@api.multi
def _compute_delivery_notes(self):
for order in self:
delivery_notes = order.order_line.mapped(
Expand Down
1 change: 1 addition & 0 deletions l10n_it_delivery_note_order_link/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Andrea Piovesana <andrea.m.piovesana@gmail.com>
* Giuseppe Borruso - Dinamiche Aziendali srl <gborruso@dinamicheaziendali.com>
4 changes: 2 additions & 2 deletions l10n_it_delivery_note_order_link/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**English**

This module link delivery notes to purchase orders.
This module link delivery notes to sale/purchase orders.

**Italiano**

Questo modulo consente di collegare gli ordini di acquisto ai DDT.
Questo modulo consente di collegare gli ordini di vendita/acquisto ai DDT.
4 changes: 2 additions & 2 deletions l10n_it_delivery_note_order_link/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**English**

A smart button will appear on each purchase order, so you can link them to DNs.
A smart button will appear on each sale/purchase order, so you can link them to DNs.

**Italiano**

Su ciascun ordine di acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.
Su ciascun ordine di vendita/acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.
23 changes: 12 additions & 11 deletions l10n_it_delivery_note_order_link/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<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/" />
<title>ITA - Documento di trasporto - Collegamento con ordine di vendita</title>
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>ITA - Documento di trasporto - Collegamento con ordine di vendita/acquisto</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,18 +360,18 @@
</style>
</head>
<body>
<div class="document" id="ita-documento-di-trasporto-collegamento-con-ordine-di-vendita">
<h1 class="title">ITA - Documento di trasporto - Collegamento con ordine di vendita</h1>
<div class="document" id="ita-documento-di-trasporto-collegamento-con-ordine-di-vendita-acquisto">
<h1 class="title">ITA - Documento di trasporto - Collegamento con ordine di vendita/acquisto</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_delivery_note_order_link"><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_delivery_note_order_link"><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_delivery_note_order_link"><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_delivery_note_order_link"><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>English</strong></p>
<p>This module link delivery notes to purchase orders.</p>
<p>This module link delivery notes to sale/purchase orders.</p>
<p><strong>Italiano</strong></p>
<p>Questo modulo consente di collegare gli ordini di acquisto ai DDT.</p>
<p>Questo modulo consente di collegare gli ordini di vendita/acquisto ai DDT.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -396,16 +396,16 @@ <h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p><strong>English</strong></p>
<p>A smart button will appear on each purchase order, so you can link them to DNs.</p>
<p>A smart button will appear on each sale/purchase order, so you can link them to DNs.</p>
<p><strong>Italiano</strong></p>
<p>Su ciascun ordine di acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.</p>
<p>Su ciascun ordine di vendita/acquisto comparirà un pulsante (smart button) che permette di collegarlo ai DDT.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">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_delivery_note_order_link%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_delivery_note_order_link%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 @@ -420,6 +420,7 @@ <h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<ul class="simple">
<li>Andrea Piovesana &lt;<a class="reference external" href="mailto:andrea.m.piovesana&#64;gmail.com">andrea.m.piovesana&#64;gmail.com</a>&gt;</li>
<li>Giuseppe Borruso - Dinamiche Aziendali srl &lt;<a class="reference external" href="mailto:gborruso&#64;dinamicheaziendali.com">gborruso&#64;dinamicheaziendali.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -431,7 +432,7 @@ <h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https://github.com/As400it"><img alt="As400it" src="https://github.com/As400it.png?size=40px" /></a> <a class="reference external" href="https://github.com/andreampiovesana"><img alt="andreampiovesana" src="https://github.com/andreampiovesana.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note_order_link">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_delivery_note_order_link">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
8 changes: 6 additions & 2 deletions l10n_it_delivery_note_order_link/views/purchase_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
<record id="purchase_order_form_view_delivery_note" model="ir.ui.view">
<field name="name">purchase.order.form</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form" />
<field
name="inherit_id"
ref="purchase_stock.purchase_order_view_form_inherit"
/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
<field name="delivery_note_ids" invisible="1" />
<button
type="object"
class="oe_stat_button"
Expand Down
3 changes: 2 additions & 1 deletion l10n_it_delivery_note_order_link/views/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_stock.view_order_form_inherit_sale_stock" />
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<xpath expr="//button[@name='action_view_delivery']" position="after">
<field name="delivery_note_ids" invisible="1" />
<button
type="object"
class="oe_stat_button"
Expand Down

0 comments on commit eb61727

Please sign in to comment.