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

If I create a new field in an order and then a related field in the picking form like this:

 class sale_order(osv.osv):
    """Add comments"""
    _inherit = 'sale.order'

    _columns = {
        'comments': fields.text('Notas internas'),
    }

class stock_picking(osv.osv):
    _inherit = "stock.picking"
    _columns = {
        'comments': fields.text(related='sale_id.comments', store=True),
    }

When I confirm the order and the stock picking is created the field comments on the picking order is empty.

But if I modify it afterwards it gets updated. Any idea why it does not get updated / set on creation?


Thank you!

아바타
취소

can you pls check the stock.picking Form Additional Info tab "Procurement Group" field data is generated?.. If value is generated then related field comment value display.

작성자

Hi Prakash, I don't fully understand your answer can you elaborate a little bit more? Also, do you know where is the code that generates the stock picking from the sale order? Thank you very much!

pls check the sale_stock.py file _get_sale_id function. https://github.com/odoo/odoo/blob/8.0/addons/sale_stock/sale_stock.py

베스트 답변

When you use the OpenERP v7, you need add the field 'comments' to 'stock.picking.in' and 'stock.picking.out'. 

아바타
취소
관련 게시물 답글 화면 활동
3
3월 18
4744
0
11월 19
2813
1
2월 16
6762
1
9월 24
1324
4
12월 23
17501