Debian Codegraph @

addons/point_of_sale/static/tests/unit/data/product_product.data.js

raw
1 import { models } from "@web/../tests/web_test_helpers";
2
3 export class ProductProduct extends models.ServerModel {
4 _name = "product.product";
5
6 // NOTE - We don't take into account _eval_taxes_computation_prepare_product_fields
7 _load_pos_data_fields() {
8 return [
9 "id",
10 "lst_price",
11 "display_name",
12 "product_tmpl_id",
13 "product_template_variant_value_ids",
14 "product_template_attribute_value_ids",
15 "barcode",
16 "product_tag_ids",
17 "default_code",
18 "standard_price",
19 "pos_categ_ids",
20 ];
21 }
22
23 _records = [
24 {
25 id: 1,
26 product_tmpl_id: 1,
27 lst_price: 1,
28 standard_price: 0,
29 display_name: "TIP",
30 product_tag_ids: [],
31 barcode: false,
32 default_code: false,
33 product_template_attribute_value_ids: [],
34 product_template_variant_value_ids: [],
35 pos_categ_ids: [1],
36 },
37 {
38 id: 5,
39 product_tmpl_id: 5,
40 lst_price: 100,
41 standard_price: 0,
42 display_name: "TEST",
43 product_tag_ids: [],
44 barcode: "test_test",
45 pos_categ_ids: [1],
46 default_code: false,
47 product_template_attribute_value_ids: [],
48 product_template_variant_value_ids: [],
49 },
50 {
51 id: 6,
52 product_tmpl_id: 6,
53 lst_price: 100,
54 standard_price: 0,
55 display_name: "TEST 2",
56 product_tag_ids: [],
57 pos_categ_ids: [2],
58 barcode: false,
59 default_code: false,
60 product_template_attribute_value_ids: [],
61 product_template_variant_value_ids: [],
62 },
63 {
64 id: 7,
65 product_tmpl_id: 7,
66 lst_price: 750,
67 standard_price: 0,
68 display_name: "Office combo",
69 product_tag_ids: [],
70 barcode: false,
71 default_code: false,
72 product_template_attribute_value_ids: [],
73 product_template_variant_value_ids: [],
74 pos_categ_ids: [],
75 },
76 {
77 id: 8,
78 product_tmpl_id: 8,
79 lst_price: 300,
80 standard_price: 0,
81 display_name: "Wood chair",
82 product_tag_ids: [],
83 barcode: false,
84 default_code: false,
85 product_template_attribute_value_ids: [],
86 product_template_variant_value_ids: [],
87 pos_categ_ids: [],
88 },
89 {
90 id: 9,
91 product_tmpl_id: 9,
92 lst_price: 450,
93 standard_price: 0,
94 display_name: "Steel chair",
95 product_tag_ids: [],
96 barcode: false,
97 default_code: false,
98 product_template_attribute_value_ids: [],
99 product_template_variant_value_ids: [],
100 pos_categ_ids: [],
101 },
102 {
103 id: 10,
104 product_tmpl_id: 10,
105 lst_price: 600,
106 standard_price: 0,
107 display_name: "Wood chair",
108 product_tag_ids: [],
109 barcode: false,
110 default_code: false,
111 product_template_attribute_value_ids: [],
112 product_template_variant_value_ids: [],
113 pos_categ_ids: [],
114 },
115 {
116 id: 11,
117 product_tmpl_id: 11,
118 lst_price: 700,
119 standard_price: 0,
120 display_name: "Steel desk",
121 product_tag_ids: [],
122 barcode: false,
123 default_code: false,
124 product_template_attribute_value_ids: [],
125 product_template_variant_value_ids: [],
126 pos_categ_ids: [],
127 },
128 {
129 id: 12,
130 product_tmpl_id: 12,
131 lst_price: 14,
132 standard_price: 0,
133 display_name: "Bacon burger",
134 product_tag_ids: [],
135 barcode: false,
136 default_code: false,
137 product_template_attribute_value_ids: [],
138 product_template_variant_value_ids: [],
139 pos_categ_ids: [4],
140 },
141 {
142 id: 13,
143 product_tmpl_id: 13,
144 lst_price: 12,
145 standard_price: 0,
146 display_name: "Pizza margarita",
147 product_tag_ids: [],
148 barcode: false,
149 default_code: false,
150 product_template_attribute_value_ids: [],
151 product_template_variant_value_ids: [],
152 pos_categ_ids: [5],
153 },
154 {
155 id: 14,
156 product_tmpl_id: 14,
157 lst_price: 3.4,
158 standard_price: 0,
159 display_name: "Club sandwich",
160 product_tag_ids: [],
161 barcode: false,
162 default_code: false,
163 product_template_attribute_value_ids: [],
164 product_template_variant_value_ids: [],
165 pos_categ_ids: [4],
166 },
167 {
168 id: 15,
169 product_tmpl_id: 15,
170 lst_price: 1000,
171 standard_price: 0,
172 display_name: "Accounting Test Product 1",
173 product_tag_ids: [],
174 barcode: false,
175 default_code: false,
176 product_template_attribute_value_ids: [],
177 product_template_variant_value_ids: [],
178 },
179 {
180 id: 16,
181 product_tmpl_id: 16,
182 lst_price: 100,
183 standard_price: 0,
184 display_name: "Accounting Test Product 2",
185 product_tag_ids: [],
186 barcode: false,
187 default_code: false,
188 product_template_attribute_value_ids: [],
189 product_template_variant_value_ids: [],
190 },
191 {
192 id: 17,
193 product_tmpl_id: 17,
194 lst_price: 100,
195 standard_price: 0,
196 display_name: "Multi Category Product",
197 product_tag_ids: [],
198 barcode: false,
199 default_code: false,
200 product_template_attribute_value_ids: [],
201 product_template_variant_value_ids: [],
202 },
203 {
204 id: 18,
205 product_tmpl_id: 18,
206 lst_price: 0,
207 standard_price: 0,
208 display_name: "Free Product - Wood chair",
209 product_tag_ids: [],
210 barcode: false,
211 default_code: false,
212 product_template_attribute_value_ids: [],
213 product_template_variant_value_ids: [],
214 pos_categ_ids: [],
215 },
216 ];
217 }