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

How do I show the product default code in the "Product" column and product name in the "Description" column? 

http://i.imgur.com/pnoKtxI.png

아바타
취소
베스트 답변

Hello Odoo_fa,

You need to do the following:

1. Override the name_get() of product.product model. (So Product column will display code!)

2. Override the onchange trigger of product_id of the purchase.order.line model. (So Description column will display name!)

Hope this helps.

Thanks.

아바타
취소
베스트 답변

class puchase_order_line(models.Model):

_inherit='puchase.order.line'

default_code = fields.Char('Internal Reference',related='product_id.product_tmpl_id.default_code')


you add a related field in order line and so you can print or add in a tree view ...

아바타
취소
베스트 답변

Hi Serpant,

could you please expalin more I want to show the default_code in account_invoice instead of Product

아바타
취소
관련 게시물 답글 화면 활동
0
5월 22
2761
0
7월 24
2063
1
11월 20
4468
1
10월 20
5048
1
2월 17
4160