Skip to Content

Name: [FIX] point_of_sale: pass noupdate True for pos load demo data

State: Killed finished in 135m

PR State: merged

PR Author: Roy Le

PR Author Email:

PR: #1338

Committer: Roy Le

Committer Email: roy.le@viindoo.com

Commit: f13ee15bd1faec58b077579bd5d5a28a5b2768c1

Description:

                                            [FIX] point_of_sale: pass noupdate True for pos load demo data

Backport of odoo/odoo@1bed05062d1a76763156220e6626ab071b3c578d (17.0),
adapted to 16.0 where the onboarding data is loaded by
pos.session.check_product_wizard.load_demo_products().

When a database has no PoS product, the user can load sample products
from the PoS opening wizard. They are created from
data/point_of_sale_onboarding.xml, which is not listed in the manifest,
with noupdate=False. On the next upgrade of point_of_sale these xmlids
are not reloaded, so _process_end() tries to delete the records. Once
one of the sample products has been sold, the upgrade crashes:

  psycopg2.errors.ForeignKeyViolation: update or delete on table
  "product_product" violates foreign key constraint
  "pos_order_line_product_id_fkey" on table "pos_order_line"

and the unsold sample products are silently deleted.

Load the file with noupdate=True so the records are left alone on
upgrade.

Databases which already loaded the sample products keep their
noupdate=False xmlids and must be fixed by setting noupdate on them.
                                            

Branch: 16.0

Age:

Up-time:

Subbuilds Name State Detail
Build 434583 At install tests: from account to website_twitter 133m Succeed Log
Build 434584 Post install tests: step install all modules 52m Succeed Log
Build 434585 Post install tests: from account to hr_gamification 70m Succeed Log
Build 434586 Post install tests: from hr_holidays to pos_epson_printer_restaurant 65m Succeed Log
Build 434587 Post install tests: from pos_hr to sale_sms 60m Succeed Log
Build 434588 Post install tests: from sale_stock to to_backend_theme 70m Succeed Log
Build 434589 Post install tests: from to_bank_currency_rate to to_warranty_purchase 65m Succeed Log
Build 434590 Post install tests: from to_warranty_purchase_stock to viin_hr_seniority 65m Succeed Log
Build 434591 Post install tests: from viin_hr_skill_framework to website_twitter 65m Succeed Log
Create Date Level Message
11/10/2026 03:06:51 PM INFO
Updated repository Viindoo-tvtmaaddons
11/10/2026 03:06:51 PM INFO
Updated repository Viindoo-erponline-enterprise
11/10/2026 03:06:51 PM INFO
Updated repository Viindoo-branding
11/10/2026 03:06:51 PM INFO
Cloned repository Viindoo-odoo
11/10/2026 03:06:51 PM INFO
Post install tests: 7 parallel builds balanced by the test time measured on 16.0, the longest about 56 minutes of tests