Files
odoo_source/addons/pos_self_order/tests
Joseph Caburnay d6c42bba00 [FIX] pos_self_order,*: modifying the splash screen images
**Steps to reproduce**

- Open general settings of pos.
- Select/Create a Point of Sale that is kiosk to see the `Splash screens` field.
  - The field is pre-filled with 3 images.
- ISSUE: Try removing the images and save, they won't be removed.

**FIX**

- This is because of the `write` operation made from the `res.config.settings`
  model to the `pos.config`.
  - When removing an image, the field will be given `link` commands, linking the
    remaining images. This is wrong because it won't unlink the images that are
    deleted.

- To ensure the deletion, we reinterpret the command to the splash screen images
  field if the command comes from the res.config.settings.
  - We introduce a context called 'from_settings_view' such that it's set to
    true when the write is from the `res.config.settings` view.
  - And specific to the pos_self_order, we compute the items that should be
    unlinked and we append the unlink commands to the original set of commands
    for the splash screen field.

closes odoo/odoo#137819

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-10-11 17:02:03 +00:00
..