Skip to content

fix: support activity types for local account - #296

Merged
suraj-yadav0 merged 3 commits into
CITOpenRep:release/v1.3.2from
srush0:fix/local-account-activity-type-v3
Aug 24, 2026
Merged

fix: support activity types for local account#296
suraj-yadav0 merged 3 commits into
CITOpenRep:release/v1.3.2from
srush0:fix/local-account-activity-type-v3

Conversation

@srush0

@srush0 srush0 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Type

  • Bug Fix

Problem

Local Accounts do not receive activity types from Odoo because they are not synchronized with an Odoo server. This caused activity types to be unavailable or incorrectly resolved when creating and displaying activities for the Local Account.

Changes

  • Added default activity types for the Local Account:
    • To Do
    • Call
    • Email
    • Meeting
  • Added a database initialization step to ensure these activity types exist for the Local Account.
  • Prevented duplicate activity types from being created if they already exist.
  • Updated activity type lookup to use the local SQLite id for Local Account activities and odoo_record_id for Odoo account activities.
  • Updated activity search to pass the account ID when resolving activity type names.
  • Updated ActivityDetailsCard.qml to display No Type instead of Type ID: -1 when no activity type is available.

Testing

  • Ran git diff --check successfully.
  • Successfully built the application using Clickable.
  • Verified the activity type lookup handles Local Account and Odoo Account activities separately.
  • Verified the Local Account default activity types are initialized through the database initialization flow.
  • Runtime testing could not be performed with clickable launch because no device was detected.

Related Issue

Fixes the Local Account activity type handling issue.

@suraj-yadav0 suraj-yadav0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core logic and database initialization for Local Account activity types are solid..Good Work..!!

In Activity_Page.qml:340, Activity.getActivityTypeName is called with only 1 argument in two locations:

  1. Activity List Model construction (Activity_Page.qml:340):
    // Current:
    activity_type_name: Activity.getActivityTypeName(item.activity_type_id),
    // Recommended:                                                                                    
    activity_type_name: Activity.getActivityTypeName(item.activity_type_id, item.account_id),          
  1. Local Page Search filtering (Activity_Page.qml:578):
    // Current:
    var activityTypeName = Activity.getActivityTypeName(item.activity_type_id);
// Recommended:                                                                                    
var activityTypeName = Activity.getActivityTypeName(item.activity_type_id, item.account_id);     

Just a Two Line change to ensure the Correct Activity Type is called for Correct Account.

@suraj-yadav0 suraj-yadav0 self-assigned this Aug 24, 2026
@suraj-yadav0 suraj-yadav0 added bug Something isn't working enhancement New feature or request labels Aug 24, 2026
@suraj-yadav0
suraj-yadav0 merged commit 6f8522d into CITOpenRep:release/v1.3.2 Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local Account: Unable to save new activity due to "Activity Type" validation error

2 participants