diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-06 14:22:12 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-10-06 14:22:12 +0700 |
| commit | 5f9c6e2837c8201ca8132f3d3d71627bf799fb6d (patch) | |
| tree | df2b9d4d0b52a6cf8d45d153dff977e04785abb2 /indoteknik_api/models/res_users.py | |
| parent | bb3c3c6cac4382220ae8a521e8c2162a5fe3d3e9 (diff) | |
| parent | 7a23a18a45fbd38fabc33f4e1a74d9f31e86cd60 (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_api/models/res_users.py')
| -rw-r--r-- | indoteknik_api/models/res_users.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/indoteknik_api/models/res_users.py b/indoteknik_api/models/res_users.py index 0fe9008b..f331321f 100644 --- a/indoteknik_api/models/res_users.py +++ b/indoteknik_api/models/res_users.py @@ -6,16 +6,9 @@ class ResUsers(models.Model): def api_single_response(self, res_user, with_detail=''): config = self.env['ir.config_parameter'] - product_pricelist_tier1 = int(config.get_param('product.pricelist.tier1')) - product_pricelist_tier2 = int(config.get_param('product.pricelist.tier2')) - product_pricelist_tier3 = int(config.get_param('product.pricelist.tier3')) user_pricelist = res_user.property_product_pricelist - user_pricelist_id = user_pricelist.id if user_pricelist else False - pricelist_tier = False - if user_pricelist_id == product_pricelist_tier1: pricelist_tier = 'tier1' - if user_pricelist_id == product_pricelist_tier2: pricelist_tier = 'tier2' - if user_pricelist_id == product_pricelist_tier3: pricelist_tier = 'tier3' + pricelist_tier = user_pricelist.sudo().get_tier_name() data = { 'id': res_user.id, |
