跳至內容
選單
此問題已被標幟
2 回覆
9862 瀏覽次數

What I mean is that;

Model with name "stock.return.picking" has "location_id" field. 

When I click on the return button , I want to see all the location_id. But location_id has domain:

location_id = fields.Many2one(  'stock.location', 'Return Location',

       domain="['|', ('id', '=', original_location_id), '&', ('return_location', '=', True), ('id', 'child_of',     parent_location_id)]")


How can I change this domain?

頭像
捨棄
最佳答案

Hi..

You need to inherit the model stock.return.picking and just re-define the field.

class ClassName(models.Model):

     _inherit = 'stock.return.picking'

    location_id = fields.Many2one(  'stock.location', domain=[])

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
1月 20
12193
1
1月 20
4902
1
3月 23
2515
2
12月 22
24067
0
3月 20
4219