Openerp 基于另一类字段的odoo域过滤器
所以我有两门课 这个 还有这个Openerp 基于另一类字段的odoo域过滤器,openerp,odoo-8,Openerp,Odoo 8,所以我有两门课 这个 还有这个 class RelocationLine(models.Model): _name = 'test.plan_relocation_line' relocation_id = fields.Many2one('test.plan_relocation') source_id = fields.Many2one('test.plan_spending_actual',required=True) available_source = fields.Float(re
class RelocationLine(models.Model):
_name = 'test.plan_relocation_line'
relocation_id = fields.Many2one('test.plan_relocation')
source_id = fields.Many2one('test.plan_spending_actual',required=True)
available_source = fields.Float(related='source_id.available',default=0,readonly=True)
问题是我想根据“price\u id”字段过滤“source\u id”。
我怎样才能做到这一点
这两个类位于一个xml中。xml的一部分如下所示
<field name="relocation_line_ids">
<tree editable="bottom">
<field name="source_id" string="Source" />
<field name="available_source" />
</tree>
</field>
非常感谢您的帮助。在test.plan\u relocation\u行的xml中:
<field name="source_id" domain="[('price_id', '=',parent.price_id)]" />
希望它能帮助您..不知何故,它不起作用,也不起过滤作用。顺便说一句,这两个类只有1个xml,我已经更新了我的问题。谢谢
<field name="source_id" domain="[('price_id', '=',parent.price_id)]" />