콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
484 화면

I'm currently using Odoo Online (SaaS) version 18.2+e (Enterprise Edition) and I'm trying to hide the internal reference (Product Code / default_code) from the Product field in Sale Order Lines.



I've successfully achieved this in Invoice Lines , Delivery Order Lines by using the context key:

​'display_default_code': False

Is there a reliable way to remove or hide the internal reference from the product display in Sale Order Lines, like it works in other document lines?


Thanks in advance!

아바타
취소
작성자 베스트 답변

Steps to Hide Internal Reference from Sale Order Lines:

  1. Activate Developer (Debug) Mode
  2. Open Sales Order
  3. Go to Debug Menu > User Interface > Action
  4. Under the General Settings tab, locate the field Context Value.
  5. Add This Context:     'display_default_code': False


아바타
취소
베스트 답변

In Odoo SaaS 18.2+e, the internal reference (default_code) is shown in Sale Order lines by default.

To hide it, go to Studio, open the Sale Order Line form view, click on the product field, and in the right panel, uncheck the "Show Product Code" option or hide the related field showing the default code.

This will stop the internal reference from appearing on the sales order line. Changes apply only to your custom view.

아바타
취소

There is no checkbox and you can't hide the field with the product in it!!

베스트 답변

Hi,


In Odoo SaaS (18.2+e), the internal reference (default_code) is shown in many product dropdowns by default, including Sale Order Lines.


Odoo uses a context variable 'display_default_code' to control whether the internal reference appears next to product names.


This works well in Invoice Lines and Delivery Order Lines, and can be applied similarly in Sale Order Lines.


Unfortunately, since you're on Odoo Online (SaaS), you cannot directly modify the XML views to inject the context on the product_id field in sale.order.line.


A potential workaround is to create a custom Studio field or duplicate the product_id field using Studio with the context { 'display_default_code': False }, if Odoo Studio allows context injection (limited support).


If Studio isn't enough, the most reliable solution is to request Odoo support via a ticket, asking them to hide default_code using the same context method used in invoices/deliveries.


Hope it helps.

아바타
취소

Can't see how the Studio approach could work, since Odoo needs that field when you add a product.