Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
9881 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Jan 20
12217
1
Jan 20
4925
1
Mar 23
2540
2
Des 22
24080
0
Mar 20
4241