From ecf169639638a4d926af597f427631ce63f1c926 Mon Sep 17 00:00:00 2001
From: clementmbr
Date: Fri, 19 Feb 2021 09:38:16 -0300
Subject: [PATCH] [MIG] mrp_subcontracting_purchase_link: Migration from 12.0
to 14.0
---
mrp_subcontracting_purchase_link/README.rst | 10 +++----
.../__manifest__.py | 2 +-
.../i18n/mrp_subcontracting_purchase_link.pot | 28 ++++++++++++++++---
.../models/purchase_order.py | 4 +--
.../static/description/index.html | 6 ++--
.../views/mrp_production_views.xml | 4 +--
6 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/mrp_subcontracting_purchase_link/README.rst b/mrp_subcontracting_purchase_link/README.rst
index 22c5ff1fa..dadafe2cb 100644
--- a/mrp_subcontracting_purchase_link/README.rst
+++ b/mrp_subcontracting_purchase_link/README.rst
@@ -14,13 +14,13 @@ Link Purchase Order to Subcontract Productions
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
- :target: https://github.com/OCA/manufacture/tree/12.0/mrp_subcontracting_purchase_link
+ :target: https://github.com/OCA/manufacture/tree/14.0/mrp_subcontracting_purchase_link
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_subcontracting_purchase_link
+ :target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_subcontracting_purchase_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/129/12.0
+ :target: https://runbot.odoo-community.org/runbot/129/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -41,7 +41,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -74,6 +74,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/manufacture `_ project on GitHub.
+This module is part of the `OCA/manufacture `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/mrp_subcontracting_purchase_link/__manifest__.py b/mrp_subcontracting_purchase_link/__manifest__.py
index b3eb1817b..ee03e5ed9 100644
--- a/mrp_subcontracting_purchase_link/__manifest__.py
+++ b/mrp_subcontracting_purchase_link/__manifest__.py
@@ -2,7 +2,7 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Link Purchase Order to Subcontract Productions",
- "version": "12.0.1.0.0",
+ "version": "14.0.1.0.0",
"category": "Manufacturing",
"license": "LGPL-3",
"author": "Quartile Limited, Odoo Community Association (OCA)",
diff --git a/mrp_subcontracting_purchase_link/i18n/mrp_subcontracting_purchase_link.pot b/mrp_subcontracting_purchase_link/i18n/mrp_subcontracting_purchase_link.pot
index ffcf6a32d..0c6de9cd6 100644
--- a/mrp_subcontracting_purchase_link/i18n/mrp_subcontracting_purchase_link.pot
+++ b/mrp_subcontracting_purchase_link/i18n/mrp_subcontracting_purchase_link.pot
@@ -1,18 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * mrp_subcontracting_purchase_link
+# * mrp_subcontracting_purchase_link
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\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: mrp_subcontracting_purchase_link
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_mrp_production__display_name
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_purchase_order__display_name
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_stock_picking__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: mrp_subcontracting_purchase_link
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_mrp_production__id
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_purchase_order__id
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_stock_picking__id
+msgid "ID"
+msgstr ""
+
+#. module: mrp_subcontracting_purchase_link
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_mrp_production____last_update
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_purchase_order____last_update
+#: model:ir.model.fields,field_description:mrp_subcontracting_purchase_link.field_stock_picking____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: mrp_subcontracting_purchase_link
#: model:ir.model,name:mrp_subcontracting_purchase_link.model_mrp_production
msgid "Production Order"
@@ -47,4 +68,3 @@ msgstr ""
#: model:ir.model,name:mrp_subcontracting_purchase_link.model_stock_picking
msgid "Transfer"
msgstr ""
-
diff --git a/mrp_subcontracting_purchase_link/models/purchase_order.py b/mrp_subcontracting_purchase_link/models/purchase_order.py
index 1d07e2d8d..e7e9e4e81 100644
--- a/mrp_subcontracting_purchase_link/models/purchase_order.py
+++ b/mrp_subcontracting_purchase_link/models/purchase_order.py
@@ -1,7 +1,7 @@
# Copyright 2020 Quartile Limited
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
-from odoo import api, fields, models
+from odoo import fields, models
class PurchaseOrder(models.Model):
@@ -17,7 +17,6 @@ class PurchaseOrder(models.Model):
compute="_compute_subcontract_production_count"
)
- @api.multi
def action_view_mrp(self):
productions = self.subcontract_production_ids
action = self.env.ref("mrp.mrp_production_action").read()[0]
@@ -32,7 +31,6 @@ class PurchaseOrder(models.Model):
action = {"type": "ir.actions.act_window_close"}
return action
- @api.multi
def _compute_subcontract_production_count(self):
for order in self:
order.subcontract_production_count = len(order.subcontract_production_ids)
diff --git a/mrp_subcontracting_purchase_link/static/description/index.html b/mrp_subcontracting_purchase_link/static/description/index.html
index b1e6c42b4..9c24ef7a4 100644
--- a/mrp_subcontracting_purchase_link/static/description/index.html
+++ b/mrp_subcontracting_purchase_link/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module does the following:
- Extends _prepare_subcontract_mo_vals() and adds the purchase order reference to the subcontracted manufacturing orders.
@@ -390,7 +390,7 @@ ul.auto-toc {
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -418,7 +418,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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/manufacture project on GitHub.
+
This module is part of the OCA/manufacture project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/mrp_subcontracting_purchase_link/views/mrp_production_views.xml b/mrp_subcontracting_purchase_link/views/mrp_production_views.xml
index 6edf033e0..4e4761a3a 100644
--- a/mrp_subcontracting_purchase_link/views/mrp_production_views.xml
+++ b/mrp_subcontracting_purchase_link/views/mrp_production_views.xml
@@ -5,9 +5,9 @@
mrp.production
-
+
-
+