Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1171 มุมมอง

I need the Domain for the field “source location“ beacuse i need to add it when taking returns from customers 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,


Try the following code.

@api.onchange('customer_id')

 def onchange_customer_id(self):

     if self.customer_id:

         return { 'domain:

          { 'location_id': [('usage', '=' ,'internal'), ('return_location', '=', True)] }

          }


Hope it helps

อวตาร
ละทิ้ง