콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4038 화면

I would like to programmatically (ie: via ORM) give a value to this field based on a distribution of 100% to a specific Analytic Account. 

What kind of Python code would I need to write in order to supply a value for the new Analytic Distribution field at Odoo 16?

Are there examples of how to use ORM to define a distribution for a single or for multiple Analytic Accounts?


아바타
취소
베스트 답변

You can see how we do this via the test framework.

Review https://github.com/odoo/odoo/blob/16.0/addons/account/tests/test_account_analytic.py


When using a dictionary for a new record, supply something like:



Via assignment, do something like:


아바타
취소
베스트 답변

@Ray,

What is analytic_account_a and analytic_account_b here. I'm getting the error while using this method that these fields do not exist.

아바타
취소
관련 게시물 답글 화면 활동
0
10월 23
1173
1
7월 23
4369
0
11월 22
2373
1
2월 22
5405
0
1월 20
3705