<commit_before># -*- coding: utf-8 -*-
# Copyright 2014-2017 <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tests import common


class TestStockPickingShowReturn(common.TransactionCase):
    def setUp(self):
        super(TestStockPickingShowReturn, self).setUp()
        self.product = self.env['product.product'].create({
            'name': 'Test product',
        })
        picking_type = self.env.ref('stock.picking_type_internal')
        self.picking = self.env['stock.picking'].create({
            'picking_type_id': picking_type.id,
            'location_id': picking_type.default_location_src_id.id,
            'location_dest_id': picking_type.default_location_dest_id.id,
            'move_lines': [(0, 0, {
                'name': self.product.name,
                'product_id': self.product.id,
                'product_uom': self.product.uom_id.id,
            })],
        })

    def test_returned_ids_field(self):
        self.picking.force_assign()
        self.picking.do_transfer()
        wizard = self.env['stock.return.picking'].with_context(
            active_ids=self.picking.ids, active_id=self.picking.id).create({})<commit_msg>[IMP] stock_*: Execute tests at the end<commit_after># -*- coding: utf-8 -*-
# Copyright 2014-2017 <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.tests import common


@common.at_install(False)
@common.post_install(True)
class TestStockPickingShowReturn(common.TransactionCase):
    def setUp(self):
        super(TestStockPickingShowReturn, self).setUp()
        self.product = self.env['product.product'].create({
            'name': 'Test product',
        })
        picking_type = self.env.ref('stock.picking_type_internal')
        self.picking = self.env['stock.picking'].create({
            'picking_type_id': picking_type.id,
            'location_id': picking_type.default_location_src_id.id,
            'location_dest_id': picking_type.default_location_dest_id.id,
            'move_lines': [(0, 0, {
                'name': self.product.name,
                'product_id': self.product.id,
                'product_uom': self.product.uom_id.id,
            })],
        })

    def test_returned_ids_field(self):
        self.picking.force_assign()
        self.picking.do_transfer()
        wizard = self.env['stock.return.picking'].with_context(
            active_ids=self.picking.ids, active_id=self.picking.id).create({})
{'fraction_non_alphanumeric': 0.1405058209554396, 'fraction_numerical': 0.010437575270975512, 'mean_word_length': 2.659324522760646, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7150680', 'n_tokens_mistral': 816, 'n_tokens_neox': 784, 'n_words': 115}