From c0cf71d1a8bf2957ed96bc6c33c48b6a72b3cd8d Mon Sep 17 00:00:00 2001
From: hveficent
Date: Mon, 23 Dec 2019 10:17:46 +0100
Subject: [PATCH] [MIG] purchase_reception_notify: Migration to 13.0
---
purchase_reception_notify/README.rst | 16 ++++++++--------
purchase_reception_notify/__manifest__.py | 6 +++---
purchase_reception_notify/data/mail.xml | 8 +++-----
purchase_reception_notify/hooks.py | 2 +-
.../i18n/purchase_reception_notify.pot | 13 ++++++-------
.../models/stock_picking.py | 3 +--
.../readme/CONTRIBUTORS.rst | 4 ++--
.../static/description/index.html | 12 ++++++------
.../tests/test_purchase_reception_notify.py | 6 +++---
9 files changed, 33 insertions(+), 37 deletions(-)
diff --git a/purchase_reception_notify/README.rst b/purchase_reception_notify/README.rst
index 3dc3c8e3e59..71b55024c21 100644
--- a/purchase_reception_notify/README.rst
+++ b/purchase_reception_notify/README.rst
@@ -14,13 +14,13 @@ Purchase Reception Notify
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
- :target: https://github.com/OCA/purchase-workflow/tree/12.0/purchase_reception_notify
+ :target: https://github.com/OCA/purchase-workflow/tree/13.0/purchase_reception_notify
:alt: OCA/purchase-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/purchase-workflow-12-0/purchase-workflow-12-0-purchase_reception_notify
+ :target: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-purchase_reception_notify
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/142/12.0
+ :target: https://runbot.odoo-community.org/runbot/142/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +49,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.
@@ -59,13 +59,13 @@ Credits
Authors
~~~~~~~
-* Eficent
+* ForgeFlow
Contributors
~~~~~~~~~~~~
-* Aaron Henriquez
-* Jordi Ballester
+* Aaron Henriquez
+* Jordi Ballester
Maintainers
~~~~~~~~~~~
@@ -80,6 +80,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/purchase-workflow `_ project on GitHub.
+This module is part of the `OCA/purchase-workflow `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/purchase_reception_notify/__manifest__.py b/purchase_reception_notify/__manifest__.py
index 92854b18d87..79e27db9d0c 100644
--- a/purchase_reception_notify/__manifest__.py
+++ b/purchase_reception_notify/__manifest__.py
@@ -1,11 +1,11 @@
-# Copyright 2019 Eficent Business and IT Consulting Services S.L.
+# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
{
"name": "Purchase Reception Notify",
- "version": "12.0.1.0.0",
+ "version": "13.0.1.0.0",
"category": "Purchase Management",
- "author": "Eficent, " "Odoo Community Association (OCA)",
+ "author": "ForgeFlow, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
"license": "AGPL-3",
"depends": ["purchase_stock"],
diff --git a/purchase_reception_notify/data/mail.xml b/purchase_reception_notify/data/mail.xml
index 62f80d04eaa..8c287cc1974 100644
--- a/purchase_reception_notify/data/mail.xml
+++ b/purchase_reception_notify/data/mail.xml
@@ -1,11 +1,9 @@
-
+
-
Purchase Receptions
purchase.order
-
-
+
+
-
diff --git a/purchase_reception_notify/hooks.py b/purchase_reception_notify/hooks.py
index d0c9a453076..d0019a93d45 100644
--- a/purchase_reception_notify/hooks.py
+++ b/purchase_reception_notify/hooks.py
@@ -1,4 +1,4 @@
-# Copyright 2019 Eficent Business and IT Consulting Services S.L.
+# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
diff --git a/purchase_reception_notify/i18n/purchase_reception_notify.pot b/purchase_reception_notify/i18n/purchase_reception_notify.pot
index e35401ccf63..5894207f52e 100644
--- a/purchase_reception_notify/i18n/purchase_reception_notify.pot
+++ b/purchase_reception_notify/i18n/purchase_reception_notify.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * purchase_reception_notify
+# * purchase_reception_notify
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.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"
@@ -14,7 +14,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: purchase_reception_notify
-#: code:addons/purchase_reception_notify/models/stock_picking.py:23
+#: code:addons/purchase_reception_notify/models/stock_picking.py:0
#, python-format
msgid "%s: Received quantity %s %s"
msgstr ""
@@ -25,13 +25,13 @@ msgid "Purchase Receptions"
msgstr ""
#. module: purchase_reception_notify
-#: code:addons/purchase_reception_notify/models/stock_picking.py:15
+#: code:addons/purchase_reception_notify/models/stock_picking.py:0
#, python-format
msgid "Receipt confirmation %s"
msgstr ""
#. module: purchase_reception_notify
-#: code:addons/purchase_reception_notify/models/stock_picking.py:18
+#: code:addons/purchase_reception_notify/models/stock_picking.py:0
#, python-format
msgid "The following items have now been received in Incoming Shipment %s:"
msgstr ""
@@ -40,4 +40,3 @@ msgstr ""
#: model:ir.model,name:purchase_reception_notify.model_stock_picking
msgid "Transfer"
msgstr ""
-
diff --git a/purchase_reception_notify/models/stock_picking.py b/purchase_reception_notify/models/stock_picking.py
index cc28ac48127..5cddcaed97e 100644
--- a/purchase_reception_notify/models/stock_picking.py
+++ b/purchase_reception_notify/models/stock_picking.py
@@ -1,4 +1,4 @@
-# Copyright 2018 Eficent Business and IT Consulting Services S.L.
+# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
from odoo import _, api, models
@@ -26,7 +26,6 @@ def _purchase_order_picking_confirm_message_content(self, picking, purchase_dict
message += ""
return message
- @api.multi
def action_done(self):
super(StockPicking, self).action_done()
for picking in self.filtered(lambda p: p.picking_type_id.code == "incoming"):
diff --git a/purchase_reception_notify/readme/CONTRIBUTORS.rst b/purchase_reception_notify/readme/CONTRIBUTORS.rst
index f136c1c1aa9..123a4335ec2 100644
--- a/purchase_reception_notify/readme/CONTRIBUTORS.rst
+++ b/purchase_reception_notify/readme/CONTRIBUTORS.rst
@@ -1,2 +1,2 @@
-* Aaron Henriquez
-* Jordi Ballester
+* Aaron Henriquez
+* Jordi Ballester
diff --git a/purchase_reception_notify/static/description/index.html b/purchase_reception_notify/static/description/index.html
index e554442791a..9407992edde 100644
--- a/purchase_reception_notify/static/description/index.html
+++ b/purchase_reception_notify/static/description/index.html
@@ -367,7 +367,7 @@ Purchase Reception Notify
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module notifies to the employees following a the purchase order
when the associated products have been received into stock.
This module creates a new message subtype specifically created for those
@@ -396,7 +396,7 @@
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.
@@ -404,14 +404,14 @@
@@ -421,7 +421,7 @@
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/purchase-workflow project on GitHub.
+
This module is part of the OCA/purchase-workflow project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/purchase_reception_notify/tests/test_purchase_reception_notify.py b/purchase_reception_notify/tests/test_purchase_reception_notify.py
index 5f6c3dce2aa..a97e1e3cedb 100644
--- a/purchase_reception_notify/tests/test_purchase_reception_notify.py
+++ b/purchase_reception_notify/tests/test_purchase_reception_notify.py
@@ -1,4 +1,4 @@
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.fields import Datetime
@@ -15,13 +15,13 @@ def setUp(self):
self.product_uom_model = self.env["uom.uom"]
# partners
- pa_dict = {"name": "Partner 1", "supplier": True}
+ pa_dict = {"name": "Partner 1"}
self.partner = partner_model.sudo().create(pa_dict)
# Purchase Order Num 1
po_dict = {"partner_id": self.partner.id}
self.purchase_order = self.purchase_order_model.create(po_dict)
- uom_id = self.product_uom_model.search([("name", "=", "Unit(s)")])[0].id
+ uom_id = self.env.ref("uom.product_uom_unit").id
pr_dict = {
"name": "Product Test",
"uom_id": uom_id,