From 8613724bfcc21edf56757d4f9a901b629c2e82fb Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 25 Jan 2018 16:44:37 +0100 Subject: [PATCH] [FIX] stock_dropshipping: adapt test. Field `schedule_date` is now readonly for new records. Simply set the correct `expected_date` on the move line. --- addons/stock_dropshipping/tests/test_lifo_price.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/stock_dropshipping/tests/test_lifo_price.py b/addons/stock_dropshipping/tests/test_lifo_price.py index b2d419aa2c4..d4d9cc3523c 100644 --- a/addons/stock_dropshipping/tests/test_lifo_price.py +++ b/addons/stock_dropshipping/tests/test_lifo_price.py @@ -1,11 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -import time - -from datetime import date - -from odoo import tools +from odoo import fields, tools from odoo.modules.module import get_module_resource from odoo.tests import common, Form @@ -89,10 +85,10 @@ class TestLifoPrice(common.TransactionCase): # Let us send some goods out_form = Form(self.env['stock.picking']) out_form.picking_type_id = self.env.ref('stock.picking_type_out') - out_form.scheduled_date = date.today().strftime('%Y-%m-%d') with out_form.move_lines.new() as move: move.product_id = product_lifo_icecream move.quantity_done = 20.0 + move.date_expected = fields.Date.context_today(self.env['stock.move.line']) outgoing_lifo_shipment = out_form.save() # I assign this outgoing shipment