Attrs on one2many field based on some parent field

时间:2016-09-14 06:42:02

标签: openerp odoo-9

I had customised "stock.picking" and added two new fields in "stock.move" and "stock.pack.operation", while creating Sale Order I will pass value for that two field from it, but while creating purchase order I will not pass value for that field.

Picking made from purchase order I don't need that two field in "stock.move" and "stock.pack.operation" so I need to hide that.

I had tried some attrs on field but I can't get expected result.

See Image for Ref

There is a purchase_id field in my stock.picking, so I put attrs like:

attrs="{'invisible': [('picking_id.purchase_id', '!=', False)]} 

or there is a location_id field in stock.pack.operation, for that I tried:

attrs="{'invisible': [('location_id.usage', '!=', 'supplier')]} 

0 个答案:

没有答案