File size: 40,847 Bytes
4cfab62
e174d2c
19aed6d
4cfab62
 
8133df9
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
2e7e617
 
 
 
 
 
 
 
4cfab62
 
 
23088ad
4cfab62
 
 
 
 
 
 
 
 
 
8133df9
4cfab62
 
 
 
23088ad
4cfab62
 
f530297
4cfab62
 
8133df9
4cfab62
 
 
 
 
 
 
8133df9
4cfab62
 
 
 
 
 
 
8133df9
4cfab62
23088ad
4cfab62
 
 
 
 
8133df9
4cfab62
23088ad
4cfab62
 
 
 
 
8133df9
4cfab62
23088ad
4cfab62
 
 
 
 
8133df9
4cfab62
 
 
 
 
 
23088ad
8133df9
23088ad
 
 
19aed6d
23088ad
 
 
82cdb59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
23088ad
4cfab62
 
 
 
 
 
23088ad
 
4cfab62
 
 
 
 
 
 
23088ad
4cfab62
 
f530297
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
07a68d0
4cfab62
 
 
07a68d0
4cfab62
 
 
8873406
4cfab62
 
 
07a68d0
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
07a68d0
4cfab62
 
 
 
 
 
 
07a68d0
4cfab62
 
 
 
 
 
 
07a68d0
4cfab62
 
 
 
 
 
 
07a68d0
4cfab62
 
 
 
 
 
 
 
 
 
 
 
23088ad
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dec006b
 
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
23088ad
 
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
816fa8a
 
8133df9
 
816fa8a
8133df9
816fa8a
 
 
 
 
8133df9
816fa8a
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
4cfab62
b35f959
 
 
 
 
 
 
 
816fa8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23088ad
4cfab62
72b6f27
4cfab62
72b6f27
07a68d0
 
4cfab62
 
 
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
 
 
72b6f27
4cfab62
 
 
72b6f27
 
4cfab62
 
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfab62
23088ad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8510233
 
 
 
 
 
 
 
 
 
 
fba6beb
8510233
fba6beb
149aa87
 
4cfab62
 
 
 
 
 
 
 
 
 
 
f530297
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dec006b
4cfab62
 
 
 
 
 
f530297
 
816fa8a
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e174d2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1deb519
4cfab62
 
 
 
 
 
 
1deb519
4cfab62
 
 
 
 
 
 
1deb519
4cfab62
 
 
 
 
 
 
 
 
 
 
 
 
1deb519
4cfab62
 
 
 
 
 
 
 
 
 
 
 
23088ad
 
 
 
 
 
 
 
4cfab62
 
 
 
 
72b6f27
4cfab62
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
72b6f27
4cfab62
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
72b6f27
4cfab62
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
72b6f27
4cfab62
 
 
 
 
72b6f27
4cfab62
 
 
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
72b6f27
b35f959
 
 
 
 
 
 
72b6f27
4cfab62
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
{
  "_comment": "CANONICAL field contract for the AIOS Airtable-style grid — the SINGLE source of truth. Consumed by platform/aios_grid.py (embed/Space host) and aios-web/api/main.py (standalone API), and regenerated into aios-web/web/public/sample_customers.json. Edit HERE only, then run aios-web/verify_fields_contract.py. source=odoo is READ-ONLY; source=overlay is the editable stratum (notes/tags) outside Odoo. type in {text,status,select,multiselect,currency,int,date,pct,url} (select = a fixed-choice READ-ONLY brand attribute; dba is the first, wave 2026-08-02. multiselect = one cell holding a comma-joined SET, so a choice list offers the MEMBERS, not the joined string; customer tags and product supplier are the first, wave 40 W40-T06. url = a link cell, GridCellKind.Uri, drawn by cells.ts and opened by CustomerGrid's scheme-guarded click path; maps_url is the first, wave 40 W40-T08). W40-T08 also adds created_on, the uniform records-created DATE column every database carries (owner I24). It is a plain date field and NOT the created_time TYPE on purpose: created_time renders the row-level _created datum and its value never lives at the field's own key, so it is invisible to the semantic topic, to a stored-cell read and to any host-side export, while a date field is an ordinary cell that all three can see. The _created datum still rides every row for a created_time column a user creates. `description` (wave 5) is the CANONICAL per-field description — every field must carry one, and since wave 7 (owner W8, 2026-07-28) every description is ONE SHORT PLAIN sentence (two only when a fact would otherwise mislead): what the field IS, nothing else — no filter tips, no '(none)' coaching, no rationale; the user's workspace NOTE overrides it in the (i) hover, never in this file. BUILDER FACT (documented here, deliberately NOT in user-facing text): blank connector attributes display as '(none)' (they are no longer all `text`: W40-T06 retyped eight of them to `select` and `tags` to `multiselect`, and the sentinel is a real member of every one of those vocabularies), so `is empty` treats that visible sentinel as missing too; exact `is '(none)'` remains available when the literal is intentional. filterable:false = the CONDITION BUILDER does not offer it (still displayed, still sortable); every such field must have a replacement declared in aios-web/verify_fields_contract.py. 2026-07-27 partner attributes: country/zip/payment_terms/pricelist/tags/customer_since all ship default:false. zip is TEXT because a postal code has leading zeros. Odoo's credit_limit (1% populated) and user_id salesperson (2%) are deliberately ABSENT; agent_ids is the salesperson field and AR is where credit exposure comes from. Wave-5 item 8 (2026-07-27): ltm_rev and at_risk are DELETED — LTM's replacement is a creatable Sales measure column (the demo column IS Sales · the last 12 months), at_risk's replacement is a formula field, e.g. MAX(0, {revenue_ly} - {revenue_ytd}). Wave-6 item 8 (2026-07-27, the no-buildable-presets rule): revenue_ytd, revenue_ly, orders_24m, aov and yoy_pct are DELETED — every one is self-buildable, so a frozen pre-set beside the builder was two ways to ask one question. Replacements (recorded in verify_fields_contract.py): creatable measure columns for Sales / Orders / Avg order $ over any period (harness/measure_filter.py ADMITTED carries revenue, orders and the composite aov), and a formula over two measure columns for YoY, e.g. ({sales_ytd} - {sales_ly}) / {sales_ly}. Stale view colIds naming the five self-heal on the next autosave (the established rule).",
  "_valueOverride": "A source field remains immutable unless its exact contract carries valueOverride=overlay; maps_url is the only admitted source-backed override.",
  "fields": [
    {
      "key": "customer", "personal": true,
      "label": "Customer",
      "type": "text",
      "source": "odoo",
      "pinned": true,
      "default": true,
      "description": "The customer's name in Odoo. One row per customer who ordered in the last 24 months."
    },
    {
      "key": "partner_id",
      "label": "Odoo ID",
      "type": "int",
      "source": "odoo",
      "derived": true,
      "default": false,
      "description": "The Odoo res.partner id, the key every Odoo document joins on. DERIVED: this row's pid IS the partner id, so a stored copy would be a second source."
    },
    {
      "key": "odoo_status",
      "label": "Odoo record",
      "type": "status",
      "source": "odoo",
      "default": false,
      "options": [
        "Active",
        "Archived"
      ],
      "description": "Whether this customer still exists in Odoo. Archived means deleted there."
    },
    {
      "key": "archived",
      "label": "Archived",
      "type": "checkbox",
      "source": "odoo",
      "default": false,
      "description": "Whether this customer is archived in Odoo."
    },
    {
      "key": "agent",
      "label": "Agent",
      "type": "select",
      "source": "odoo",
      "default": true,
      "description": "The sales agent who owns this account."
    },
    {
      "key": "dba",
      "label": "DBA",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "The brand or brands this customer buys from. Marketplace orders are not a DBA."
    },
    {
      "key": "salesperson",
      "label": "Salesperson",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "Who keyed in most of this customer's orders. Not the Agent, who owns the account."
    },
    {
      "key": "street", "personal": true,
      "label": "Street",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "First address line, from res.partner directly - not the geocoder, so a customer the map cannot place still shows its address."
    },
    {
      "key": "street2", "personal": true,
      "label": "Street 2",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "Second address line (suite, unit, floor) on the customer's Odoo address."
    },
    {
      "key": "city", "personal": true,
      "label": "City",
      "type": "select",
      "source": "odoo",
      "default": true,
      "description": "City on the customer's Odoo address."
    },
    {
      "key": "state", "personal": true,
      "label": "State",
      "type": "select",
      "source": "odoo",
      "default": true,
      "description": "State or province on the customer's Odoo address."
    },
    {
      "key": "country", "personal": true,
      "label": "Country",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "Country on the customer's Odoo address."
    },
    {
      "key": "zip", "personal": true,
      "label": "ZIP",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "Postal code on the customer's Odoo address."
    },
    {
      "key": "maps_url", "personal": true,
      "label": "Google Maps",
      "type": "url",
      "source": "odoo",
      "valueOverride": "overlay",
      "default": true,
      "description": "A Google Maps link to this customer's address."
    },
    {
      "key": "lat",
      "label": "Latitude",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "Latitude of this customer's address, from Odoo when it has one and otherwise from our geocode of the address."
    },
    {
      "key": "lon",
      "label": "Longitude",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "Longitude of this customer's address, from Odoo when it has one and otherwise from our geocode of the address."
    },
    {
      "key": "customer_since",
      "label": "Customer since",
      "type": "date",
      "source": "odoo",
      "default": false,
      "description": "When this customer was first set up in Odoo."
    },
    {
      "key": "tags",
      "label": "Tags",
      "type": "multiselect",
      "source": "odoo",
      "default": false,
      "description": "Odoo labels on this customer, comma-separated."
    },
    {
      "key": "pricelist",
      "label": "Customer price list",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "The price list this customer buys on."
    },
    {
      "key": "payment_terms",
      "label": "Payment terms",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "Payment terms on this customer's account. Net 30, for example."
    },
    {
      "key": "last_order",
      "label": "Last order",
      "type": "date",
      "source": "odoo",
      "default": true,
      "description": "Date of the most recent confirmed order."
    },
    {
      "key": "overdue_days",
      "label": "Overdue days",
      "type": "int",
      "source": "odoo",
      "default": true,
      "description": "How many days late this customer is running against their own usual ordering rhythm."
    },
    {
      "_note": "wave 21 R1 — KEY UNCHANGED, LABEL RENAMED. The computation is a DISJOINT split (ar.py credit_exposure): this column is only the not-yet-due residual, its sibling is the past-grace residual, and the two sum to the total. Under the label 'AR open $' the majority-late book read as 'Overdue > Open', which is nonsense in AR vocabulary — 'open' universally means the total. The label now says what the number is; the key stays so saved views and filters keep working.",
      "key": "ar_open",
      "label": "AR current $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Receivable not yet due on Odoo's Aged Receivable basis: due today or later, no grace."
    },
    {
      "key": "ar_overdue",
      "label": "Overdue",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Odoo open receivables past due, no grace; New Customer Hold due now. Credits and unapplied payments net per customer, tying to Odoo to the cent."
    },
    {
      "_note": "wave 21 R1 — the TOTAL, added beside the rename above. AR current $ + AR overdue $, i.e. what most people mean by 'open AR'. Composed from the same ar.credit_exposure rows the siblings use, so it is transitively reconciled by ar.validate()'s residual read_group tie — no second oracle.",
      "key": "ar_overdue_past_grace",
      "label": "Overdue past grace",
      "type": "currency",
      "source": "odoo",
      "description": "Invoice balances more than 5 days past due (the 5-day grace collections uses). Not Odoo's overdue."
    },
    {
      "key": "ar_outstanding",
      "label": "AR outstanding $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Total invoiced money owed right now: AR current $ plus AR overdue $."
    },
    {
      "key": "ar_exposure",
      "label": "Credit exposure $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "The most you could be out if they stopped paying today: open, overdue, draft and not-yet-invoiced."
    },
    {
      "key": "ar_aged_1_30",
      "label": "1-30 days $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Overdue between 1 and 30 days. The four aging buckets sum to Overdue."
    },
    {
      "key": "ar_aged_31_60",
      "label": "31-60 days $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Overdue between 31 and 60 days. The four aging buckets sum to Overdue."
    },
    {
      "key": "ar_aged_61_90",
      "label": "61-90 days $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Overdue between 61 and 90 days. The four aging buckets sum to Overdue."
    },
    {
      "key": "ar_aged_90_plus",
      "label": "90+ days $",
      "type": "currency",
      "source": "odoo",
      "default": false,
      "description": "Overdue by more than 90 days. The four aging buckets sum to Overdue."
    },
    {
      "key": "days_to_pay",
      "label": "Days to pay",
      "type": "int",
      "source": "odoo",
      "default": false,
      "description": "Average days to pay an invoice in full. Blank means no fully paid invoice yet."
    },
    {
      "key": "top_category",
      "label": "Top category",
      "type": "select",
      "source": "odoo",
      "default": false,
      "description": "The category this customer spent the most on in the last 12 months."
    },
    {
      "key": "top_category_pct",
      "label": "Top category %",
      "type": "pct",
      "source": "odoo",
      "default": false,
      "description": "Share of last-12-months spend that went to the top category."
    },
    {
      "key": "sku_count",
      "label": "SKUs bought",
      "type": "int",
      "source": "odoo",
      "default": false,
      "description": "Distinct products bought in the last 12 months."
    },
    {
      "key": "top_sku",
      "label": "Top SKU",
      "type": "text",
      "source": "odoo",
      "default": false,
      "description": "The product this customer spent the most on in the last 12 months."
    },
    {
      "key": "days_since",
      "label": "Days since order",
      "type": "int",
      "source": "odoo",
      "default": false,
      "description": "Days since the last confirmed order."
    },
    {
      "key": "days_since_invoice",
      "label": "Days since last invoice",
      "type": "int",
      "source": "odoo",
      "default": false,
      "description": "Today minus the newest posted customer invoice date. No posted invoice means an empty cell."
    },
    {
      "key": "typical_gap_days",
      "label": "Typical gap days",
      "type": "int",
      "source": "odoo",
      "default": false,
      "description": "Days this customer usually goes between orders, from their own history."
    },
    {
      "key": "created_on",
      "label": "Record created",
      "type": "date",
      "source": "odoo",
      "default": false,
      "description": "The date this customer record was created in Odoo."
    },
    {
      "key": "notes",
      "label": "Notes",
      "type": "text",
      "source": "overlay",
      "default": false,
      "description": "Your notes on this customer. Saved in this app only, visible only to you."
    },
    {"key": "source_notes", "label": "Source notes", "type": "text", "source": "odoo", "default": false, "description": "The customer notes recorded in Odoo."},
    {"key": "company_name", "personal": true, "label": "Company name", "type": "text", "source": "odoo", "default": false, "description": "The customer's commercial company name in Odoo."},
    {"key": "commercial_partner", "personal": true, "label": "Commercial entity", "type": "text", "source": "odoo", "default": false, "description": "The commercial account this customer belongs to."},
    {"key": "customer_rank", "label": "Customer rank", "type": "int", "source": "odoo", "default": false, "description": "The customer's rank recorded in Odoo."},
    {"key": "doing_business_as", "personal": true, "label": "Doing business as", "type": "text", "source": "odoo", "default": false, "description": "The doing business as name assigned in Odoo."},
    {"key": "invoice_age_limit", "label": "Invoice age limit on", "type": "checkbox", "source": "odoo", "default": false, "description": "Whether Odoo enforces the maximum invoice age."},
    {"key": "reminders", "label": "Reminders", "type": "text", "source": "odoo", "default": false, "description": "The customer's follow-up reminder setting in Odoo."},
    {"key": "is_company", "label": "Company", "type": "checkbox", "source": "odoo", "default": false, "description": "Whether Odoo identifies this customer as a company."},
    {"key": "max_invoice_age", "label": "Max invoice age", "type": "int", "source": "odoo", "default": false, "description": "The maximum invoice age in days configured in Odoo."},
    {"key": "online_payment", "label": "Online payment", "type": "checkbox", "source": "odoo", "default": false, "description": "Whether online payment is enabled for this customer."},
    {"key": "parent_company", "personal": true, "label": "Related company", "type": "text", "source": "odoo", "default": false, "description": "The customer's parent company in Odoo."},
    {"key": "sales_warning", "label": "Sales warning", "type": "text", "source": "odoo", "default": false, "description": "The sales warning setting recorded in Odoo."},
    {"key": "supplier_rank", "label": "Supplier rank", "type": "int", "source": "odoo", "default": false, "description": "The supplier rank recorded on this customer in Odoo."},
    {"key": "sales_team", "label": "Sales team", "type": "text", "source": "odoo", "default": false, "description": "The sales team assigned to this customer in Odoo."},
    {"key": "address_type", "label": "Address type", "type": "text", "source": "odoo", "default": false, "description": "The contact address type recorded in Odoo."},
    {"key": "timezone", "label": "Timezone", "type": "text", "source": "odoo", "default": false, "description": "The customer's timezone recorded in Odoo."},
    {"key": "hubspot_company_id", "label": "HubSpot company ID", "type": "text", "source": "odoo", "default": false, "description": "The HubSpot company identifier linked in Odoo."}
  ],
  "_product_comment": "ADDITIVE, wave 15 C-TOPIC. The PRODUCT table's field contract. Kept as a SEPARATE top-level key rather than restructuring `fields` into {customer_data, product_data}: both existing readers (aios_grid._load_fields, aios-web/api/main.py) index doc['fields'] directly, and reshaping that mid-wave would break the embed for a cosmetic gain. The keyed shape can arrive when both readers move in ONE commit; until then this is the product half and `fields` is the customer half.",
  "_product_removed_buy_now": "OWNER, 2026-08-03: 'Buy signal' (key buy_now, a select of Buy now / OK) is NO LONGER A PRESET FIELD. It never earned one: it is a formula over two columns that are both still right here, and the platform has a formula field type for exactly that. THE FORMULA, which reproduces the retired column row for row (modules/product_data.validate proves the equivalence, and goes red if it ever stops holding): IF({lead_days} > 0, IF({dos} < {lead_days}, \"Buy now\", \"OK\"), \"\") . Every branch matches the old server rule, including the blanks - the formula engine refuses a comparison against a blank rather than coercing it to 0, so a SKU with no days-of-supply or no lead time comes out empty, which is 'we do not know' and not 'you are fine'. NOTE the column is still COMPUTED in product_data.pool(): it ships nowhere (rows_from_pool projects strictly through this contract, so no Field means no cell on the wire) and exists only as validate()'s oracle. A formula field is PER-USER, so nothing shared may filter on it - the Buy list view filters on dos/lead_days directly (_seed_wave17).",
  "product_data": {
    "identity": "pid",
    "business_key": "code",
    "fields": [
      {
        "key": "code",
        "label": "SKU",
        "type": "text",
        "source": "odoo",
        "pinned": true,
        "default": true,
        "description": "The SKU code, the product's real business key. `pid` is a stable CRC32 of it because the grid keys on an integer."
      },
      {
        "key": "product_id",
        "label": "Odoo ID",
        "type": "int",
        "source": "odoo",
        "default": false,
        "description": "The Odoo product.product id, the key every Odoo document joins on. Carried on the row rather than derived, because a product's pid is a CRC32 of its SKU and the id cannot be recovered from it."
      },
      {
        "key": "product_tmpl_id",
        "label": "Template",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "The product template name. Products sharing a SKU use the first product record."
      },
      {
        "key": "volume",
        "label": "Volume",
        "type": "int",
        "format": {"decimals": 4},
        "source": "odoo",
        "default": false,
        "description": "Volume per unit. Products sharing a SKU use the first product record."
      },
      {
        "key": "product",
        "label": "Product",
        "type": "text",
        "source": "odoo",
        "default": true,
        "description": "Product name as it appears in Odoo."
      },
      {
        "key": "category",
        "label": "Category",
        "type": "select",
        "source": "odoo",
        "default": true,
        "description": "Product category; '(uncategorized)' when Odoo carries none."
      },
      {
        "key": "supplier",
        "label": "Supplier",
        "type": "multiselect",
        "source": "overlay",
        "custom": true,
        "default": true,
        "description": "Supplier or manufacturer for this product.",
        "shared": true,
        "walled": true
      },
      {
        "key": "origin_country",
        "label": "Country",
        "type": "text",
        "source": "overlay",
        "default": false,
        "description": "Country where this product was made.",
        "shared": true
      },
      {
        "key": "lead_days",
        "label": "Lead time (days)",
        "type": "int",
        "source": "overlay",
        "default": true,
        "description": "Days from placing an order to receiving it.",
        "shared": true
      },
      {
        "key": "first_cost",
        "label": "First cost",
        "type": "currency",
        "source": "overlay",
        "default": false,
        "description": "Quoted unit cost before freight and duty.",
        "shared": true
      },
      {
        "key": "price_1",
        "label": "Price 1",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Cheapest live price for this SKU, across active pricelists."
      },
      {
        "key": "unit_1",
        "label": "Unit 1",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for Price 1."
      },
      {
        "key": "price_2",
        "label": "Price 2",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Second-cheapest live price for this SKU."
      },
      {
        "key": "unit_2",
        "label": "Unit 2",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for Price 2."
      },
      {
        "key": "price_3",
        "label": "Price 3",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Third-cheapest live price for this SKU."
      },
      {
        "key": "unit_3",
        "label": "Unit 3",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for Price 3."
      },
      {
        "key": "price_fisch_t1",
        "label": "Fisch tier 1 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Fisch price tier 1, cheapest first. Blank when Fisch does not price this SKU."
      },
      {
        "key": "unit_fisch_t1",
        "label": "Fisch tier 1 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Fisch tier 1 price. Blank when Odoo names no package."
      },
      {
        "key": "price_fisch_t2",
        "label": "Fisch tier 2 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Fisch price tier 2. Blank when Fisch prices this SKU at only one tier."
      },
      {
        "key": "unit_fisch_t2",
        "label": "Fisch tier 2 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Fisch tier 2 price. Blank when Odoo names no package."
      },
      {
        "key": "price_fisch_t3",
        "label": "Fisch tier 3 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Fisch price tier 3. Blank when Fisch prices this SKU at fewer than three tiers."
      },
      {
        "key": "unit_fisch_t3",
        "label": "Fisch tier 3 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Fisch tier 3 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal1_t1",
        "label": "Royal 1 tier 1 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 1 price tier 1, cheapest first. Blank when Royal 1 does not price this SKU."
      },
      {
        "key": "unit_royal1_t1",
        "label": "Royal 1 tier 1 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 1 tier 1 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal1_t2",
        "label": "Royal 1 tier 2 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 1 price tier 2. Blank when Royal 1 prices this SKU at only one tier."
      },
      {
        "key": "unit_royal1_t2",
        "label": "Royal 1 tier 2 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 1 tier 2 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal1_t3",
        "label": "Royal 1 tier 3 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 1 price tier 3. Blank when Royal 1 prices this SKU at fewer than three tiers."
      },
      {
        "key": "unit_royal1_t3",
        "label": "Royal 1 tier 3 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 1 tier 3 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal2_t1",
        "label": "Royal 2 tier 1 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 2 price tier 1, cheapest first. Blank when Royal 2 does not price this SKU."
      },
      {
        "key": "unit_royal2_t1",
        "label": "Royal 2 tier 1 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 2 tier 1 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal2_t2",
        "label": "Royal 2 tier 2 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 2 price tier 2. Blank when Royal 2 prices this SKU at only one tier."
      },
      {
        "key": "unit_royal2_t2",
        "label": "Royal 2 tier 2 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 2 tier 2 price. Blank when Odoo names no package."
      },
      {
        "key": "price_royal2_t3",
        "label": "Royal 2 tier 3 price",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Royal 2 price tier 3. Blank when Royal 2 prices this SKU at fewer than three tiers."
      },
      {
        "key": "unit_royal2_t3",
        "label": "Royal 2 tier 3 unit",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Package label for the Royal 2 tier 3 price. Blank when Odoo names no package."
      },
      {
        "key": "pre_book_qty",
        "label": "Pre-book qty",
        "type": "int",
        "source": "odoo",
        "description": "Units on confirmed, not-fully-delivered wholesale orders promised after today. Delivery-charge service lines are excluded."
      },
      {
        "key": "open_backlog_qty",
        "label": "Open backlog qty",
        "type": "int",
        "source": "odoo",
        "description": "Units still owed on confirmed, not-fully-delivered wholesale goods orders, including already-due promises. Delivery-charge service lines are excluded."
      },
      {
        "key": "rev_ytd",
        "label": "Revenue YTD",
        "type": "currency",
        "source": "odoo",
        "default": true,
        "description": "Year-to-date revenue for this SKU, BU-scoped when the caller is."
      },
      {
        "key": "rev_ly",
        "label": "Revenue LY",
        "type": "currency",
        "source": "odoo",
        "description": "Same period last year, because seasonal wholesale compares like for like."
      },
      {
        "key": "yoy_pct",
        "label": "YoY %",
        "type": "pct",
        "source": "odoo",
        "description": "Year-over-year change; null when last year was zero (a ratio to zero is not a number)."
      },
      {
        "key": "qty_ytd",
        "label": "Units YTD",
        "type": "int",
        "source": "odoo",
        "description": "Units sold year to date."
      },
      {
        "key": "orders_ytd",
        "label": "Orders YTD",
        "type": "int",
        "source": "odoo",
        "description": "Distinct confirmed orders that hold this product"
      },
      {
        "key": "on_hand",
        "label": "On hand",
        "type": "int",
        "source": "odoo",
        "description": "Units in stock. Consolidated: one physical warehouse, not brand-tagged, so every caller sees the same company-wide figure, a BU-scoped one included."
      },
      {
        "key": "available",
        "label": "Available",
        "type": "int",
        "source": "odoo",
        "description": "Units in stock minus units reserved for orders."
      },
      {
        "key": "forecasted",
        "label": "Forecasted",
        "type": "int",
        "source": "odoo",
        "description": "Units in stock plus inbound minus outbound."
      },
      {
        "key": "fba",
        "label": "FBA",
        "type": "int",
        "source": "odoo",
        "description": "Units held in the Amazon FBA warehouse, read live from Odoo under that warehouse's own context. These units are already counted in On hand; this column says how many of them sit at Amazon. Warehouse wide and never a business unit allocation, and blank rather than zero when the tenant has no FBA warehouse."
      },
      {
        "key": "unit_cost",
        "label": "Unit cost",
        "type": "currency",
        "source": "odoo",
        "description": "Inventory unit cost. Consolidated; absent for a BU-scoped caller."
      },
      {
        "key": "inv_value",
        "label": "Stock value",
        "type": "currency",
        "source": "odoo",
        "description": "On-hand value at cost. Consolidated; absent for a BU-scoped caller."
      },
      {
        "key": "inventory_value_per_quantity",
        "label": "Inventory value / quantity",
        "type": "currency",
        "source": "odoo",
        "default": false,
        "description": "Consolidated internal-stock value divided by the same On hand quantity; its paired status names every unavailable result."
      },
      {
        "key": "inventory_value_per_quantity_state",
        "label": "Inventory value / quantity status",
        "type": "select",
        "source": "odoo",
        "default": false,
        "description": "States whether the inventory cost basis is available or names the source or denominator refusal."
      },
      {
        "key": "qty_ltm",
        "label": "Units LTM",
        "type": "int",
        "source": "odoo",
        "description": "Units sold in the last twelve months. Consolidated; absent for a BU-scoped caller."
      },
      {
        "key": "incoming",
        "label": "Inbound units",
        "type": "int",
        "source": "odoo",
        "description": "Units already on order and not yet received, from Odoo's own incoming quantity on the product. In the product's STOCK unit of measure, the same unit as On hand, so the two can be added. Days of supply and both cover gap columns all count this as stock (owner, 2026-08-19)."
      },
      {
        "key": "dos",
        "label": "Days of supply",
        "type": "int",
        "source": "odoo",
        "description": "Estimated days of supply at the trailing twelve-month sales rate. Counts on-hand and inbound units, excluding Amazon FBA warehouse stock. Blank if FBA stock cannot be read."
      },
      {
        "key": "cover_gap_d",
        "label": "Cover gap (days)",
        "type": "int",
        "source": "odoo",
        "default": false,
        "description": "Days of cover at the forward 8-month forecast rate minus supplier lead time. Negative means stock runs out before a reorder arrives. Counts on-hand and inbound units, excluding Amazon FBA warehouse stock. Blank if FBA stock cannot be read."
      },
      {
        "key": "cover_gap_units",
        "label": "Cover gap (units)",
        "type": "int",
        "source": "odoo",
        "default": false,
        "description": "Recommended reorder quantity over supplier lead time at the forward 8-month forecast rate. Counts on-hand and inbound units, excluding Amazon FBA warehouse stock. Blank if FBA stock cannot be read."
      },
      {
        "key": "demand_fwd",
        "label": "Forecast units (8 mo)",
        "type": "int",
        "source": "odoo",
        "description": "Units this SKU is expected to sell over the next 8 months, read as the units it actually sold in the same 8 calendar months one year ago. Seasonal on purpose: a flat annual average spreads Valentine's, Mother's Day and Christmas evenly across the year and understates the months buyers actually order for. A SKU too new to appear in that window falls back to its trailing twelve month rate scaled to 8 months. This is the burn rate both cover gap columns divide by, shown so the reorder quantity can be checked."
      },
      {
        "key": "stock_bucket",
        "label": "Stock status",
        "type": "select",
        "source": "odoo",
        "description": "Stock status from trailing-rate days of supply, including inbound units and excluding Amazon FBA warehouse stock. Coverage is blank if FBA stock cannot be read. 'Out of stock' uses on-hand stock excluding FBA, before inbound. 'No stock record' means no inventory row was returned. Business unit views use that unit's sales rate."
      },
      {
        "key": "discontinued",
        "label": "Discontinued",
        "type": "select",
        "source": "odoo",
        "options": [
          "Yes",
          "No"
        ],
        "description": "Whether Odoo carries the Discontinued product tag on this SKU. Every row gets an explicit Yes or No rather than a blank, because a blank reads as an inactive condition in the filter engine and would silently WIDEN any view that filtered on it."
      },
      {
        "key": "created_on",
        "label": "Record created",
        "type": "date",
        "source": "odoo",
        "default": false,
        "description": "The date this product record was created in Odoo. Read from the live product.product create_date: the mirror carries write_date and no create_date, so there is no cheaper source. A SKU whose code is on more than one active record takes the EARLIEST of them, because the row is the SKU and that is when it first existed."
      },
      {
        "key": "needs_pricing",
        "label": "Needs pricing",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "options": [
          "Yes"
        ],
        "shared": true,
        "description": "Marks products that need pricing."
      },
      {
        "key": "march_pricelist",
        "label": "March pricelist",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "options": [
          "Yes"
        ],
        "shared": true,
        "description": "Marks products included in the March pricelist."
      },
      {
        "key": "price_changes",
        "label": "Price changes",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "options": [
          "Yes"
        ],
        "shared": true,
        "description": "Marks products with planned price changes."
      },
      {
        "key": "closeouts",
        "label": "Closeouts",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "options": [
          "Yes"
        ],
        "shared": true,
        "description": "Marks products designated for closeout."
      },
      {
        "key": "notes",
        "label": "Notes",
        "type": "text",
        "source": "overlay",
        "default": false,
        "shared": true,
        "description": "Team notes about this product."
      },
      {
        "key": "sub_category",
        "label": "Sub-Category",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Detailed product classification."
      },
      {
        "key": "main_category",
        "label": "Main Category",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Top-level product classification."
      },
      {
        "key": "color",
        "label": "Color",
        "type": "multiselect",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Colors available for this product."
      },
      {
        "key": "shape_style",
        "label": "Shape/Style",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Shape or styling of this product."
      },
      {
        "key": "material",
        "label": "Material",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Material this product is made from."
      },
      {
        "key": "finish",
        "label": "Finish",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Surface finish of this product."
      },
      {
        "key": "occassion",
        "label": "Occassion",
        "type": "multiselect",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Occasions this product is bought for."
      },
      {
        "key": "collection",
        "label": "Collection",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Merchandising collection this product belongs to."
      },
      {
        "key": "size",
        "label": "Size",
        "type": "select",
        "source": "overlay",
        "custom": true,
        "default": false,
        "preset": false,
        "shared": true,
        "permissions": {
          "edit": "collaborative"
        },
        "description": "Size band for this product."
      },
      {
        "key": "upc",
        "label": "UPC",
        "type": "text",
        "source": "odoo",
        "default": false,
        "description": "Barcode for this product."
      }
    ]
  }
}