# -*- coding: utf-8 -*- # © 2016 Carlos Dauden # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.tests.common import TransactionCase class TestPartnerStocklRisk(TransactionCase): def setUp(self): super(TestPartnerStocklRisk, self).setUp() self.partner = self.env['res.partner'].create({ 'name': 'Partner test', 'customer': True, }) self.product = self.env.ref('product.product_product_36') self.quant = self.env['stock.quant'].create({ 'qty': 100, 'location_id': self.env.ref('stock.stock_location_stock').id, 'product_id': self.product.id, }) self.picking = self.env['stock.picking'].create({ 'picking_type_id': self.env.ref('stock.picking_type_out').id, 'location_id': self.env.ref('stock.stock_location_stock').id, 'location_dest_id': self.env.ref('stock.stock_location_customers').id, }) self.move = self.env['stock.move'].create({ 'name': '/', 'picking_id': self.picking.id, 'product_uom': self.product.uom_id.id, 'location_id': self.env.ref('stock.stock_location_stock').id, 'location_dest_id': self.env.ref('stock.stock_location_customers').id, 'product_id': self.product.id, }) def test_stock_move(self): self.move.action_done()