表单视图odoo中的重复字段问题
Duplicate field issue in form view odoo
我在 stock.quant.package 模型中创建了一个字段。
tracking_ref=fields.Char("Tracking Ref")
这个字段在两个独立的模块中使用,我无法提供模块依赖性,因为它们都是独立的模块。
It may be possible that both modules are installed in same database or it may
be possible that in some database only one module is installed.
Due to that reason i have create same field & view in both modules.
But now issue is that if both modules are installed then field is
available two times in the form view.
是否有可能如果我们同时安装这两个模块,那么字段在表单视图中将只显示一次。
我不确定这是最好的解决方案。试试看:
- 创建一个新模块,比如
module_common
- 将所有常用字段和函数放入新模块
module_common
- 使该模块依赖于另外两个模块。
例如:module_a
取决于 module_common
,module_common
取决于 module_common
。
希望它能解决您的问题。
我在 stock.quant.package 模型中创建了一个字段。
tracking_ref=fields.Char("Tracking Ref")
这个字段在两个独立的模块中使用,我无法提供模块依赖性,因为它们都是独立的模块。
It may be possible that both modules are installed in same database or it may be possible that in some database only one module is installed.
Due to that reason i have create same field & view in both modules.
But now issue is that if both modules are installed then field is available two times in the form view.
是否有可能如果我们同时安装这两个模块,那么字段在表单视图中将只显示一次。
我不确定这是最好的解决方案。试试看:
- 创建一个新模块,比如
module_common
- 将所有常用字段和函数放入新模块
module_common
- 使该模块依赖于另外两个模块。
例如:module_a
取决于 module_common
,module_common
取决于 module_common
。
希望它能解决您的问题。