-
-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] partner_tier_validation: Allow to open view_partner_simple_form
Caused by: EvalError: Can not evaluate python expression: (bool(bool(review_ids))) Error: Name 'review_ids' is not defined EvalError: Can not evaluate python expression: (bool(bool(review_ids))) Error: Name 'review_ids' is not defined
- Loading branch information
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from odoo.exceptions import ValidationError | ||
from odoo.tests import common, tagged | ||
from odoo.tests import Form, common, tagged | ||
|
||
|
||
@tagged("-at_install", "post_install") | ||
|
@@ -77,11 +77,16 @@ def test_validation_res_partner(self): | |
) | ||
self.assertEqual(contact.state, "confirmed") | ||
|
||
# Change company type to retrigger validation | ||
# Change company type to trigger validation | ||
contact.write({"company_type": "person"}) | ||
self.assertEqual( | ||
contact.state, "draft", "Change company type sets back to draft" | ||
) | ||
with Form( | ||
contact.with_context(form_view_ref="base.view_partner_simple_form"), | ||
view="base.view_partner_simple_form", | ||
) as c: | ||
c.email = "[email protected]" | ||
|
||
def test_no_validation_res_partner(self): | ||
""" | ||
|