summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/apache_solr.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-06-15 15:47:05 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-06-15 15:47:05 +0700
commit55c67c71b04fce80c635b3a58d91c8bcb02e17c8 (patch)
treeed8833b969800e36b887b4134c14dab89d3b91c7 /indoteknik_custom/models/apache_solr.py
parent1f2995a85428ac4335123bd33d48ae17d3c9f36f (diff)
parent24649f8e939484759ef34e5e68f251d951f63c02 (diff)
Merge commit '24649f8e939484759ef34e5e68f251d951f63c02'
Conflicts: indoteknik_custom/__manifest__.py indoteknik_custom/security/ir.model.access.csv
Diffstat (limited to 'indoteknik_custom/models/apache_solr.py')
-rw-r--r--indoteknik_custom/models/apache_solr.py9
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())