[15.0][MIG] mrp_sale_info: Migration to 15.0

This commit is contained in:
Edwin Blommaerts
2022-05-09 15:28:19 +01:00
committed by Frédéric GRALL
parent a967a880f9
commit ede0e02e0b
4 changed files with 29 additions and 8 deletions

View File

@@ -14,13 +14,13 @@ MRP Sale Info
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture/tree/14.0/mrp_sale_info
:target: https://github.com/OCA/manufacture/tree/15.0/mrp_sale_info
:alt: OCA/manufacture
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-14-0/manufacture-14-0-mrp_sale_info
:target: https://translation.odoo-community.org/projects/manufacture-15-0/manufacture-15-0-mrp_sale_info
: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/14.0
:target: https://runbot.odoo-community.org/runbot/129/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +49,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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/manufacture/issues/new?body=module:%20mrp_sale_info%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_sale_info%0Aversion:%2015.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.
@@ -74,6 +74,8 @@ Contributors
* Antonio Espinosa
* Rafael Blasco
* Pedro M. Baeza
* `Glo Systems <https://glo.systems>`_:
* Edwin Blommaerts
* Rubén Bravo <rubenred18@gmail.com>
* Kevin Khao <kevin.khao@akretion.com>
* Alex Comba <alex.comba@agilebg.com>
@@ -91,6 +93,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 <https://github.com/OCA/manufacture/tree/14.0/mrp_sale_info>`_ project on GitHub.
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/15.0/mrp_sale_info>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -5,10 +5,10 @@
{
"name": "MRP Sale Info",
"summary": "Adds sale information to Manufacturing models",
"version": "14.0.1.1.0",
"version": "15.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/OCA/manufacture",
"author": "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)",
"author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,

View File

@@ -10,3 +10,4 @@
* Rubén Bravo <rubenred18@gmail.com>
* Kevin Khao <kevin.khao@akretion.com>
* Alex Comba <alex.comba@agilebg.com>
* Mantas Šniukas <mantas@vialaurea.lt>

View File

@@ -4,7 +4,7 @@
from odoo.tests import common
class TestMrpSaleInfo(common.SavepointCase):
class TestMrpSaleInfo(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
@@ -24,6 +24,16 @@ class TestMrpSaleInfo(common.SavepointCase):
cls.bom = cls.env["mrp.bom"].create(
{
"product_tmpl_id": cls.product.product_tmpl_id.id,
"operation_ids": [
(
0,
0,
{
"name": "Test operation",
"workcenter_id": cls.env.ref("mrp.mrp_workcenter_3").id,
},
)
],
}
)
cls.partner = cls.env["res.partner"].create({"name": "Test client"})
@@ -52,3 +62,11 @@ class TestMrpSaleInfo(common.SavepointCase):
self.assertEqual(production.sale_id, self.sale_order)
self.assertEqual(production.partner_id, self.partner)
self.assertEqual(production.client_order_ref, self.sale_order.client_order_ref)
def test_mrp_workorder(self):
prev_workorders = self.env["mrp.workorder"].search([])
self.sale_order.action_confirm()
workorder = self.env["mrp.workorder"].search([]) - prev_workorders
self.assertEqual(workorder.sale_id, self.sale_order)
self.assertEqual(workorder.partner_id, self.partner)
self.assertEqual(workorder.client_order_ref, self.sale_order.client_order_ref)