|
1 | 1 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
|
2 |
| - |
3 | 2 | from datetime import datetime, timedelta
|
4 | 3 |
|
5 |
| -from freezegun import freeze_time |
6 |
| - |
7 | 4 | from odoo import Command
|
8 | 5 | from odoo.exceptions import UserError
|
9 | 6 | from odoo.tests import Form, tagged
|
10 | 7 |
|
11 |
| -from odoo.addons.sale.tests.common import SaleCommon, TestSaleCommon |
| 8 | +from odoo.addons.sale.tests.common import TestSaleCommon |
12 | 9 | from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import (
|
13 | 10 | ValuationReconciliationTestCommon,
|
14 | 11 | )
|
@@ -1755,38 +1752,3 @@ def test_delivery_on_negative_delivered_qty(self):
|
1755 | 1752 | picking.button_validate()
|
1756 | 1753 | self.assertEqual(sale_order.order_line.qty_delivered, -1.0)
|
1757 | 1754 | self.assertEqual(sale_order.order_line.qty_to_invoice, -1.0)
|
1758 |
| - |
1759 |
| - |
1760 |
| -class TestSaleOrder(SaleCommon): |
1761 |
| - |
1762 |
| - @freeze_time('2017-01-07') |
1763 |
| - def test_order_onchange(self): |
1764 |
| - order = self.empty_order |
1765 |
| - storable_product = self.env['product.product'].create({ |
1766 |
| - 'name': 'Test Storable', |
1767 |
| - 'type': 'product', |
1768 |
| - 'list_price': 25.0, |
1769 |
| - }) |
1770 |
| - order.order_line = [ |
1771 |
| - Command.create({ |
1772 |
| - 'product_id': storable_product.id, |
1773 |
| - 'product_uom_qty': 15.12, |
1774 |
| - 'price_unit': 50.0, |
1775 |
| - }), |
1776 |
| - ] |
1777 |
| - # retrieve the onchange spec for calling 'onchange' |
1778 |
| - order_form = Form(order) |
1779 |
| - # spec = order_form._view['onchange'] |
1780 |
| - # onchange_vals = order_form._onchange_values() |
1781 |
| - # res = order.onchange( |
1782 |
| - # dict( |
1783 |
| - # onchange_vals, |
1784 |
| - # commitment_date='2017-01-12', |
1785 |
| - # ), |
1786 |
| - # 'commitment_date', |
1787 |
| - # spec |
1788 |
| - # ) |
1789 |
| - # self.assertEqual(res['value']['order_line'][1][2]['product_uom_qty'], 15.12) |
1790 |
| - order_form.commitment_date = '2017-01-12' |
1791 |
| - order_form.save() |
1792 |
| - self.assertEqual(order.order_line.price_unit, 50.0) |
0 commit comments