Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Error While adding Attributes to the Product

Subscribe

Get notified when there's activity on this post

This question has been flagged
variantsattributes
1 Reply
373 Views
Avatar
INDIA MON AMOUR SAS, ANA SARMIENTO

i used to have attributes and variants in my odoo earler, then i deactivated them, now after long time i am trying use again, I activated the variants option and now trying to add colorsone product, but its giving me this error, please help. i am on odoo 19 enterprise. Thanks ​


RPC_ERROR Odoo Server Error Occured on atmashop.odoo.com on model product.template on 2026-04-11 23:33:42 GMT Traceback (most recent call last): File "/home/odoo/src/odoo/19.0/odoo/http.py", line 2298, in _serve_db return service_model.retrying(serve_func, env=self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/service/model.py", line 188, in retrying result = func() ^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/http.py", line 2353, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/http.py", line 2568, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/addons/base/models/ir_http.py", line 355, in _dispatch result = endpoint(**request.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/http.py", line 808, in route_wrapper result = endpoint(self, *args, **params_ok) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/web/controllers/dataset.py", line 32, in call_kw return call_kw(request.env[model], method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/service/model.py", line 97, in call_kw result = method(recs, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/web/models/models.py", line 88, in web_save self.write(vals) File "/home/odoo/src/odoo/19.0/addons/website_sale/models/product_template.py", line 269, in write return super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/rating/models/rating_mixin.py", line 102, in write result = super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/point_of_sale/models/product_template.py", line 53, in write return super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/stock_account/models/product.py", line 114, in write res = super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/stock/models/product.py", line 1138, in write res = super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/product/models/product_template.py", line 589, in write res = super(ProductTemplate, self).write(vals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/mail/models/mail_thread.py", line 391, in write result = super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/website/models/mixins.py", line 250, in write return super().write(vals) ^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 4469, in write field.write(self, value) File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 733, in write self.write_batch([(records, value)]) File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 754, in write_batch self.write_real(records_commands_list, create) File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 1038, in write_real flush() File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 994, in flush comodel.create(to_create) File "/home/odoo/src/odoo/19.0/odoo/orm/decorators.py", line 365, in create return method(self, vals_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/product/models/product_template_attribute_line.py", line 114, in create res._update_product_template_attribute_values() File "/home/odoo/src/odoo/19.0/addons/product/models/product_template_attribute_line.py", line 255, in _update_product_template_attribute_values self.product_tmpl_id._create_variant_ids() File "/home/odoo/src/odoo/19.0/addons/product/models/product_template.py", line 850, in _create_variant_ids Product.create(variants_to_create) File "/home/odoo/src/odoo/19.0/odoo/orm/decorators.py", line 365, in create return method(self, vals_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/stock_account/models/product.py", line 277, in create products = super().create(vals_list) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/decorators.py", line 365, in create return method(self, vals_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/product/models/product_product.py", line 677, in create products = super(ProductProduct, self.with_context(create_product_product=False)).create(vals_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/decorators.py", line 365, in create return method(self, vals_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/addons/mail/models/mail_thread.py", line 328, in create threads = super(MailThread, self).create(vals_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/decorators.py", line 365, in create return method(self, vals_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 4709, in create records = self._create(data_list) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 4931, in _create records.modified(self._fields, create=True) File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6805, in modified for field, records, create in itertools.chain.from_iterable(todo): File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6916, in _modified_triggers yield from records._modified_triggers(subtree) File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6916, in _modified_triggers yield from records._modified_triggers(subtree) File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 6909, in _modified_triggers records = model.search([(field.name, 'in', real_records.ids)], order='id') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 1378, in search return self.search_fetch(domain, [], offset=offset, limit=limit, order=order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 1408, in search_fetch query = self._search(domain, offset=offset, limit=limit, order=order or self._order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 5369, in _search query.add_where(domain._to_sql(self, self._table, query)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/domains.py", line 1091, in _to_sql return field.condition_to_sql(field_expr, operator, value, model, alias, query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 476, in condition_to_sql return super().condition_to_sql(field_expr, operator, value, model, alias, query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/fields.py", line 1259, in condition_to_sql sql_expr = self._condition_to_sql(field_expr, operator, value, model, alias, query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/fields.py", line 1265, in _condition_to_sql sql_field = model._field_to_sql(alias, field_expr, query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/models.py", line 2930, in _field_to_sql sql = field.to_sql(self, alias) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/fields_relational.py", line 460, in to_sql sql_field = super().to_sql(model, alias) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/19.0/odoo/orm/fields.py", line 1218, in to_sql raise ValueError(f"Cannot convert {self} to SQL because it is not stored") ValueError: Cannot convert product.template.product_variant_id to SQL because it is not stored The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPC_ERROR at makeErrorFromResponse (https://atmashop.odoo.com/web/assets/1/07c46b1/web.assets_web.min.js:3198:165) at XMLHttpRequest.<anonymous> (https://atmashop.odoo.com/web/assets/1/07c46b1/web.assets_web.min.js:3205:13) ​



0
Avatar
Discard
Codesphere Tech

Hello,
Trying to pull the latest code and update base module.
Let me know if it is not resolved.

Avatar
Zehntech Technologies Inc.
Best Answer

Hello,

This issue typically occurs when product variants are disabled and later re-enabled, especially if existing products were created during the period when variants were inactive.

The error you're seeing indicates a data inconsistency while Odoo is trying to regenerate product variants (in your case, while adding attributes like color).

You can try the following steps:

  • Ensure that the product does not already have conflicting variant records
  • Try creating a new test product and add attributes to check if the issue is product-specific
  • If the issue is only with existing products, it may require data cleanup (removing inconsistent attribute lines or variants)
  • Also, make sure all related modules (Inventory, Sales, Website, POS) are properly updated

In many cases, this requires a backend check to safely fix the inconsistent records.

Hope this works for you! If you need any help implementing this or want a more optimized approach, feel free to reach out for further discussion

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Show Attribute with only 1 value on configurator/quote
variants attributes
Avatar
Avatar
1
Apr 23
4150
Cannot delete attribute's value Solved
variants attributes
Avatar
1
Nov 22
5532
How to "hide" variants/attributes but still show products in POS odoo17 Solved
pos variants attributes
Avatar
Avatar
Avatar
2
Nov 24
4416
Price extra for attribute depending on custom value [product variants, attributes]
pricing variants attributes
Avatar
Avatar
1
Jul 23
6098
[V8]best way to import product variants
v8 variants attributes
Avatar
Avatar
2
May 16
10451
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now