Skip to content

Commit

Permalink
[FIX] - sale_exception: fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbejaoui committed Jan 25, 2023
1 parent ae6a959 commit 5a6c9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sale_exception/data/sale_exception_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<field name="description">The product has a warning in his form</field>
<field name="sequence">40</field>
<field name="model">sale.order.line</field>
<field name="code">failed=self.sale_line_warn == "warning"</field>
<field name="code">failed=self.product_id.sale_line_warn == "warning"</field>
<field name="active" eval="False" />
</record>
</odoo>
2 changes: 1 addition & 1 deletion sale_exception/tests/test_sale_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_exception_product_sale_warning(self):
partner=self.env.ref("base.res_partner_1"), product=product
)
sale_order.action_confirm()
self.sale_line_warn = "warning"
product.sale_line_warn = "warning"
sale_order2 = sale_order.copy()
sale_order2.detect_exceptions()
self.assertTrue(sale_order2.exception_ids.filtered(lambda x: x == exception))

0 comments on commit 5a6c9d9

Please sign in to comment.