You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.5 KiB

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp.tests.common import TransactionCase
  5. class TestPartnerStocklRisk(TransactionCase):
  6. def setUp(self):
  7. super(TestPartnerStocklRisk, self).setUp()
  8. self.partner = self.env['res.partner'].create({
  9. 'name': 'Partner test',
  10. 'customer': True,
  11. })
  12. self.product = self.env.ref('product.product_product_36')
  13. self.quant = self.env['stock.quant'].create({
  14. 'qty': 100,
  15. 'location_id': self.env.ref('stock.stock_location_stock').id,
  16. 'product_id': self.product.id,
  17. })
  18. self.picking = self.env['stock.picking'].create({
  19. 'picking_type_id': self.env.ref('stock.picking_type_out').id,
  20. 'location_id': self.env.ref('stock.stock_location_stock').id,
  21. 'location_dest_id':
  22. self.env.ref('stock.stock_location_customers').id,
  23. })
  24. self.move = self.env['stock.move'].create({
  25. 'name': '/',
  26. 'picking_id': self.picking.id,
  27. 'product_uom': self.product.uom_id.id,
  28. 'location_id': self.env.ref('stock.stock_location_stock').id,
  29. 'location_dest_id':
  30. self.env.ref('stock.stock_location_customers').id,
  31. 'product_id': self.product.id,
  32. })
  33. def test_stock_move(self):
  34. self.move.action_done()