如何通过继承更改Many2one字段的域?

时间:2018-04-10 08:35:23

标签: python python-3.x odoo stock odoo-11

我的意思是;

名称为&#34的模型; stock.return.picking"有" location_id"领域。

当我点击返回按钮时,我想查看所有location_id。但是location_id有域名:

location_id = fields.Many2one(
    comodel_name='stock.location',
    string='Return Location',
    domain="['|', ('id', '=', original_location_id),'&', ('return_location', '=', True), ('id', 'child_of',     parent_location_id)]"
)

如何更改此域名?

1 个答案:

答案 0 :(得分:4)

您必须重新定义var coordinatesArr = JSON.parse('#{yourBean.strProperty}'); 字段,继承自location_id模型。你可以这样做:

stock.return.picking