Hello, I was trying to understand decorator @api.dependens_context in odoo but I didn't find any document explaining it clearly can anyone explain it clearly with example and what is used for, Thanks and BR.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- 프로젝트
- MRP
신고된 질문입니다
2
답글
2824
화면
Hi,
Here is the link to the documentation:
Hope it helps
Hello ZiadHamdii
We use the ''@api.depends_context'' decorator for non-stored ‘compute’ methods to indicate the context dependencies for these methods.
The arguments passed will be the key in the context’s dictionary.
example:
@api.depends_context('company')
def _compute_currency_id(self):
self.currency_id = self.env.company.currency_idThanks!!
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
|
1
11월 25
|
2213 | ||
|
|
0
11월 25
|
135 | ||
|
|
1
11월 25
|
3437 | ||
|
|
2
8월 25
|
4006 | ||
|
|
1
7월 25
|
1970 |