trex-model 1.6.6__tar.gz → 1.6.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of trex-model might be problematic. Click here for more details.

Files changed (67) hide show
  1. {trex_model-1.6.6 → trex_model-1.6.7}/PKG-INFO +1 -1
  2. {trex_model-1.6.6 → trex_model-1.6.7}/setup.py +1 -1
  3. {trex_model-1.6.6 → trex_model-1.6.7}/trex_model.egg-info/PKG-INFO +1 -1
  4. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/helper/reward_transaction_helper.py +2 -2
  5. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/merchant_models.py +2 -1
  6. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/model_decorators.py +2 -2
  7. trex_model-1.6.7/trexmodel/models/datastore/rating_models.py +947 -0
  8. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/transaction_models.py +11 -2
  9. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/merchant_helpers.py +49 -4
  10. trex_model-1.6.6/trexmodel/models/datastore/rating_models.py +0 -475
  11. {trex_model-1.6.6 → trex_model-1.6.7}/LICENSE +0 -0
  12. {trex_model-1.6.6 → trex_model-1.6.7}/MANIFEST.in +0 -0
  13. {trex_model-1.6.6 → trex_model-1.6.7}/README.md +0 -0
  14. {trex_model-1.6.6 → trex_model-1.6.7}/setup.cfg +0 -0
  15. {trex_model-1.6.6 → trex_model-1.6.7}/trex_model.egg-info/SOURCES.txt +0 -0
  16. {trex_model-1.6.6 → trex_model-1.6.7}/trex_model.egg-info/dependency_links.txt +0 -0
  17. {trex_model-1.6.6 → trex_model-1.6.7}/trex_model.egg-info/requires.txt +0 -0
  18. {trex_model-1.6.6 → trex_model-1.6.7}/trex_model.egg-info/top_level.txt +0 -0
  19. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/__init__.py +0 -0
  20. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/conf.py +0 -0
  21. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/__init__.py +0 -0
  22. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/__init__.py +0 -0
  23. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/admin_models.py +0 -0
  24. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/analytic_models.py +0 -0
  25. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/app_models.py +0 -0
  26. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/coporate_models.py +0 -0
  27. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/customer_model_helpers.py +0 -0
  28. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/customer_models.py +0 -0
  29. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/fb_subsriber_models.py +0 -0
  30. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/helper/__init__.py +0 -0
  31. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/helper/reward_model_helpers.py +0 -0
  32. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/helper/sales_transaction_helpers.py +0 -0
  33. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/import_models.py +0 -0
  34. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/inventory_model.py +0 -0
  35. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/loyalty_models.py +0 -0
  36. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/lucky_draw_models.py +0 -0
  37. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/marketing_models.py +0 -0
  38. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/membership_models.py +0 -0
  39. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/merchant_promotion_models.py +0 -0
  40. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/message_model_helper.py +0 -0
  41. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/message_models.py +0 -0
  42. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/ndb_models.py +0 -0
  43. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/partnership_models.py +0 -0
  44. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/pos_models.py +0 -0
  45. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/prepaid_models.py +0 -0
  46. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/product_models.py +0 -0
  47. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/program_models.py +0 -0
  48. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/recruit_models.py +0 -0
  49. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/redeem_models.py +0 -0
  50. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/redemption_catalogue_models.py +0 -0
  51. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/referral_program_model.py +0 -0
  52. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/reward_models.py +0 -0
  53. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/spending_base_program_model.py +0 -0
  54. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/system_models.py +0 -0
  55. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/task_models.py +0 -0
  56. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/test_models.py +0 -0
  57. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/user_models.py +0 -0
  58. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/datastore/voucher_models.py +0 -0
  59. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/model_decorator.py +0 -0
  60. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/models/prepaid_helpers.py +0 -0
  61. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/pos_conf.py +0 -0
  62. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/program_conf.py +0 -0
  63. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/utils/__init__.py +0 -0
  64. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/utils/gcloud/__init__.py +0 -0
  65. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/utils/gcloud/datastore_util.py +0 -0
  66. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/utils/model/__init__.py +0 -0
  67. {trex_model-1.6.6 → trex_model-1.6.7}/trexmodel/utils/model/model_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trex_model
3
- Version: 1.6.6
3
+ Version: 1.6.7
4
4
  Summary: TRex database module package
5
5
  Home-page: https://bitbucket.org/lokjac/trex-model
6
6
  Author: Jack Lok
@@ -3,7 +3,7 @@ with open("README.md", "r") as fh:
3
3
  long_description = fh.read()
4
4
  setuptools.setup(
5
5
  name='trex_model',
6
- version='1.6.6',
6
+ version='1.6.7',
7
7
  author="Jack Lok",
8
8
  author_email="sglok77@gmail.com",
9
9
  description="TRex database module package",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trex-model
3
- Version: 1.6.6
3
+ Version: 1.6.7
4
4
  Summary: TRex database module package
5
5
  Home-page: https://bitbucket.org/lokjac/trex-model
6
6
  Author: Jack Lok
@@ -221,13 +221,13 @@ def create_reward_transaction(customer, transact_outlet=None, sales_amount=.0, t
221
221
 
222
222
  return __start_transaction_for_customer_transaction()
223
223
 
224
- def give_reward_from_sales_transaction(customer, sales_transaction, for_testing=False):
224
+ def give_reward_from_sales_transaction(customer, sales_transaction, for_testing=False, ):
225
225
 
226
226
  logger.debug('---give_reward_from_sales_transaction---')
227
227
 
228
228
  @model_transactional(desc='give_reward_from_sales_transaction')
229
229
  def __start_transaction(customer, sales_transaction):
230
- customer_transaction = CustomerTransaction.create_from_sales_transaction(customer, sales_transaction, for_testing=for_testing)
230
+ customer_transaction = CustomerTransaction.create_from_sales_transaction(customer, sales_transaction, for_testing=for_testing,)
231
231
  if for_testing==False:
232
232
  trigger_check_reward_success = trigger_spending_reward_for_transaction(customer_transaction)
233
233
 
@@ -1606,6 +1606,7 @@ class Outlet(BusinessEntity, FullTextSearchable):
1606
1606
  fax_phone = ndb.StringProperty(required=False)
1607
1607
  email = ndb.StringProperty(required=False)
1608
1608
  business_hour = ndb.StringProperty(required=False)
1609
+
1609
1610
  is_physical_store = ndb.BooleanProperty(required=False, default=True)
1610
1611
  geo_location = ndb.GeoPtProperty(required=False)
1611
1612
  created_datetime = ndb.DateTimeProperty(required=True, auto_now_add=True)
@@ -1732,7 +1733,7 @@ class Outlet(BusinessEntity, FullTextSearchable):
1732
1733
  office_phone=None, business_hour=None, geo_location=None, is_physical_store=True, id=None,
1733
1734
  is_headquarter=False,
1734
1735
  ):
1735
-
1736
+ logger.info('is_headquarter=%s', is_headquarter)
1736
1737
  outlet_limit = merchant_acct.outlet_limit
1737
1738
 
1738
1739
  total_count = Outlet.count_by_merchant_account(merchant_acct)
@@ -12,7 +12,7 @@ from trexlib.utils.log_util import get_tracelog
12
12
  logger = logging.getLogger('model')
13
13
 
14
14
  def model_transactional(
15
- retries = 1,
15
+ retries = 3,
16
16
  read_only=False,
17
17
  join=True,
18
18
  xg=True,
@@ -20,7 +20,7 @@ def model_transactional(
20
20
  desc=None):
21
21
 
22
22
  if desc is None:
23
- desc='modeal transaction'
23
+ desc='model transaction'
24
24
 
25
25
 
26
26
  def transactional_wrapper(wrapped):