-
-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0][MIG] account_move_tier_validation_approver: Migration to 18.0 #1831
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] account_move_tier_validation_approver: Migration to 18.0 #1831
Conversation
c1e5919
to
8904706
Compare
979d2b6
to
02aba64
Compare
|
||
|
||
class TestAccountMoveTierValidationApprover(TransactionCase): | ||
def setUp(self): | ||
super().setUp() | ||
self.res_partner_1 = self.env["res.partner"].create( | ||
{"name": "Wood Corner", "email": "[email protected]"} | ||
) | ||
self.product_1 = self.env["product.product"].create( | ||
{"name": "Desk Combination"} | ||
) | ||
self.currency_usd = self.env["res.currency"].search([("name", "=", "USD")]) | ||
self.test_user_1 = self.env["res.users"].create( | ||
{"name": "User", "login": "test1", "email": "[email protected]"} | ||
) | ||
self.test_approver = self.env["res.users"].create( | ||
{"name": "Approver", "login": "test2", "email": "[email protected]"} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class TestAccountMoveTierValidationApprover(TransactionCase): | |
def setUp(self): | |
super().setUp() | |
self.res_partner_1 = self.env["res.partner"].create( | |
{"name": "Wood Corner", "email": "[email protected]"} | |
) | |
self.product_1 = self.env["product.product"].create( | |
{"name": "Desk Combination"} | |
) | |
self.currency_usd = self.env["res.currency"].search([("name", "=", "USD")]) | |
self.test_user_1 = self.env["res.users"].create( | |
{"name": "User", "login": "test1", "email": "[email protected]"} | |
) | |
self.test_approver = self.env["res.users"].create( | |
{"name": "Approver", "login": "test2", "email": "[email protected]"} | |
) | |
from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT | |
class TestAccountMoveTierValidationApprover(TransactionCase): | |
def setUp(self): | |
super().setUp() | |
self.env = self.env(context=dict(self.env.context, **DISABLED_MAIL_CONTEXT)) | |
self.res_partner_1 = self.env["res.partner"].create( | |
{"name": "Wood Corner", "email": "[email protected]"} | |
) | |
self.product_1 = self.env["product.product"].create( | |
{"name": "Desk Combination"} | |
) | |
self.currency_usd = self.env["res.currency"].search([("name", "=", "USD")]) | |
self.test_user_1 = self.env["res.users"].create( | |
{"name": "User", "login": "test1", "email": "[email protected]"} | |
) | |
self.test_approver = self.env["res.users"].create( | |
{"name": "Approver", "login": "test2", "email": "[email protected]"} | |
) |
Odoo is trying to sent emails for the users created here.
It can be made more efficient by using DISABLED_MAIL_CONTEXT
Like done in sale_tier_validation module
https://github.com/OCA/sale-workflow/blob/17.0/sale_tier_validation/tests/test_tier_validation.py#L6-L31
02aba64
to
6763e36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review
<xpath expr='//field[@name="ref"]' position="after"> | ||
<field | ||
name="approver_id" | ||
readonly="review_ids != False" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinkhao I think this shoul be readonly="review_ids"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CasVissers-360ERP done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor feedback
6763e36
to
eb67009
Compare
based on #1491
depends on OCA/server-ux#966 #1830