跳至内容
菜单
此问题已终结
5 回复
4359 查看

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

形象
丢弃
最佳答案

Hello,

Please Try to inherit stock.view_production_lot_form_simple form view.

Code

形象
丢弃
编写者

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.

最佳答案

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

形象
丢弃
编写者

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?

编写者

yes ...

相关帖文 回复 查看 活动
0
1月 21
1759
1
5月 16
3381
3
4月 16
9439
2
6月 15
8135
0
3月 15
3151