odoo.define('account.section_and_note_tests', function (require) { "use strict"; var FormView = require('web.FormView'); var testUtils = require('web.test_utils'); var createView = testUtils.createView; QUnit.module('section_and_note', { beforeEach: function () { this.data = { invoice: { fields: { invoice_line_ids: { string: "Lines", type: 'one2many', relation: 'invoice_line', relation_field: 'invoice_id' }, }, records: [ {id: 1, invoice_line_ids: [1, 2]}, ], }, invoice_line: { fields: { display_type: { string: 'Type', type: 'selection', selection: [['line_section', "Section"], ['line_note', "Note"]] }, invoice_id: { string: "Invoice", type: 'many2one', relation: 'invoice' }, name: { string: "Name", type: 'text' }, }, records: [ {id: 1, display_type: false, invoice_id: 1, name: 'product\n2 lines'}, {id: 2, display_type: 'line_section', invoice_id: 1, name: 'section'}, ] }, }; }, }, function () { QUnit.test('correct display of section and note fields', async function (assert) { assert.expect(5); var form = await createView({ View: FormView, model: 'invoice', data: this.data, arch: '
', archs: { 'invoice_line,false,list': '