Files
odoo_source/addons/website/static/tests/tours/multi_edition.js
T
qsm-odoo 28f0db302a [FIX] web_editor, website: fix saving multiple contents at once
Since [1], as part of the new translation system made with [2], saving
multiple elements in a website page was only saving the first one. E.g.

- Enter edit mode of your homepage
- Add something in the main area of the page
- Add something in the footer
- Save
=> Only the main area is saved, not the footer.

This was actually the same in translate mode... only translation of the
first edited area could be saved.

At least, with the bug fixed version of [1] comes the small advantage
of not saving multiple times the same field (except for view parts).
E.g.: an event's dates are displayed multiple times in different formats
-> in 15.0, 3 RPC were made by date changed, now only one is made.

[1]: https://github.com/odoo/odoo/commit/1b473cf0db4d85c2b523ac87fbab533bce5f3e21
[2]: https://github.com/odoo/odoo/commit/4e82c45abdb0b420edead2bd1d0ba9ff4bb4a224

closes odoo/odoo#100762

X-original-commit: c834d151afed0ca633ffb6bcba2f45b544689e74
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-22 01:00:04 +02:00

37 lines
991 B
JavaScript

/** @odoo-module **/
import wTourUtils from 'website.tour_utils';
wTourUtils.registerWebsitePreviewTour('website_multi_edition', {
test: true,
url: '/',
edition: true,
}, [
{
content: 'Check the current page has not the elements that will be added',
trigger: 'iframe body:not(:has(.s_text_image)):not(:has(.s_hr))',
run: () => null,
},
// Edit the main element of the page
wTourUtils.dragNDrop({
id: 's_text_image',
name: 'Text - Image',
}),
// Edit another part in the page, like the footer
wTourUtils.dragNDrop({
id: 's_hr',
name: 'Separator',
}),
...wTourUtils.clickOnSave(),
{
content: 'Check that the main element of the page was properly saved',
trigger: 'iframe main .s_text_image',
run: () => null,
},
{
content: 'Check that the footer was properly saved',
trigger: 'iframe footer .s_hr',
run: () => null,
},
]);