[MIG] mrp_sale_info: Migration to 16.0

This commit is contained in:
Oihane Crucelaegui
2023-01-09 09:28:49 +01:00
parent 37c5cb192a
commit f239728cc5
2 changed files with 4 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
{
"name": "MRP Sale Info",
"summary": "Adds sale information to Manufacturing models",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/OCA/manufacture",
"author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)",

View File

@@ -1,6 +1,5 @@
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
@@ -66,7 +65,9 @@ class TestMrpSaleInfo(common.TransactionCase):
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
workorder = (
self.env["mrp.production"].search([]).workorder_ids - 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)