@objectql/create 4.0.0 → 4.0.2
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.
- package/package.json +1 -1
- package/templates/enterprise/CHANGELOG.md +20 -0
- package/templates/enterprise/README.md +2 -2
- package/templates/enterprise/package.json +2 -2
- package/templates/enterprise/src/core/attachment.object.yml +10 -1
- package/templates/enterprise/src/core/organization.object.yml +41 -6
- package/templates/enterprise/src/core/user.object.yml +37 -12
- package/templates/enterprise/src/extensions/README.md +4 -4
- package/templates/enterprise/src/extensions/user_extension.object.yml +65 -0
- package/templates/enterprise/src/modules/crm/crm_account.object.yml +57 -13
- package/templates/enterprise/src/modules/crm/crm_contact.object.yml +42 -8
- package/templates/enterprise/src/modules/crm/crm_lead.object.yml +82 -21
- package/templates/enterprise/src/modules/crm/crm_opportunity.object.yml +65 -15
- package/templates/enterprise/src/modules/finance/finance_budget.object.yml +67 -16
- package/templates/enterprise/src/modules/finance/finance_expense.object.yml +75 -19
- package/templates/enterprise/src/modules/finance/finance_invoice.object.yml +61 -16
- package/templates/enterprise/src/modules/finance/finance_payment.object.yml +65 -16
- package/templates/enterprise/src/modules/hr/hr_department.object.yml +29 -2
- package/templates/enterprise/src/modules/hr/hr_employee.object.yml +50 -8
- package/templates/enterprise/src/modules/hr/hr_position.object.yml +46 -10
- package/templates/enterprise/src/modules/hr/hr_timesheet.object.yml +44 -8
- package/templates/enterprise/src/modules/project/project_milestone.object.yml +36 -4
- package/templates/enterprise/src/modules/project/project_project.object.yml +64 -13
- package/templates/enterprise/src/modules/project/project_task.object.yml +70 -9
- package/templates/enterprise/src/modules/project/project_timesheet_entry.object.yml +39 -4
- package/templates/enterprise/src/plugins/audit/audit.plugin.ts +1 -1
- package/templates/enterprise/src/plugins/audit/note.object.yml +17 -0
- package/templates/enterprise/tsconfig.tsbuildinfo +1 -1
- package/templates/hello-world/CHANGELOG.md +16 -0
- package/templates/hello-world/README.md +73 -10
- package/templates/hello-world/package.json +1 -1
- package/templates/hello-world/src/index.ts +17 -5
- package/templates/starter/CHANGELOG.md +20 -0
- package/templates/starter/package.json +1 -1
- package/templates/starter/src/modules/projects/projects.action.ts +195 -346
- package/templates/starter/src/modules/projects/projects.hook.ts +98 -263
- package/templates/starter/src/modules/projects/projects.object.yml +65 -6
- package/templates/starter/src/modules/projects/projects.validation.yml +13 -4
- package/templates/starter/src/seed.ts +1 -1
- package/templates/starter/tsconfig.tsbuildinfo +1 -1
- package/templates/enterprise/__tests__/data-api.test.ts +0 -554
- package/templates/enterprise/__tests__/data-api.test.ts.backup +0 -526
- package/templates/enterprise/__tests__/metadata-api.test.ts +0 -315
- package/templates/enterprise/__tests__/metadata-loading.test.ts +0 -258
- package/templates/enterprise/src/extensions/user.extension.object.yml +0 -42
- package/templates/starter/__tests__/projects-hooks-actions.test.ts +0 -498
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
# File: crm_lead.object.yml
|
|
2
|
+
# Object name is inferred from filename as 'crm_lead'
|
|
1
3
|
label: Lead
|
|
2
4
|
description: Potential sales lead
|
|
3
5
|
icon: user-add-line
|
|
4
6
|
|
|
7
|
+
ai_context:
|
|
8
|
+
intent: "Track and qualify potential sales opportunities from new prospects"
|
|
9
|
+
domain: customer_relationship_management
|
|
10
|
+
aliases: [lead, prospect, sales lead]
|
|
11
|
+
common_queries:
|
|
12
|
+
- "Show new leads by source"
|
|
13
|
+
- "Find qualified leads by industry"
|
|
14
|
+
- "List hot leads for my team"
|
|
15
|
+
|
|
5
16
|
fields:
|
|
6
17
|
first_name:
|
|
7
18
|
type: text
|
|
@@ -36,54 +47,95 @@ fields:
|
|
|
36
47
|
|
|
37
48
|
status:
|
|
38
49
|
type: select
|
|
50
|
+
label: Lead Status
|
|
39
51
|
options:
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
52
|
+
- label: New
|
|
53
|
+
value: new
|
|
54
|
+
- label: Contacted
|
|
55
|
+
value: contacted
|
|
56
|
+
- label: Qualified
|
|
57
|
+
value: qualified
|
|
58
|
+
- label: Unqualified
|
|
59
|
+
value: unqualified
|
|
60
|
+
- label: Converted
|
|
61
|
+
value: converted
|
|
45
62
|
defaultValue: new
|
|
46
63
|
required: true
|
|
47
64
|
index: true
|
|
65
|
+
ai_context:
|
|
66
|
+
intent: "Current stage in lead qualification process"
|
|
67
|
+
is_state_machine: true
|
|
68
|
+
transitions:
|
|
69
|
+
new: [contacted, unqualified]
|
|
70
|
+
contacted: [qualified, unqualified]
|
|
71
|
+
qualified: [converted, unqualified]
|
|
72
|
+
unqualified: [contacted]
|
|
73
|
+
converted: []
|
|
48
74
|
|
|
49
75
|
lead_source:
|
|
50
76
|
type: select
|
|
51
77
|
options:
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
78
|
+
- label: Web
|
|
79
|
+
value: web
|
|
80
|
+
- label: Referral
|
|
81
|
+
value: referral
|
|
82
|
+
- label: Trade Show
|
|
83
|
+
value: trade_show
|
|
84
|
+
- label: Partner
|
|
85
|
+
value: partner
|
|
86
|
+
- label: Advertisement
|
|
87
|
+
value: advertisement
|
|
88
|
+
- label: Other
|
|
89
|
+
value: other
|
|
58
90
|
label: Lead Source
|
|
59
91
|
index: true
|
|
92
|
+
ai_context:
|
|
93
|
+
intent: "Original source of the lead for campaign attribution"
|
|
60
94
|
|
|
61
95
|
rating:
|
|
62
96
|
type: select
|
|
63
97
|
options:
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
-
|
|
98
|
+
- label: Hot
|
|
99
|
+
value: hot
|
|
100
|
+
- label: Warm
|
|
101
|
+
value: warm
|
|
102
|
+
- label: Cold
|
|
103
|
+
value: cold
|
|
67
104
|
label: Lead Rating
|
|
68
105
|
index: true
|
|
106
|
+
ai_context:
|
|
107
|
+
intent: "Engagement level and conversion potential"
|
|
108
|
+
selection_guidance: "Hot for high-interest prospects; Warm for engaged; Cold for low priority"
|
|
69
109
|
|
|
70
110
|
owner:
|
|
71
111
|
type: lookup
|
|
72
112
|
reference_to: user
|
|
73
113
|
label: Lead Owner
|
|
74
114
|
index: true
|
|
115
|
+
ai_context:
|
|
116
|
+
intent: "Sales representative responsible for qualifying this lead"
|
|
117
|
+
semantic_type: ownership
|
|
75
118
|
|
|
76
119
|
industry:
|
|
77
120
|
type: select
|
|
78
121
|
options:
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
-
|
|
122
|
+
- label: Technology
|
|
123
|
+
value: technology
|
|
124
|
+
- label: Finance
|
|
125
|
+
value: finance
|
|
126
|
+
- label: Healthcare
|
|
127
|
+
value: healthcare
|
|
128
|
+
- label: Manufacturing
|
|
129
|
+
value: manufacturing
|
|
130
|
+
- label: Retail
|
|
131
|
+
value: retail
|
|
132
|
+
- label: Education
|
|
133
|
+
value: education
|
|
134
|
+
- label: Other
|
|
135
|
+
value: other
|
|
86
136
|
label: Industry
|
|
137
|
+
ai_context:
|
|
138
|
+
intent: "Industry sector for lead segmentation"
|
|
87
139
|
|
|
88
140
|
annual_revenue:
|
|
89
141
|
type: currency
|
|
@@ -105,16 +157,25 @@ fields:
|
|
|
105
157
|
type: lookup
|
|
106
158
|
reference_to: crm_account
|
|
107
159
|
label: Converted Account
|
|
160
|
+
ai_context:
|
|
161
|
+
intent: "Account created from lead conversion"
|
|
162
|
+
semantic_type: association
|
|
108
163
|
|
|
109
164
|
converted_contact:
|
|
110
165
|
type: lookup
|
|
111
166
|
reference_to: crm_contact
|
|
112
167
|
label: Converted Contact
|
|
168
|
+
ai_context:
|
|
169
|
+
intent: "Contact created from lead conversion"
|
|
170
|
+
semantic_type: association
|
|
113
171
|
|
|
114
172
|
converted_opportunity:
|
|
115
173
|
type: lookup
|
|
116
174
|
reference_to: crm_opportunity
|
|
117
175
|
label: Converted Opportunity
|
|
176
|
+
ai_context:
|
|
177
|
+
intent: "Opportunity created from lead conversion"
|
|
178
|
+
semantic_type: association
|
|
118
179
|
|
|
119
180
|
indexes:
|
|
120
181
|
# For lead pipeline
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
+
# File: crm_opportunity.object.yml
|
|
2
|
+
# Object name is inferred from filename as 'crm_opportunity'
|
|
1
3
|
label: Opportunity
|
|
2
4
|
description: Sales opportunity or deal
|
|
3
5
|
icon: currency-line
|
|
4
6
|
|
|
7
|
+
ai_context:
|
|
8
|
+
intent: "Track and manage active sales opportunities through the pipeline"
|
|
9
|
+
domain: customer_relationship_management
|
|
10
|
+
aliases: [opportunity, deal, sales opportunity]
|
|
11
|
+
common_queries:
|
|
12
|
+
- "Show my open opportunities"
|
|
13
|
+
- "Find opportunities closing this quarter"
|
|
14
|
+
- "List high-value deals by stage"
|
|
15
|
+
|
|
5
16
|
fields:
|
|
6
17
|
name:
|
|
7
18
|
type: text
|
|
8
19
|
required: true
|
|
9
20
|
label: Opportunity Name
|
|
10
21
|
index: true
|
|
22
|
+
ai_context:
|
|
23
|
+
intent: "Descriptive name of the sales opportunity"
|
|
11
24
|
|
|
12
25
|
account:
|
|
13
26
|
type: lookup
|
|
@@ -15,6 +28,9 @@ fields:
|
|
|
15
28
|
label: Account
|
|
16
29
|
required: true
|
|
17
30
|
index: true
|
|
31
|
+
ai_context:
|
|
32
|
+
intent: "Customer organization for this opportunity"
|
|
33
|
+
semantic_type: hierarchy
|
|
18
34
|
|
|
19
35
|
amount:
|
|
20
36
|
type: currency
|
|
@@ -29,16 +45,33 @@ fields:
|
|
|
29
45
|
|
|
30
46
|
stage:
|
|
31
47
|
type: select
|
|
48
|
+
label: Sales Stage
|
|
32
49
|
options:
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
50
|
+
- label: Prospecting
|
|
51
|
+
value: prospecting
|
|
52
|
+
- label: Qualification
|
|
53
|
+
value: qualification
|
|
54
|
+
- label: Proposal
|
|
55
|
+
value: proposal
|
|
56
|
+
- label: Negotiation
|
|
57
|
+
value: negotiation
|
|
58
|
+
- label: Closed Won
|
|
59
|
+
value: closed_won
|
|
60
|
+
- label: Closed Lost
|
|
61
|
+
value: closed_lost
|
|
39
62
|
defaultValue: prospecting
|
|
40
63
|
required: true
|
|
41
64
|
index: true
|
|
65
|
+
ai_context:
|
|
66
|
+
intent: "Current stage in the sales pipeline"
|
|
67
|
+
is_state_machine: true
|
|
68
|
+
transitions:
|
|
69
|
+
prospecting: [qualification, closed_lost]
|
|
70
|
+
qualification: [proposal, closed_lost]
|
|
71
|
+
proposal: [negotiation, closed_lost]
|
|
72
|
+
negotiation: [closed_won, closed_lost]
|
|
73
|
+
closed_won: []
|
|
74
|
+
closed_lost: []
|
|
42
75
|
|
|
43
76
|
probability:
|
|
44
77
|
type: percent
|
|
@@ -49,23 +82,37 @@ fields:
|
|
|
49
82
|
type:
|
|
50
83
|
type: select
|
|
51
84
|
options:
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
85
|
+
- label: New Business
|
|
86
|
+
value: new_business
|
|
87
|
+
- label: Existing Customer
|
|
88
|
+
value: existing_customer
|
|
89
|
+
- label: Renewal
|
|
90
|
+
value: renewal
|
|
55
91
|
label: Opportunity Type
|
|
56
92
|
index: true
|
|
93
|
+
ai_context:
|
|
94
|
+
intent: "Categorize revenue type for forecasting"
|
|
95
|
+
selection_guidance: "New Business for new customers; Renewal for contract renewals"
|
|
57
96
|
|
|
58
97
|
lead_source:
|
|
59
98
|
type: select
|
|
60
99
|
options:
|
|
61
|
-
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
|
|
100
|
+
- label: Web
|
|
101
|
+
value: web
|
|
102
|
+
- label: Referral
|
|
103
|
+
value: referral
|
|
104
|
+
- label: Trade Show
|
|
105
|
+
value: trade_show
|
|
106
|
+
- label: Partner
|
|
107
|
+
value: partner
|
|
108
|
+
- label: Cold Call
|
|
109
|
+
value: cold_call
|
|
110
|
+
- label: Other
|
|
111
|
+
value: other
|
|
67
112
|
label: Lead Source
|
|
68
113
|
index: true
|
|
114
|
+
ai_context:
|
|
115
|
+
intent: "Original source for ROI tracking"
|
|
69
116
|
|
|
70
117
|
owner:
|
|
71
118
|
type: lookup
|
|
@@ -73,6 +120,9 @@ fields:
|
|
|
73
120
|
label: Opportunity Owner
|
|
74
121
|
required: true
|
|
75
122
|
index: true
|
|
123
|
+
ai_context:
|
|
124
|
+
intent: "Sales representative managing this opportunity"
|
|
125
|
+
semantic_type: ownership
|
|
76
126
|
|
|
77
127
|
next_step:
|
|
78
128
|
type: text
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
+
# File: finance_budget.object.yml
|
|
2
|
+
# Object name is inferred from filename as 'finance_budget'
|
|
1
3
|
label: Budget
|
|
2
4
|
description: Department or project budget
|
|
3
5
|
icon: pie-chart-line
|
|
4
6
|
|
|
7
|
+
ai_context:
|
|
8
|
+
intent: "Track and manage departmental and project budgets"
|
|
9
|
+
domain: financial_management
|
|
10
|
+
aliases: [budget, allocation, financial plan]
|
|
11
|
+
common_queries:
|
|
12
|
+
- "Show budgets by fiscal year"
|
|
13
|
+
- "Find department budgets with remaining balance"
|
|
14
|
+
- "List active budgets by category"
|
|
15
|
+
|
|
5
16
|
fields:
|
|
6
17
|
name:
|
|
7
18
|
type: text
|
|
8
19
|
required: true
|
|
9
20
|
label: Budget Name
|
|
10
21
|
index: true
|
|
22
|
+
ai_context:
|
|
23
|
+
intent: "Descriptive name of the budget"
|
|
11
24
|
|
|
12
25
|
fiscal_year:
|
|
13
26
|
type: number
|
|
@@ -18,38 +31,63 @@ fields:
|
|
|
18
31
|
period:
|
|
19
32
|
type: select
|
|
20
33
|
options:
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
-
|
|
34
|
+
- label: Annual
|
|
35
|
+
value: annual
|
|
36
|
+
- label: Quarterly
|
|
37
|
+
value: quarterly
|
|
38
|
+
- label: Monthly
|
|
39
|
+
value: monthly
|
|
24
40
|
defaultValue: annual
|
|
25
41
|
index: true
|
|
42
|
+
ai_context:
|
|
43
|
+
intent: "Budget period duration for planning cycles"
|
|
44
|
+
selection_guidance: "Annual for yearly planning; Quarterly for shorter cycles"
|
|
26
45
|
|
|
27
46
|
department:
|
|
28
47
|
type: lookup
|
|
29
48
|
reference_to: hr_department
|
|
30
49
|
label: Department
|
|
31
50
|
index: true
|
|
51
|
+
ai_context:
|
|
52
|
+
intent: "Department this budget is allocated to"
|
|
53
|
+
semantic_type: association
|
|
32
54
|
|
|
33
55
|
project:
|
|
34
56
|
type: lookup
|
|
35
57
|
reference_to: project_project
|
|
36
58
|
label: Project
|
|
37
59
|
index: true
|
|
60
|
+
ai_context:
|
|
61
|
+
intent: "Project this budget is allocated to"
|
|
62
|
+
semantic_type: association
|
|
38
63
|
|
|
39
64
|
category:
|
|
40
65
|
type: select
|
|
41
66
|
options:
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
67
|
+
- label: Travel
|
|
68
|
+
value: travel
|
|
69
|
+
- label: Meals
|
|
70
|
+
value: meals
|
|
71
|
+
- label: Office Supplies
|
|
72
|
+
value: office_supplies
|
|
73
|
+
- label: Software
|
|
74
|
+
value: software
|
|
75
|
+
- label: Marketing
|
|
76
|
+
value: marketing
|
|
77
|
+
- label: Utilities
|
|
78
|
+
value: utilities
|
|
79
|
+
- label: Rent
|
|
80
|
+
value: rent
|
|
81
|
+
- label: Training
|
|
82
|
+
value: training
|
|
83
|
+
- label: Salaries
|
|
84
|
+
value: salaries
|
|
85
|
+
- label: Other
|
|
86
|
+
value: other
|
|
52
87
|
index: true
|
|
88
|
+
ai_context:
|
|
89
|
+
intent: "Expense category for budget allocation"
|
|
90
|
+
selection_guidance: "Match to common expense categories for tracking"
|
|
53
91
|
|
|
54
92
|
allocated_amount:
|
|
55
93
|
type: currency
|
|
@@ -79,16 +117,29 @@ fields:
|
|
|
79
117
|
status:
|
|
80
118
|
type: select
|
|
81
119
|
options:
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
-
|
|
120
|
+
- label: Draft
|
|
121
|
+
value: draft
|
|
122
|
+
- label: Active
|
|
123
|
+
value: active
|
|
124
|
+
- label: Closed
|
|
125
|
+
value: closed
|
|
85
126
|
defaultValue: draft
|
|
86
127
|
index: true
|
|
128
|
+
ai_context:
|
|
129
|
+
intent: "Current state of budget lifecycle"
|
|
130
|
+
is_state_machine: true
|
|
131
|
+
transitions:
|
|
132
|
+
draft: [active]
|
|
133
|
+
active: [closed]
|
|
134
|
+
closed: []
|
|
87
135
|
|
|
88
136
|
owner:
|
|
89
137
|
type: lookup
|
|
90
138
|
reference_to: user
|
|
91
139
|
label: Budget Owner
|
|
140
|
+
ai_context:
|
|
141
|
+
intent: "Person responsible for managing this budget"
|
|
142
|
+
semantic_type: ownership
|
|
92
143
|
|
|
93
144
|
notes:
|
|
94
145
|
type: textarea
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
# File: finance_expense.object.yml
|
|
2
|
+
# Object name is inferred from filename as 'finance_expense'
|
|
1
3
|
label: Expense
|
|
2
4
|
description: Company expense record
|
|
3
5
|
icon: wallet-line
|
|
4
6
|
|
|
7
|
+
ai_context:
|
|
8
|
+
intent: "Track and manage employee expense claims and reimbursements"
|
|
9
|
+
domain: financial_management
|
|
10
|
+
aliases: [expense, expense claim, reimbursement]
|
|
11
|
+
common_queries:
|
|
12
|
+
- "Show pending expense approvals"
|
|
13
|
+
- "Find expenses by employee"
|
|
14
|
+
- "List expenses by category and date"
|
|
15
|
+
|
|
5
16
|
fields:
|
|
6
17
|
expense_number:
|
|
7
18
|
type: text
|
|
@@ -16,6 +27,9 @@ fields:
|
|
|
16
27
|
label: Employee
|
|
17
28
|
required: true
|
|
18
29
|
index: true
|
|
30
|
+
ai_context:
|
|
31
|
+
intent: "Employee who incurred this expense"
|
|
32
|
+
semantic_type: association
|
|
19
33
|
|
|
20
34
|
expense_date:
|
|
21
35
|
type: date
|
|
@@ -26,17 +40,29 @@ fields:
|
|
|
26
40
|
category:
|
|
27
41
|
type: select
|
|
28
42
|
options:
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
-
|
|
43
|
+
- label: Travel
|
|
44
|
+
value: travel
|
|
45
|
+
- label: Meals
|
|
46
|
+
value: meals
|
|
47
|
+
- label: Office Supplies
|
|
48
|
+
value: office_supplies
|
|
49
|
+
- label: Software
|
|
50
|
+
value: software
|
|
51
|
+
- label: Marketing
|
|
52
|
+
value: marketing
|
|
53
|
+
- label: Utilities
|
|
54
|
+
value: utilities
|
|
55
|
+
- label: Rent
|
|
56
|
+
value: rent
|
|
57
|
+
- label: Training
|
|
58
|
+
value: training
|
|
59
|
+
- label: Other
|
|
60
|
+
value: other
|
|
38
61
|
required: true
|
|
39
62
|
index: true
|
|
63
|
+
ai_context:
|
|
64
|
+
intent: "Expense category for budget tracking"
|
|
65
|
+
selection_guidance: "Choose category matching budget allocations"
|
|
40
66
|
|
|
41
67
|
amount:
|
|
42
68
|
type: currency
|
|
@@ -46,12 +72,19 @@ fields:
|
|
|
46
72
|
currency:
|
|
47
73
|
type: select
|
|
48
74
|
options:
|
|
49
|
-
- USD
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
-
|
|
75
|
+
- label: USD
|
|
76
|
+
value: USD
|
|
77
|
+
- label: EUR
|
|
78
|
+
value: EUR
|
|
79
|
+
- label: GBP
|
|
80
|
+
value: GBP
|
|
81
|
+
- label: CNY
|
|
82
|
+
value: CNY
|
|
83
|
+
- label: JPY
|
|
84
|
+
value: JPY
|
|
54
85
|
defaultValue: USD
|
|
86
|
+
ai_context:
|
|
87
|
+
intent: "Currency for international expense handling"
|
|
55
88
|
|
|
56
89
|
merchant:
|
|
57
90
|
type: text
|
|
@@ -69,19 +102,36 @@ fields:
|
|
|
69
102
|
status:
|
|
70
103
|
type: select
|
|
71
104
|
options:
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
-
|
|
105
|
+
- label: Draft
|
|
106
|
+
value: draft
|
|
107
|
+
- label: Submitted
|
|
108
|
+
value: submitted
|
|
109
|
+
- label: Approved
|
|
110
|
+
value: approved
|
|
111
|
+
- label: Rejected
|
|
112
|
+
value: rejected
|
|
113
|
+
- label: Reimbursed
|
|
114
|
+
value: reimbursed
|
|
77
115
|
defaultValue: draft
|
|
78
116
|
required: true
|
|
79
117
|
index: true
|
|
118
|
+
ai_context:
|
|
119
|
+
intent: "Current approval and payment state"
|
|
120
|
+
is_state_machine: true
|
|
121
|
+
transitions:
|
|
122
|
+
draft: [submitted]
|
|
123
|
+
submitted: [approved, rejected]
|
|
124
|
+
approved: [reimbursed]
|
|
125
|
+
rejected: [draft]
|
|
126
|
+
reimbursed: []
|
|
80
127
|
|
|
81
128
|
approved_by:
|
|
82
129
|
type: lookup
|
|
83
130
|
reference_to: user
|
|
84
131
|
label: Approved By
|
|
132
|
+
ai_context:
|
|
133
|
+
intent: "Manager who approved this expense"
|
|
134
|
+
semantic_type: association
|
|
85
135
|
|
|
86
136
|
approved_at:
|
|
87
137
|
type: datetime
|
|
@@ -96,11 +146,17 @@ fields:
|
|
|
96
146
|
reference_to: hr_department
|
|
97
147
|
label: Department
|
|
98
148
|
index: true
|
|
149
|
+
ai_context:
|
|
150
|
+
intent: "Department to charge this expense to"
|
|
151
|
+
semantic_type: association
|
|
99
152
|
|
|
100
153
|
project:
|
|
101
154
|
type: lookup
|
|
102
155
|
reference_to: project_project
|
|
103
156
|
label: Related Project
|
|
157
|
+
ai_context:
|
|
158
|
+
intent: "Project to charge this expense to"
|
|
159
|
+
semantic_type: association
|
|
104
160
|
|
|
105
161
|
indexes:
|
|
106
162
|
# For employee expense lookup
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
# File: finance_invoice.object.yml
|
|
2
|
+
# Object name is inferred from filename as 'finance_invoice'
|
|
1
3
|
label: Invoice
|
|
2
4
|
description: Customer invoice
|
|
3
5
|
icon: file-text-line
|
|
4
6
|
|
|
7
|
+
ai_context:
|
|
8
|
+
intent: "Manage customer invoices and payment tracking"
|
|
9
|
+
domain: financial_management
|
|
10
|
+
aliases: [invoice, bill, statement]
|
|
11
|
+
common_queries:
|
|
12
|
+
- "Show unpaid invoices"
|
|
13
|
+
- "Find overdue invoices by customer"
|
|
14
|
+
- "List invoices by status and due date"
|
|
15
|
+
|
|
5
16
|
fields:
|
|
6
17
|
invoice_number:
|
|
7
18
|
type: text
|
|
@@ -16,6 +27,9 @@ fields:
|
|
|
16
27
|
label: Customer Account
|
|
17
28
|
required: true
|
|
18
29
|
index: true
|
|
30
|
+
ai_context:
|
|
31
|
+
intent: "Customer being invoiced"
|
|
32
|
+
semantic_type: association
|
|
19
33
|
|
|
20
34
|
invoice_date:
|
|
21
35
|
type: date
|
|
@@ -61,36 +75,67 @@ fields:
|
|
|
61
75
|
status:
|
|
62
76
|
type: select
|
|
63
77
|
options:
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
78
|
+
- label: Draft
|
|
79
|
+
value: draft
|
|
80
|
+
- label: Sent
|
|
81
|
+
value: sent
|
|
82
|
+
- label: Partially Paid
|
|
83
|
+
value: partial_paid
|
|
84
|
+
- label: Paid
|
|
85
|
+
value: paid
|
|
86
|
+
- label: Overdue
|
|
87
|
+
value: overdue
|
|
88
|
+
- label: Cancelled
|
|
89
|
+
value: cancelled
|
|
70
90
|
defaultValue: draft
|
|
71
91
|
required: true
|
|
72
92
|
index: true
|
|
93
|
+
ai_context:
|
|
94
|
+
intent: "Current payment and delivery status"
|
|
95
|
+
is_state_machine: true
|
|
96
|
+
transitions:
|
|
97
|
+
draft: [sent, cancelled]
|
|
98
|
+
sent: [partial_paid, paid, overdue, cancelled]
|
|
99
|
+
partial_paid: [paid, overdue]
|
|
100
|
+
paid: []
|
|
101
|
+
overdue: [partial_paid, paid]
|
|
102
|
+
cancelled: []
|
|
73
103
|
|
|
74
104
|
payment_terms:
|
|
75
105
|
type: select
|
|
76
106
|
options:
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
-
|
|
107
|
+
- label: Net 15
|
|
108
|
+
value: net_15
|
|
109
|
+
- label: Net 30
|
|
110
|
+
value: net_30
|
|
111
|
+
- label: Net 60
|
|
112
|
+
value: net_60
|
|
113
|
+
- label: Net 90
|
|
114
|
+
value: net_90
|
|
115
|
+
- label: Due on Receipt
|
|
116
|
+
value: due_on_receipt
|
|
82
117
|
label: Payment Terms
|
|
118
|
+
ai_context:
|
|
119
|
+
intent: "Payment due date terms"
|
|
120
|
+
selection_guidance: "Net 30 is standard; adjust based on customer agreement"
|
|
83
121
|
|
|
84
122
|
currency:
|
|
85
123
|
type: select
|
|
86
124
|
options:
|
|
87
|
-
- USD
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
-
|
|
125
|
+
- label: USD
|
|
126
|
+
value: USD
|
|
127
|
+
- label: EUR
|
|
128
|
+
value: EUR
|
|
129
|
+
- label: GBP
|
|
130
|
+
value: GBP
|
|
131
|
+
- label: CNY
|
|
132
|
+
value: CNY
|
|
133
|
+
- label: JPY
|
|
134
|
+
value: JPY
|
|
92
135
|
defaultValue: USD
|
|
93
136
|
index: true
|
|
137
|
+
ai_context:
|
|
138
|
+
intent: "Invoice currency for international transactions"
|
|
94
139
|
|
|
95
140
|
billing_address:
|
|
96
141
|
type: textarea
|