From f90f230395c526a0eec625090d446e682c01b2d2 Mon Sep 17 00:00:00 2001 From: David Ramia Date: Sun, 23 Oct 2022 18:32:55 +0200 Subject: [PATCH] [MIG] account_payment_purchase: Migration to 16.0 --- account_payment_purchase/__manifest__.py | 2 +- .../tests/test_account_payment_purchase.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/account_payment_purchase/__manifest__.py b/account_payment_purchase/__manifest__.py index a2d3a535d75..89cb4a503f8 100644 --- a/account_payment_purchase/__manifest__.py +++ b/account_payment_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Payment Purchase", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Banking addons", "license": "AGPL-3", "summary": "Adds Bank Account and Payment Mode on Purchase Orders", diff --git a/account_payment_purchase/tests/test_account_payment_purchase.py b/account_payment_purchase/tests/test_account_payment_purchase.py index 07dd5bc43f3..2fb4be17852 100644 --- a/account_payment_purchase/tests/test_account_payment_purchase.py +++ b/account_payment_purchase/tests/test_account_payment_purchase.py @@ -3,7 +3,7 @@ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import fields -from odoo.tests import Form, TransactionCase, tagged +from odoo.tests import TransactionCase, tagged @tagged("-at_install", "post_install") @@ -49,7 +49,7 @@ def setUpClass(cls): "name": "Test buy product", "uom_id": cls.uom_id, "uom_po_id": cls.uom_id, - "seller_ids": [(0, 0, {"name": cls.partner.id})], + "seller_ids": [(0, 0, {"partner_id": cls.partner.id})], } ) cls.purchase = cls.env["purchase.order"].create( @@ -84,8 +84,8 @@ def test_purchase_order_invoicing(self): invoice = self.env["account.move"].create( {"partner_id": self.partner.id, "move_type": "in_invoice"} ) - with Form(invoice) as inv: - inv.purchase_id = self.purchase + invoice.purchase_id = self.purchase + invoice._onchange_purchase_auto_complete() self.assertEqual( self.purchase.invoice_ids[0].payment_mode_id, self.payment_mode )