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

I have inherited and added a date fields in the sales form and delivery form. I need to update the date in the delivery form as I update it in the sales order form by confirming it. How can I do this in odoo 15.

from odoo import api, fields, models, _, exceptions
from datetime import date, datetime


class SaleInheritance(models.Model):
_inherit = "sale.order"
real_date = fields.Date(string='Real date')


class StockPicking(models.Model):
_inherit = "stock.picking"
real_date = fields.Date(string='Real_date')

here is my python code

아바타
취소
베스트 답변

Update the field definition in stock.picking model like this


real_date = fields.Date(string='Real_date',related='sale_id.real_date',store=True)


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

Can we do it using overriding?

아바타
취소
관련 게시물 답글 화면 활동
2
8월 25
2521
3
2월 25
3827
0
5월 24
46
1
4월 24
3522
1
12월 23
2695