OdooView class
The full Odoo View (Form / Tree / Kanban) model
Constructors
-
OdooView({required String id, required String name, required String model, required ViewType viewType, String? docModule, String? inheritId, List<
OdooField> topLevelFields = const [], List<OdooGroup> groups = const [], List<NotebookPage> pages = const [], bool? createButton, bool? deleteButton, bool? editButton, String? customCSS, bool editable = false, bool? decorationDanger, String? defaultOrder, bool? noCreate, String? kanbanClass, bool? quickCreate, String? groupBy, int priority = 16, required DateTime createdAt, required DateTime updatedAt}) -
const
-
OdooView.create({String? id, required String name, required String model, required ViewType viewType, String? docModule, List<
OdooField> ? fields, List<OdooGroup> ? groups}) -
Factory — creates a blank view
factory
-
OdooView.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
allFields
→ List<
OdooField> -
Flat list of ALL fields (top-level + inside groups + inside pages)
no setter
- createButton → bool?
-
final
- createdAt → DateTime
-
final
- customCSS → String?
-
final
- decorationDanger → bool?
-
final
- defaultOrder → String?
-
final
- deleteButton → bool?
-
final
- docModule → String?
-
final
- editable → bool
-
final
- editButton → bool?
-
final
-
fields
→ List<
OdooField> -
Alias for topLevelFields — convenience for tests and external code.
no setter
- groupBy → String?
-
final
-
groups
→ List<
OdooGroup> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
- inheritId → String?
-
final
- isEmpty → bool
-
no setter
- kanbanClass → String?
-
final
- model → String
-
final
- name → String
-
final
- noCreate → bool?
-
final
-
pages
→ List<
NotebookPage> -
final
- priority → int
-
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- quickCreate → bool?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - technicalId → String
-
no setter
-
topLevelFields
→ List<
OdooField> -
final
- updatedAt → DateTime
-
final
- viewType → ViewType
-
final
Methods
-
copyWith(
{String? id, String? name, String? model, ViewType? viewType, String? docModule, String? inheritId, List< OdooField> ? topLevelFields, List<OdooField> ? fields, List<OdooGroup> ? groups, List<NotebookPage> ? pages, bool? createButton, bool? deleteButton, bool? editButton, String? customCSS, bool? editable, bool? editableTree, String? defaultOrder, bool? noCreate, String? kanbanClass, bool? quickCreate, String? groupBy, int? priority}) → OdooView -
generateXml(
) → String - Full views.xml content for this single view
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited