addons/point_of_sale/static/tests/unit/data/product_combo.data.js
raw| 1 | import { models } from "@web/../tests/web_test_helpers"; |
| 2 | |
| 3 | export class ProductCombo extends models.ServerModel { |
| 4 | _name = "product.combo"; |
| 5 | |
| 6 | _load_pos_data_fields() { |
| 7 | return ["id", "name", "combo_item_ids", "base_price", "qty_free", "qty_max"]; |
| 8 | } |
| 9 | |
| 10 | _records = [ |
| 11 | { |
| 12 | id: 1, |
| 13 | name: "Chairs Combo", |
| 14 | combo_item_ids: [1, 2], |
| 15 | base_price: 100, |
| 16 | qty_free: 0, |
| 17 | qty_max: 10, |
| 18 | }, |
| 19 | { |
| 20 | id: 2, |
| 21 | name: "Desks Combo", |
| 22 | combo_item_ids: [3, 4], |
| 23 | base_price: 200, |
| 24 | qty_free: 1, |
| 25 | qty_max: 1, |
| 26 | }, |
| 27 | ]; |
| 28 | } |