odoo.define('sale.product_configurator_tests', function (require) { "use strict"; const FormView = require('web.FormView'); const testUtils = require('web.test_utils'); const createView = testUtils.createView; QUnit.module('product_configurator', { beforeEach: function () { this.data = { order: { fields: { line_ids: { string: "Lines", type: 'one2many', relation: 'line', relation_field: 'order_id' }, }, records: [ {id: 1, line_ids: [1, 2]}, ], }, line: { fields: { product_id: { string: "Product", type: 'many2one', relation: 'product', }, order_id: { string: "Order", type: 'many2one', relation: 'order' }, sequence: { string: "Sequence", type: 'number', }, }, records: [ {id: 1, sequence: 4, product_id: 3, order_id: 1}, {id: 2, sequence: 14, product_id: 4, order_id: 1}, ] }, product: { fields: { name: { string: "Name", type: 'char', }, }, records: [ {id: 3, name: "Chair"}, {id: 4, name: "Table"}, ], }, }; }, }, function () { QUnit.test('drag and drop rows containing product_configurator many2one', async function (assert) { assert.expect(4); const form = await createView({ View: FormView, model: 'order', data: this.data, arch: `
`, archs: { 'line,false,list': `