Skip to content

Commit

Permalink
Advanced settings sync payments field added (#82)
Browse files Browse the repository at this point in the history
* Advanced settings sync payments field added

* Advanced settings sync payments field added
  • Loading branch information
ruuushhh authored Nov 14, 2023
1 parent e13c6ef commit 7815af0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.1.2 on 2023-11-14 09:46

from django.db import migrations
import sage_desktop_api.models.fields


class Migration(migrations.Migration):

dependencies = [
('workspaces', '0003_remove_advancedsetting_schedule_id_and_more'),
]

operations = [
migrations.AddField(
model_name='advancedsetting',
name='sync_sage_300_to_fyle_payments',
field=sage_desktop_api.models.fields.BooleanFalseField(default=False, help_text='Sync sage 300 to fyle payments'),
),
]
3 changes: 2 additions & 1 deletion apps/workspaces/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ class AdvancedSetting(BaseModel):
interval_hours = IntegerNullField(help_text='Interval in hours')
emails_selected = CustomJsonField(help_text='Emails Selected For Email Notification')
emails_added = CustomJsonField(help_text='Emails Selected For Email Notification')
auto_create_vendor = BooleanFalseField(help_text='Auto create vendor')
schedule = models.OneToOneField(Schedule, on_delete=models.PROTECT, null=True)
auto_create_vendor = BooleanFalseField(help_text='Auto create vendor')
sync_sage_300_to_fyle_payments = BooleanFalseField(help_text='Sync sage 300 to fyle payments')

class Meta:
db_table = 'advanced_settings'
4 changes: 3 additions & 1 deletion tests/test_workspaces/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def test_advanced_settings(api_client, test_connection):
'email': '[email protected]'
},
]),
'auto_create_vendor': True
'auto_create_vendor': True,
'sync_sage_300_to_fyle_payments': True
}

response = api_client.post(url, payload)
Expand All @@ -275,6 +276,7 @@ def test_advanced_settings(api_client, test_connection):
},
]
assert response.data['auto_create_vendor'] == True
assert response.data['sync_sage_300_to_fyle_payments'] == True

response = api_client.get(url)

Expand Down

0 comments on commit 7815af0

Please sign in to comment.