amsdal_crm 0.1.7__py3-none-any.whl → 0.1.8__py3-none-any.whl

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.
amsdal_crm/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.1.7'
1
+ __version__ = '0.1.8'
amsdal_crm/models/deal.py CHANGED
@@ -9,11 +9,17 @@ from amsdal.contrib.auth.models.user import User
9
9
  from amsdal.models.mixins import TimestampMixin
10
10
  from amsdal_models.classes.data_models.indexes import IndexInfo
11
11
  from amsdal_models.classes.model import Model
12
+ from amsdal_models.managers.model_manager import Manager
12
13
  from amsdal_utils.models.data_models.reference import Reference
13
14
  from amsdal_utils.models.enums import ModuleType
14
15
  from pydantic.fields import Field
15
16
 
16
17
 
18
+ class DealManager(Manager):
19
+ def get_queryset(self) -> 'DealManager':
20
+ return super().get_queryset().select_related('stage')
21
+
22
+
17
23
  class Deal(TimestampMixin, Model):
18
24
  """Deal (Sales Opportunity) model.
19
25
 
@@ -4,11 +4,17 @@ from typing import ClassVar
4
4
 
5
5
  from amsdal_models.classes.data_models.indexes import IndexInfo
6
6
  from amsdal_models.classes.model import Model
7
+ from amsdal_models.managers.model_manager import Manager
7
8
  from amsdal_utils.models.enums import ModuleType
8
9
  from pydantic import ConfigDict
9
10
  from pydantic.fields import Field
10
11
 
11
12
 
13
+ class StageManager(Manager):
14
+ def get_queryset(self) -> 'StageManager':
15
+ return super().get_queryset().select_related('pipeline')
16
+
17
+
12
18
  class Stage(Model):
13
19
  """Pipeline stage model.
14
20
 
@@ -18,6 +24,8 @@ class Stage(Model):
18
24
 
19
25
  model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True)
20
26
 
27
+ objects = StageManager()
28
+
21
29
  __module_type__: ClassVar[ModuleType] = ModuleType.CONTRIB
22
30
  __indexes__: ClassVar[list[IndexInfo]] = [
23
31
  IndexInfo(name='idx_stage_order', field='order'),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amsdal_crm
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: amsdal-crm plugin for AMSDAL Framework
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiohttp==3.12.15
@@ -1,5 +1,5 @@
1
1
  amsdal_crm/Third-Party Materials - AMSDAL Dependencies - License Notices.md,sha256=ML7PqsHrTMNNZn8E_rA-LzDCAafMSxMcrmSg8YOi-wo,113896
2
- amsdal_crm/__about__.py,sha256=mFY0GwwuN-a3M8w93_mskS6GZIvv9SNdjLfJaWNsm-I,22
2
+ amsdal_crm/__about__.py,sha256=rq5OMW-khxQo_5FAvSrPaAS1lRfG9aG2hSuo-KK2Yfk,22
3
3
  amsdal_crm/__init__.py,sha256=b4wxJYesA5Ctk1IrAvlw64i_0EU3SiK1Tw6sUYakd18,303
4
4
  amsdal_crm/app.py,sha256=JLvueh_2KURQLDWMQlq4Z6gAFsqBDTRf6pK095ehp14,1373
5
5
  amsdal_crm/constants.py,sha256=5Ga7q9zEKcQZnAoKv_SE_7w8WxvhPFkM9gY9NruOEaA,347
@@ -17,9 +17,9 @@ amsdal_crm/models/activity.py,sha256=UtO1--oSPfrQCfQwWfIlEkjdXuaRG9znesPrGe1JqGM
17
17
  amsdal_crm/models/attachment.py,sha256=CzS8sUMw0_8T_a4Ey6uzrSdEc12Fki5FbrFRXrsTExk,1525
18
18
  amsdal_crm/models/contact.py,sha256=xOTl8zUIEm2_Tk-CQxGAjzR_iuLA7Q_aKmJZAMXZ1F0,4924
19
19
  amsdal_crm/models/custom_field_definition.py,sha256=Z0k_QR6rZ1hWkg4Wn-w8Rn9GSIgpOg_moUYRsmRPZQI,1666
20
- amsdal_crm/models/deal.py,sha256=kEmS_nkicWKhZO1PbeAJLYbAffdo6LU8Nm5xDQDOwkA,6448
20
+ amsdal_crm/models/deal.py,sha256=5Vh-3m909m9qhJO3Sqwebuf1UBOxB4s0K2RKrw4daps,6642
21
21
  amsdal_crm/models/pipeline.py,sha256=DXJh5MbCCRctEHhDfxef5RxFWSKN0D4v6UK75q5ssL8,925
22
- amsdal_crm/models/stage.py,sha256=zNL8UkbfGPi77mXTHjsD0k_MpyFHcwL4dsquBLAHIjE,1383
22
+ amsdal_crm/models/stage.py,sha256=LWG0Kr58srfqCrxjzRlrJogxpWbKvBOvkiHPbxVElbM,1612
23
23
  amsdal_crm/models/workflow_rule.py,sha256=cnIEaX-hWcRYvN5gR4uPt7Cirr8sPPdJibZapD8VRpY,1547
24
24
  amsdal_crm/services/__init__.py,sha256=ngHA-MUPrsHvga8vFP61b8v7rrAWl-h1VZTjhlJCXkI,465
25
25
  amsdal_crm/services/activity_service.py,sha256=3iuEmaSicwm81rouLPum5VaWW0bAMnNWNPRCHkNhewU,1873
@@ -27,6 +27,6 @@ amsdal_crm/services/custom_field_service.py,sha256=r2dr2gijTbi9r56XV64bSArx0jTGw
27
27
  amsdal_crm/services/deal_service.py,sha256=ZF7cAc6r10xgXZ8D8Oy3hnE-6GgAXq8fuG_Y4QerRGw,4839
28
28
  amsdal_crm/services/email_service.py,sha256=kung83otZAzm5MjezbWFP_Bp9CJ2NXLlDdjMX9MvNIc,3788
29
29
  amsdal_crm/services/workflow_service.py,sha256=oKOFJrwnMZxAiHuScs63tZxL801z-6ryrUuPMC7OXlE,7036
30
- amsdal_crm-0.1.7.dist-info/METADATA,sha256=GHVRRe9IbO83dHzlaxVnLFj6RiD9V3b9N7sVU3JX6AY,1596
31
- amsdal_crm-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
32
- amsdal_crm-0.1.7.dist-info/RECORD,,
30
+ amsdal_crm-0.1.8.dist-info/METADATA,sha256=1pWUuqh_4RWpPnt__VYRsxL2nT0Lgs0AXM-rtKunjVQ,1596
31
+ amsdal_crm-0.1.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
32
+ amsdal_crm-0.1.8.dist-info/RECORD,,