|
1 | 1 | # OdooLS Error codes
|
2 |
| - |
3 |
| -# Nomenclature |
4 |
| - |
5 |
| -Error codes from OdooLS have the format "OLSXZZZZ". |
6 |
| - - "OLS" for OdooLS. |
7 |
| - - "X" indicates if the error code is an INFO(1), WARNING(2), ERROR(3) |
8 |
| - - "Z" is the UID of the error, starting from 0001. |
9 |
| - |
10 |
| - - 0100 are errors related to modules dependencies |
11 |
| - - 0200 are errors related to manifests |
12 |
| - - 0400 are errors related to XML |
13 |
| - |
14 |
| -## INFOs |
15 |
| - |
16 |
| -## WARNINGs |
17 |
| - |
18 |
| -### OLS20001 |
19 |
| - |
20 |
| -"XXXX not found". |
21 |
| -The symbol you are trying to import was not found. |
22 |
| -Check your python environment, the effective your sys.path and your addon paths. |
23 |
| - |
24 |
| -### OLS20002 |
25 |
| - |
26 |
| -"XXXX not found". |
27 |
| -The symbol you used as a base class can not be resolved. |
28 |
| -Be sure that the symbol is referring to a valid python class. |
29 |
| - |
30 |
| -### OLS20003 |
31 |
| - |
32 |
| -"XXXX not found". |
33 |
| -The symbol you used as a base class is not a class, or not evaluated to a class. |
34 |
| -Be sure that the symbol is referring to a valid python class. |
35 |
| - |
36 |
| -### OLS20004 |
37 |
| - |
38 |
| -"Failed to evaluate XXXX". |
39 |
| -The extension failed to evaluate a symbol. This occurs more specifically when the extension detect a loop in the imports. |
40 |
| -If your code is working fine, it can happen if you use too many "import *" that can break the extension flow for now. |
41 |
| - |
42 |
| -### OLS20005 |
43 |
| - |
44 |
| -"Multiple definition found for base class". |
45 |
| -The extension is unable to handle a base class that has multiple possible definitions. This warning should disappear in the future |
46 |
| - |
47 |
| -### OLS20006 |
48 |
| -"Deprecation Warning: Since 17.0: odoo.tests.common.Form is deprecated, use odoo.tests.Form" |
49 |
| -Form is no longer available on odoo.tests.common, thus it should not be imported from there. |
50 |
| - |
51 |
| -### OLS20201 |
52 |
| - |
53 |
| -"The active key is deprecated". |
54 |
| -Deprecation warning |
55 |
| - |
56 |
| -## ERRORs |
57 |
| - |
58 |
| -### OLS30001 |
59 |
| - |
60 |
| -Unable to parse file. Ruff_python_parser was unable to parse the file content. |
61 |
| -See the error message to get the details from Ruff |
62 |
| - |
63 |
| -### OLS30002 |
64 |
| - |
65 |
| -"Non-static method should have at least one parameter" |
66 |
| - |
67 |
| -### OLS30101 |
68 |
| - |
69 |
| -"This model is not in the dependencies of your module." |
70 |
| -With the Environment (often via self.env), or in @api.returns, you are trying to get a recordset of a model that is not defined in the current module or in the dependencies of the current module. |
71 |
| -Even if it could work, this is strongly not recommended, as the model you are referring to could be not available on a live database. |
72 |
| -Do not forget that even if your model is in an auto-installed module, it can be uninstalled by a user. |
73 |
| - |
74 |
| -### OLS30102 |
75 |
| - |
76 |
| -"Unknown model. Check your addons path" |
77 |
| -With the Environment (often via self.env), or in @api.returns, you are trying to get a recordset of a model that is unknown by OdooLS. It means that if the model exists in the codebase, OdooLS |
78 |
| -is not aware of it. Check the addons path you provided to be sure that the module declaring this model is in an addon path. |
79 |
| - |
80 |
| -### OLS30103 |
81 |
| - |
82 |
| -"XXXX is not in the dependencies of the module" |
83 |
| -The symbol you are importing is in a module that is not in the dependencies of the current module. |
84 |
| -You should check the dependencies in the \_\_manifest\_\_.py file of your module. |
85 |
| - |
86 |
| -### OLS30104 |
87 |
| - |
88 |
| -"Model is inheriting from a model not declared in the dependencies of the module. Check the manifest." |
89 |
| -The declared model is specifying an inheritance to a model that is not declared in the visible modules by the current one. |
90 |
| -Consider updating the manifest of your module to include the relevant module. |
91 |
| - |
92 |
| -### OLS30105 |
93 |
| - |
94 |
| -"This model is inherited, but never declared." |
95 |
| - |
96 |
| -The extension found some classes inheriting this model, but didn't find any class that declare it first, with only a _name. |
97 |
| - |
98 |
| -### OLS30201 |
99 |
| - |
100 |
| -"A manifest should contain exactly one dictionary". |
101 |
| -A \_\_manifest\_\_.py file should be evaluated with a literal_eval to a single dictionary. Do not store any other information in it. |
102 |
| - |
103 |
| -### OLS30202 |
104 |
| -"A manifest should not have duplicate keys". |
105 |
| -A \_\_manifest\_\_.py dictionary should have at most one definition per key |
106 |
| - |
107 |
| -### OLS30203 |
108 |
| -"The name of the module should be a string" |
109 |
| -The name key on the \_\_manifest\_\_.py should be a string |
110 |
| - |
111 |
| -### OLS30204 |
112 |
| -"The depends value should be a list" |
113 |
| -"depends" value in module manifest should be a list |
114 |
| - |
115 |
| -### OLS30205 |
116 |
| -"The depends key should be a list of strings" |
117 |
| -Values in the manifest's "depends" list should be strings |
118 |
| - |
119 |
| -### OLS30206 |
120 |
| -"A module cannot depends on itself" |
121 |
| -A module cannot have its own name as a dependency in its manifest |
122 |
| - |
123 |
| -### OLS30207 |
124 |
| -"The data value should be a list" |
125 |
| -"data" value in module manifest should be a list |
126 |
| - |
127 |
| -### OLS30208 |
128 |
| -"The data key should be a list of strings" |
129 |
| -Values in the manifest's "data" list should be strings |
130 |
| - |
131 |
| -### OLS30209 |
132 |
| -"Manifest keys should be strings" |
133 |
| -Keys of the dictionary in manifest files have to be string literals |
134 |
| - |
135 |
| -### OLS30210 |
136 |
| -"Module `{module_name}` depends on `{wrong_dependency}` which is not found. Please review your addons paths" |
137 |
| -Module has dependency on a dependency that is either wrong or does not exist. Check that module folder exists, and it contains `__init__.py` and `__manifest__.py` |
138 |
| - |
139 |
| -### OLS30302 |
140 |
| - |
141 |
| -"Do not use dict unpacking to build your manifest". |
142 |
| -Dict unpacking should be avoided. Do not create a dictionary with values that must be unpacked like in ```{"a";1, **d}``` |
143 |
| - |
144 |
| -### OLS30303 |
145 |
| - |
146 |
| -"The name of the module should be a string". |
147 |
| -String parsing error |
148 |
| - |
149 |
| -### OLS30304 |
150 |
| - |
151 |
| -"The depends value should be a list". |
152 |
| -list parsing error |
153 |
| - |
154 |
| -### OLS30305 |
155 |
| - |
156 |
| -"The depends key should be a list of strings". |
157 |
| -list parsing error |
158 |
| - |
159 |
| -### OLS30306 |
160 |
| - |
161 |
| -"A module cannot depends on itself". |
162 |
| -Do not add the current module name in the depends list. |
163 |
| - |
164 |
| -### OLS30307 |
165 |
| - |
166 |
| -"The data value should be a list". |
167 |
| -list parsing error |
168 |
| - |
169 |
| -### OLS30308 |
170 |
| - |
171 |
| -"The data key should be a list of strings". |
172 |
| -list parsing error |
173 |
| - |
174 |
| -### OLS30309 |
175 |
| - |
176 |
| -"Manifest keys should be strings". |
177 |
| -key parsing error |
178 |
| - |
179 |
| -### OLS30310 |
180 |
| - |
181 |
| -"Module XXXX depends on YYYY which is not found. Please review your addons paths". |
182 |
| -The module XXXX create a dependency on YYYY, but this module is not found with the current addon path. |
183 |
| - |
184 |
| -### OLS30311 |
185 |
| -"First Argument to super must be a class" |
186 |
| - |
187 |
| -### OLS30312 |
188 |
| -"Super calls outside a class scope must have at least one argument" |
189 |
| - |
190 |
| -### OLS30313 |
191 |
| - |
192 |
| -"Domains should be a list of tuples". |
193 |
| -The provided domain is not a list of tuples. A domain should be in the form [("field", "operator", "value")] |
194 |
| - |
195 |
| -### OLS30314 |
196 |
| - |
197 |
| -"Domain tuple should have 3 elements". |
198 |
| -Tuples in a domain should contains 3 elements: ("field", "operator", "value") |
199 |
| - |
200 |
| -### OLS30315 |
201 |
| - |
202 |
| -"XXX takes Y positional arguments but Z was given". |
203 |
| -Number of positional arguments given as parameter to the function is wrong. |
204 |
| - |
205 |
| -### OLS30316 |
206 |
| - |
207 |
| -"XXX got an unexpected keyword argument 'YYY'". |
208 |
| -You gave a named parameter that is not present in the function definition. |
209 |
| - |
210 |
| -### OLS30317 |
211 |
| - |
212 |
| -"A String value in tuple should contains '&', '|' or '!'". |
213 |
| -You gave a named parameter that is not present in the function definition. |
214 |
| - |
215 |
| -### OLS30318 |
216 |
| - |
217 |
| -"Invalid comparison operator". |
218 |
| -Tuples in search domains should be of one of these values: |
219 |
| -"=", "!=", ">", ">=", "<", "<=", "=?", "=like", "like", "not like", "ilike", "not ilike", "=ilike", "in", "not in", "child_of", "parent_of", "any", "not any" |
220 |
| - |
221 |
| -### OLS30319 |
222 |
| - |
223 |
| -"Missing tuple after a search domain operator". |
224 |
| -If you use a search domain operator (&, ! or |), they should be followed by tuples or lists. |
225 |
| - |
226 |
| -### OLS30320 |
227 |
| - |
228 |
| -"Invalid search domain field: XXX is not a member of YYY". |
229 |
| -In a search domain, the first element of a tuple must be a member of the model, or of any model in a relation if expression contains "." (see documentation) |
230 |
| - |
231 |
| -### OLS30321 |
232 |
| - |
233 |
| -"Invalid search domain field: Unknown date granularity". |
234 |
| -In a search domain, when using a dot separator on a Date field, you can use the following granularities to access part of the date: |
235 |
| -"year_number", "quarter_number", "month_number", "iso_week_number", "day_of_week", "day_of_month", "day_of_year", "hour_number", "minute_number", "second_number" |
236 |
| - |
237 |
| -### OLS30322 |
238 |
| - |
239 |
| -"Invalid search domain field: Invalid dot notation". |
240 |
| -In a search domain, when using a dot separator, it should be used either on a Date or Relational field. |
241 |
| -If you used a relational field and get this error, check that the comodel of this field is valid. |
242 |
| - |
243 |
| -### OLS30323 |
244 |
| -"Field does not exist on model or not in dependencies" |
245 |
| -In related keyword argument or decorators api.onchange/depends/constrains, the field provided |
246 |
| -should exist and be able to be resolved from current module |
247 |
| - |
248 |
| -### OLS30324 |
249 |
| -"Field comodel_name not in dependencies" |
250 |
| -In relational fields, comodel_name supplied exists but not in dependencies |
251 |
| - |
252 |
| -### OLS30325 |
253 |
| -"Field comodel_name does not exist" |
254 |
| -In relational fields, comodel_name does not exist in current configuration |
255 |
| - |
256 |
| -### OLS30326 |
257 |
| -"Related field is not of the same type" |
258 |
| -Type of references field in related keyword argument does not match the current field |
259 |
| - |
260 |
| -### OLS30327 |
261 |
| -"Method does not exist on current model" |
262 |
| -For compute, search, inverse arguments, this error is shown when the method is not found on the current model |
263 |
| - |
264 |
| -### OLS30328 |
265 |
| -"Compute method not set to modify this field" |
266 |
| -The compute method is set to modify a certain field(s). |
267 |
| -Consider marking the modified field with the compute method |
268 |
| - |
269 |
| -### OLS30329 |
270 |
| -"Unknown XML ID" |
271 |
| -The XML ID you referenced has not been found in any XML in this module or its dependencies |
272 |
| - |
273 |
| -### OLS30330 |
274 |
| -"Unspecified module. Add the module name before the XML ID: 'module.xml_id'" |
275 |
| -You provided an XML ID that has no module specified. Specify the module which XML_ID belong to with 'module.xml_id' |
276 |
| - |
277 |
| -### OLS30331 |
278 |
| -"Unknown module" |
279 |
| -The given module is unknown |
280 |
| - |
281 |
| -### OLS30400 |
282 |
| -"Invalid attribute" |
283 |
| -odoo, openerp and data nodes can not contain this attribute. |
284 |
| - |
285 |
| -### OLS30401 |
286 |
| -"Invalid node tag" |
287 |
| -This tag is invalid |
288 |
| - |
289 |
| -### OLS30402 |
290 |
| -"menuitem node must contains an id attribute" |
291 |
| - |
292 |
| -### OLS30403 |
293 |
| -"Invalid attribute in menuitem node" |
294 |
| -This attribute is not valid in a menuitem node |
295 |
| - |
296 |
| -### OLS30404 |
297 |
| -"Sequence attribute must be a string representing a number" |
298 |
| - |
299 |
| -### OLS30405 |
300 |
| -"SubmenuItem is not allowed when action and parent attributes are defined on a menuitem" |
301 |
| - |
302 |
| -### OLS30406 |
303 |
| -"web_icon attribute is not allowed when parent is specified" |
304 |
| - |
305 |
| -### OLS30407 |
306 |
| -"Invalid child node in menuitem" |
307 |
| - |
308 |
| -### OLS30408 |
309 |
| -"parent attribute is not allowed in submenuitems" |
310 |
| - |
311 |
| -### OLS30409 - OLS30443 |
312 |
| -"Various errors of RNG validation of XML files" |
313 |
| - |
314 |
| -### OLS30445 |
315 |
| -"Data file not found in the module" |
316 |
| - |
317 |
| -### OLS30446 |
318 |
| -"Data file should be an XML or a CSV file" |
319 |
| - |
320 |
| -### OLS30447 |
321 |
| -"XML ID should not contain more than one dot" |
322 |
| -An XML_ID should be in the format 'xml_id' or 'module.xml_id', but can't contains more dots |
| 2 | +OdooLS errors are now defined in their own modules, with the codes being available in [the diagnostics codes list file](src\core\diagnostic_codes_list.rs) |
0 commit comments