Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5 Trả lời
4812 Lượt xem

Form Preview

# -*- coding: utf-8 -*-
from odoo import models, fields, api, _

class StockInherit(models.Model):
_inherit="stock.production.lot"

mfg_date = fields.Date('Mfg Date')
Purity = fields.Float('Purity %')



i want to add field in that form which is show in Preview 
but this form is open when user click on create and Edit from line 
there is no id which i can inherit i also active developer mode but can't show id

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,

Please Try to inherit stock.view_production_lot_form_simple form view.

Code

Ảnh đại diện
Huỷ bỏ
Tác giả

you code is working perfect ally but can you pls tell me where you find this external id ....my debug mode is activated but i can't find External ID of that particular Form Pls help me to identify ID

you can check in form view near to conversation menu in the top.

Câu trả lời hay nhất

Hi,

You can refer the following blog for adding new fields in the existing view

https://www.cybrosys.com/blog/adding-custom-fields-to-existing-views-in-odoo-v12

Ảnh đại diện
Huỷ bỏ
Tác giả

i open form when i click on create and edit button at that point i can't find external id

you want the external id of the model stock.production.lot?

Tác giả

yes ...

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 21
2334
1
thg 5 16
3807
3
thg 4 16
9882
2
thg 6 15
8501
0
thg 3 15
3435