Skip to content

Commit 47b70a5

Browse files
authored
Merge pull request #1 from GearPlug/alejomjc-patch-1
Fix: Add fixes for get_fields_list and list for modules
2 parents 47d014f + 56c0cf8 commit 47b70a5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

zohocrm/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
ZOHOCRM_REQUEST_TOKEN_URL = 'https://accounts.zoho.com/oauth/v2/token'
1111
ZOHOCRM_REFRESH_TOKEN_URL = "https://accounts.zoho.com/oauth/v2/token"
1212
READ_MODULE_LIST = ['leads', 'accounts', 'contacts', 'deals', 'campaigns', 'tasks', 'cases', 'events', 'calls',
13-
'solutions', 'products', 'vendors', 'pricebooks', 'quotes', 'salesorders', 'purchaseorders',
14-
'invoices', 'custom', 'notes', 'approvals', 'dashboards', 'search', 'activities']
13+
'solutions', 'products', 'vendors', 'price_books', 'quotes', 'sales_orders', 'purchase_orders',
14+
'invoices', 'custom', 'notes', 'approvals', 'dashboards', 'search', 'activities', 'attachments']
1515
# module purchaseorders, 'invoices', salesorders and quotes are temporarily disable for writing this
1616
# due to the complexity of the module
1717
WRITE_MODULE_LIST = ['leads', 'accounts', 'contacts', 'deals', 'campaigns', 'tasks', 'cases', 'events', 'calls',
18-
'solutions', 'products', 'vendors', 'pricebooks', 'purchaseorders', 'custom', 'notes']
18+
'solutions', 'products', 'vendors', 'price_books', 'quotes', 'sales_orders', 'purchase_orders',
19+
'invoices', 'custom', 'notes', 'approvals', 'dashboards', 'search', 'activities', 'attachments']
1920

2021

2122
class Client(object):
@@ -108,7 +109,8 @@ def get_fields_list(self, module):
108109
'data_type': i['data_type'],
109110
'currency': i['currency'],
110111
'lookup': i['lookup'],
111-
'pick_list_values': i['pick_list_values']
112+
'pick_list_values': i['pick_list_values'],
113+
'system_mandatory': i['system_mandatory']
112114
} for i in response['fields']]
113115
except Exception as e:
114116
print(e)

0 commit comments

Comments
 (0)