diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-06-02 10:23:05 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-06-02 10:23:05 +0700 |
| commit | 673e5500269f96492a447eb7ea38ed16b1827468 (patch) | |
| tree | 8c747ee01cc49c0d8e59ab816659530999c66707 /indoteknik_custom/models | |
| parent | caae31d0376d62ca62a6d4e3fa5aaa0842fc9c88 (diff) | |
ceiling price exclude after discount
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/apache_solr.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/apache_solr.py b/indoteknik_custom/models/apache_solr.py index a988a8d3..9f187d78 100644 --- a/indoteknik_custom/models/apache_solr.py +++ b/indoteknik_custom/models/apache_solr.py @@ -168,3 +168,12 @@ class ApacheSolr(models.Model): _solr.add(documents) end_time = time.time() _logger.info("[SYNC_PRODUCT_TO_SOLR] Finish task add to solr. Time taken: {:.6f} seconds".format(end_time - start_time)) + + def _test_product_price(self, product_id=228178): + product = self.env['product.product'].search([('id', '=', product_id)], limit=1) + _logger.info('price incl tax: %s' % product._get_website_price_include_tax()) + _logger.info('price excl tax: %s' % product._get_website_price_exclude_tax()) + _logger.info('discount : %s' % product._get_website_disc(0)) + _logger.info('price after discount : %s' % product._get_website_price_after_disc()) + _logger.info('price excl after discount : %s' % product._get_website_price_after_disc_and_tax()) + _logger.info('tax : %s' % product._get_website_tax()) |
