@bergetai/odoo-cli 0.15.1 → 0.15.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/dist/cli.js CHANGED
@@ -108,7 +108,7 @@ Examples:
108
108
  .option("--team <name|id>", "filter by sales team (resolved by name)")
109
109
  .option("--assignee <name|id>", "filter by salesperson (login, email, or name)")
110
110
  .option("--tag <name|id>", "filter by tag; repeatable, AND-ed", collect, [])
111
- .option("--priority <level>", "filter by priority: low, medium, high, urgent")
111
+ .option("--priority <level>", "filter by priority: low, medium, high, very-high")
112
112
  .option("--type <lead|opportunity>", "filter by record type (default: all)")
113
113
  .option("--filter <f=v>", "equality filter; repeatable, AND-ed", collect, [])
114
114
  .option("--domain <json>", "Odoo domain as a JSON array (mutually exclusive with --filter)")
@@ -357,7 +357,7 @@ Examples:
357
357
  .option("--stage <name|id>", "filter by stage (resolved within --team when given)")
358
358
  .option("--assignee <name|id>", "filter by assignee (login, email, or name)")
359
359
  .option("--tag <name|id>", "filter by tag; repeatable, AND-ed", collect, [])
360
- .option("--priority <level>", "filter by priority: low, medium, high, urgent")
360
+ .option("--priority <level>", "filter by priority: low, medium, high, very-high")
361
361
  .option("--open", "only tickets in unfolded (open) stages — see note below")
362
362
  .option("--closed", "only tickets in folded (closed) stages — see note below")
363
363
  .option("--filter <f=v>", "equality filter; repeatable, AND-ed", collect, [])
@@ -91,7 +91,7 @@ const crmLeadsMutation = {
91
91
  flags: "--priority <level>",
92
92
  option: "priority",
93
93
  field: "priority",
94
- help: "Priority: low|medium|high|urgent",
94
+ help: "Priority: low|medium|high|very-high",
95
95
  parse: parsePriorityFlag,
96
96
  },
97
97
  {
@@ -84,7 +84,7 @@ const helpdeskTicketsMutation = {
84
84
  flags: "--priority <level>",
85
85
  option: "priority",
86
86
  field: "priority",
87
- help: "Priority: low|medium|high|urgent",
87
+ help: "Priority: low|medium|high|very-high",
88
88
  parse: parsePriorityFlag,
89
89
  },
90
90
  {
@@ -197,7 +197,7 @@ export async function createTaskCommand(opts, globals) {
197
197
  * three ways that make a custom command cleaner than engine surgery:
198
198
  * - assignee is user_ids (many2many), not user_id (many2one)
199
199
  * - priority is a 2-value selection (0/Low, 1/High), not the engine's
200
- * hardcoded low/medium/high/urgent map
200
+ * hardcoded low/medium/high/very-high map
201
201
  * - stages scope via project_ids (many2many) on project.task.type, not
202
202
  * team_id/team_ids
203
203
  * The resolution/ordering mirrors listCommand (resource.ts) and the project
package/dist/resource.js CHANGED
@@ -10,13 +10,15 @@ export const PRIORITY_VALUES = {
10
10
  low: "0",
11
11
  medium: "1",
12
12
  high: "2",
13
- urgent: "3",
13
+ "very-high": "3",
14
+ "very high": "3",
15
+ urgent: "3", // legacy alias for very-high
14
16
  };
15
17
  /** Parse a --priority flag value into its raw Odoo selection value (§4.5). */
16
18
  export function parsePriority(raw, flag = "--priority") {
17
- const v = PRIORITY_VALUES[raw];
19
+ const v = PRIORITY_VALUES[raw.toLowerCase()];
18
20
  if (v === undefined) {
19
- throw usageError(`invalid ${flag} ${JSON.stringify(raw)}`, "expected one of: low, medium, high, urgent");
21
+ throw usageError(`invalid ${flag} ${JSON.stringify(raw)}`, "expected one of: low, medium, high, very-high");
20
22
  }
21
23
  return v;
22
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bergetai/odoo-cli",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "Agent-first CLI for the Odoo External API",
5
5
  "publishConfig": {
6
6
  "access": "public"