İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
9853 Görünümler

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?

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Oca 20
12189
1
Oca 20
4896
1
Mar 23
2512
2
Ara 22
24064
0
Mar 20
4212