-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource Tax Group: refactored imports #315
Resource Tax Group: refactored imports #315
Conversation
…roject, cost_center
WalkthroughThe recent updates across various components focus on refining and simplifying the import and mapping functionalities related to tax codes, customers, suppliers, and custom field mappings. Notably, the integration now leans towards accommodating workspace settings for importing tax codes and suppliers, while eliminating previously supported functionalities like tax group uploads and custom field mappings. These changes aim to streamline operations based on user settings, enhancing efficiency and customization in the process. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
apps/mappings/queue.py
Outdated
task_settings['import_tax'] = { | ||
'destination_field': 'TAX_CODE', | ||
'destination_sync_methods': [SYNC_METHODS['TAX_CODE']], | ||
'is_auto_sync_enabled': is_auto_sync_allowed(workspace_general_settings, None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can sent it False by default since we know this block is only for tax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- apps/mappings/queue.py (1 hunks)
- apps/mappings/schedules.py (1 hunks)
- apps/mappings/tasks.py (1 hunks)
- apps/workspaces/apis/import_settings/triggers.py (2 hunks)
- apps/xero/actions.py (1 hunks)
Additional comments: 5
apps/mappings/schedules.py (1)
- 25-25: The addition of
workspace_general_settings_instance.import_tax_codes
in the condition for scheduling tasks aligns with the PR's objective to enhance the application's ability to dynamically import tax codes based on workspace general settings. This change ensures that tasks related to importing tax codes are scheduled when the setting is enabled, contributing to the flexibility and efficiency of the import process.apps/workspaces/apis/import_settings/triggers.py (1)
- 3-8: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
The removal of the call to
schedule_tax_groups_creation
inpost_save_workspace_general_settings
simplifies the handling of workspace general settings and import tasks. This change is consistent with the PR's goal to streamline the import process by adjusting functionalities related to tax groups. By focusing on essential tasks and removing outdated functions, the application's import process becomes more efficient and easier to manage.apps/xero/actions.py (1)
- 79-84: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
The removal of logic related to custom field mappings in the
refersh_xero_dimension
function and the shift towards importing suppliers as merchants based on workspace settings are significant changes that align with the PR's objectives. This adjustment emphasizes the application's focus on importing essential data, such as suppliers, which enhances the flexibility and user experience in managing imports from external sources like Xero.apps/mappings/queue.py (1)
- 139-146: The addition of a conditional block to include import tax code mapping settings based on the
workspace_general_settings.import_tax_codes
setting is a crucial enhancement. This change ensures that tax code import tasks are constructed and executed only when the setting is enabled, aligning with the PR's goal to make the import process more adaptable to user settings. It's a positive step towards improving the application's flexibility in handling tax codes and supplier information.apps/mappings/tasks.py (1)
- 286-291: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]
The removal of functions related to uploading tax groups to Fyle (
upload_tax_groups_to_fyle
,create_fyle_tax_group_payload
, andauto_create_tax_codes_mappings
) and the addition of theauto_create_suppliers_as_merchants
function are significant changes that support the PR's objectives. These adjustments streamline the import process by removing outdated functionalities and focusing on importing suppliers as merchants, which is more aligned with the updated workspace settings. This shift enhances the application's efficiency and adaptability in managing imports.
* Added integrations_imports submodule, made changes in settings (#310) * Refactor imports for Project resource (#311) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Project: added cluster import, fixed minor typo, added new supplier field * Refactor imports for project and cost_center (#314) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Project: added cluster import, fixed minor typo, added new supplier field * Refactor imports costcenter (#312) * Resource Cost_Center: refactored imports * Refactor imports for Project resource (#311) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Project: added cluster import, fixed minor typo, added new supplier field * Refactor imports custom expense (#313) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Cost_Center: refactored imports * Resource Custom Expense Field: refactored imports * Resource Project: added cluster import, fixed minor typo, added new supplier field * Resource Tax Group: refactored imports (#315) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Cost_Center: refactored imports * Resource Custom Expense Field: refactored imports * Resource Project: added cluster import, fixed minor typo, added new supplier field * Resource Tax Group: refactored imports * Resource Tax Group: changed to is_auto_sync to False by default * Resource Category: refactored imports (#316) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Cost_Center: refactored imports * Resource Custom Expense Field: refactored imports * Resource Tax Group: refactored imports * Resource Category: refactored imports * Resource Category: changed is_auto_sync_enabled to True by default * Refactor imports supplier (#318) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Cost_Center: refactored imports * Resource Custom Expense Field: refactored imports * Resource Tax Group: refactored imports * Resource Category: refactored imports * Added RetryException handler and bumped the sdk versions (#306) * Set tasks limit to 1L (#317) * Set tasks limit to 1L * set timeout * Modified the import schedule creation condition --------- Co-authored-by: ruuushhh <[email protected]> * Refactor old flow (#321) * Added integrations_imports submodule, made changes in settings * Resource Project: Added new flow for the Project Import * Typo Fix * Resource Project: removed old import logic for Project * Resource Cost_Center: refactored imports * Resource Custom Expense Field: refactored imports * Resource Tax Group: refactored imports * Resource Category: refactored imports * Added RetryException handler and bumped the sdk versions (#306) * Set tasks limit to 1L (#317) * Set tasks limit to 1L * set timeout * Modified the import schedule creation condition * Removed dead code, add few test cases, added script for adding new schedule for different workspaces * Added post deploy sql script to dump old schedules and delete --------- Co-authored-by: ruuushhh <[email protected]> * Merged changes from master * Update delete workspace func (#319) * Update delete workspace func * Fix comments * upate workspace last synced fix (#320) * Modified the workflow for submodule * Decreased the coverage to 88% --------- Co-authored-by: ruuushhh <[email protected]>
Summary by CodeRabbit
import_tax_codes
alongsideimport_customers
.