跳至内容
菜单
此问题已终结
1 回复
1168 查看

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

形象
丢弃