跳至內容
Odoo 選單
  • 登入
  • 免費試用
  • 應用程式
    財政
    • 會計
    • 發票
    • 開支報銷
    • 試算表 (BI)
    • 文件管理
    • 電子簽名
    銷售
    • 客戶關係
    • 銷售
    • POS 銷售點管理 - 零售
    • POS 銷售點管理 - 餐廳
    • 訂閱
    • 租賃
    網站
    • 網站製作
    • 電子商務
    • 網誌
    • 討論區
    • 線上客服
    • 網上學習
    供應鏈
    • 庫存
    • 製造管理
    • 產品生命周期
    • 採購
    • 保養維護
    • 品質管理
    人力資源
    • 員工管理
    • 招聘
    • 休假
    • 工作表現評核
    • 內部推薦
    • 車隊管理
    市場推廣
    • 社交媒體推廣
    • 電郵推廣
    • 短訊營銷
    • 活動
    • 自動化推廣
    • 網上調查
    技術支援服務
    • 專案管理
    • 工時管理
    • 外勤服務管理
    • 技術支援
    • 工作規劃
    • 預約管理
    生產力
    • 聊天
    • AI 人工智能
    • 物聯網
    • VoIP
    • 知識庫
    • WhatsApp
    第三方應用程式 Odoo Studio Odoo 雲端平台
  • 行業
    零售
    • 書店
    • 服裝店
    • 家具店
    • 食品雜貨店
    • 五金店
    • 玩具店
    餐飲及款待
    • 酒吧及酒館
    • 餐廳
    • 快餐
    • 賓館
    • 飲品分銷商
    • 酒店
    房地產
    • 地產代理公司
    • 建築師事務所
    • 建造業
    • 物業管理
    • 園藝
    • 業主聯會
    顧問服務
    • 會計公司
    • Odoo 合作夥伴
    • 市場推廣公司
    • 律師事務所
    • 人才招募
    • 審計及認證
    製造管理
    • 紡織
    • 金屬
    • 家具
    • 食品
    • 啤酒廠
    • 企業禮品
    保健與健身
    • 運動俱樂部
    • 眼鏡店
    • 健身中心
    • 健康從業人員
    • 藥房
    • 髮型屋
    技術行業
    • 雜工
    • IT 硬體與支援
    • 太陽能系統
    • 鞋匠
    • 清潔服務
    • 暖通空調服務
    其他
    • 非牟利組織
    • 環境保護機構
    • 廣告板租賃
    • 攝影服務
    • 自行車租賃
    • 軟體經銷商
    瀏覽所有行業
  • 社群
    學習
    • 教學影片
    • 使用說明
    • 認證
    • 培訓
    • 網誌
    • Podcast
    增強教學效能
    • 教育計劃
    • Scale Up! 商業遊戲
    • 到訪 Odoo
    取得軟件
    • 下載
    • 版本對照表
    • 版本說明
    合作
    • GitHub
    • 討論區
    • 活動
    • 翻譯
    • 成為合作夥伴
    • 合作夥伴服務
    • 登記你的會計服務公司
    獲取服務相關資料
    • 尋找合作夥伴
    • 尋找會計服務
    • 預約專家一對一 Demo
    • 安裝及推行服務
    • 客戶案例
    • 支援
    • 軟件升級
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    預約示範
  • 定價
  • 技術支援
只限註冊用戶才可與社群互動。
所有帖文 人 獎章
標籤 (查看所有)
odoo accounting v14 pos v15
關於此討論區
只限註冊用戶才可與社群互動。
所有帖文 人 獎章
標籤 (查看所有)
odoo accounting v14 pos v15
關於此討論區
支援

Error While adding Attributes to the Product

訂閱

此帖文有活動時,接收通知

此問題已被標幟
variantsattributes
1 回覆
1089 瀏覽次數
頭像
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
頭像
捨棄
Codesphere Tech

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

頭像
Zehntech Technologies Inc.
最佳答案

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
頭像
捨棄
喜歡這則討論?不要只閱讀,加入發表意見吧!

今天就建立帳戶,享受獨家功能,與我們精彩的社群互動!

註冊
相關帖文 回覆 瀏覽次數 活動
Show Attribute with only 1 value on configurator/quote
variants attributes
頭像
頭像
1
4月 23
4491
Cannot delete attribute's value 已解決
variants attributes
頭像
1
11月 22
5952
How to "hide" variants/attributes but still show products in POS odoo17 已解決
pos variants attributes
頭像
頭像
頭像
2
11月 24
4797
Price extra for attribute depending on custom value [product variants, attributes]
pricing variants attributes
頭像
頭像
1
7月 23
6348
[V8]best way to import product variants
v8 variants attributes
頭像
頭像
2
5月 16
10712
社群
  • 教學影片
  • 使用說明
  • 討論區
開源
  • 下載
  • GitHub
  • Runbot 測試環境
  • 翻譯
服務
  • odoo.sh 網頁寄存
  • 支援
  • 升級
  • 自訂功能開發
  • 教育及培訓
  • 尋找會計服務
  • 尋找合作夥伴
  • 成為合作夥伴
關於我們
  • 關於 Odoo 公司
  • 品牌資產
  • 聯絡我們
  • 招聘
  • 活動
  • Podcast
  • 網誌
  • 客戶
  • 法律 • 私隱政策
  • 安全性
الْعَرَبيّة 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 是一套開放源碼的商業管理系統,涵蓋你公司全部的營運需要,包括客戶關係管理(CRM)、電子商務、會計、庫存管理、POS(銷售點管理)、專案管理等應用程式。

Odoo 的獨特價值是非常簡單易用,同時將不同應用程式完美整合。

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