address_get 的目的是什么?
What is the purpose of address_get?
请告诉我address_get()
的目的是什么?我们为什么要用这个?
这里在销售模块"sale.py"
中,用作:
addr = self.partner_id.address_get(['delivery', 'invoice'])
用于从三个结构中查找需要的地址。
来源:
Find contacts/addresses of the right type(s) by doing a depth-first-search through descendants within company boundaries (stop at entities flagged is_company
) then continuing the search at the ancestors that are within the same company boundaries. Defaults to partners of type 'default'
when the exact type is not found, or to the provided partner itself if no type 'default'
is found either.
请告诉我address_get()
的目的是什么?我们为什么要用这个?
这里在销售模块"sale.py"
中,用作:
addr = self.partner_id.address_get(['delivery', 'invoice'])
用于从三个结构中查找需要的地址。
来源:
Find contacts/addresses of the right type(s) by doing a depth-first-search through descendants within company boundaries (stop at entities flagged
is_company
) then continuing the search at the ancestors that are within the same company boundaries. Defaults to partners of type'default'
when the exact type is not found, or to the provided partner itself if no type'default'
is found either.