Hello, i got a model (book) where i can add books and assign authors to them (res.partner) in many2many: authors = fields.Many2many('res.partner', string='Authors') I then made another model which inherits from res partner to add a boolean 'isAuthor', that way i can filter them in a graph. Now i want to add a computed field that counts how many books an author has. I made this: nbBooks = fields.Integer('Number of authored books', compute='nombre_livre_auteur', store=True) #@api.depends("author")
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
2093
화면
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
1
6월 25
|
15572 | ||
|
3
4월 25
|
5849 | ||
Compute Fields
해결 완료
|
|
2
7월 24
|
3897 | |
|
1
1월 24
|
1937 | ||
|
1
7월 22
|
2356 |