[FIX] sale_management: correctly autocomplete uom on option lines
Fixes a mistake from 0c468f6c2f160dec672bd25c673401b154b2709b where the uom autocompletion was lost and adds a test to make sure it won't happen again. closes odoo/odoo#87667 X-original-commit: 10bc8dc114511740d549dfc5261bc244e0a98ad9 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.addons.sale.tests.common import TestSaleCommon
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests import Form, tagged
|
||||
|
||||
|
||||
@tagged('-at_install', 'post_install')
|
||||
@@ -338,3 +338,10 @@ class TestSaleOrder(TestSaleCommon):
|
||||
self.pl_option_discount,
|
||||
"If a pricelist is set without discount included,"
|
||||
" the discount should be correctly computed.")
|
||||
|
||||
def test_option_creation(self):
|
||||
"""Make sure the product uom is automatically added to the option when the product is specified"""
|
||||
order_form = Form(self.sale_order)
|
||||
with order_form.sale_order_option_ids.new() as option:
|
||||
option.product_id = self.product_1
|
||||
self.assertTrue(bool(option.uom_id))
|
||||
|
||||
Reference in New Issue
Block a user