[FIX] point_of_sale: pass noupdate True for pos load demo data #162080
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when database uploaded without demo data and there is no any valid pos product in point of sale, and customer used load demo data from point of sale frontend screen, then it will create demo record from this file which was actually defined in point_of_sale/data/point_of_sale_onboarding_main_config.xml with noupdate= False.
but as this xmlids has been created from python file using load samples, it was noupdate=False.
so during upgrade as there was no demo file loaded, and this entry are with noupdate='f' ORM try to remove those recod , pos session too.
in _process_end during upgrade from 17.0 to
saas-17.1, and which was create issues as
that pos session linked with account bank statement lines which was linked to journal entry so it will try remove journal entries which was partially reconciled.
so we need to set noupdate=True in file:
point_of_sale/data/point_of_sale_onboarding_main_config.xml
and also in python function
_load_onboarding_data
see:
odoo/addons/point_of_sale/models/pos_session.py
Line 2247 in 1648ee1
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr