i want to create field where countinues count
i have field
odometer_pasang = fields.Integer(string='Odometer Pemasangan Sebelumnya')
odometer_tire = fields.Integer(string='Odometer Tire', compute='_compute_odometer_tire')
odometer_pengecekan = fields.Integer(string='Odometer Pengecekan')
odometer_cek = fields.Integer(string='KM Pemasangan - KM Pengecekan', compute='_compute_odometer_cek')
@api.depends('odometer_pengecekan','odometer_pasang')
def _compute_odometer_cek(self):
for r in self:
if r.odometer_pengecekan and r.odometer_pasang:
r.odometer_cek = r.odometer_pengecekan - r.odometer_pasang
@api.depends('odometer_pengecekan','odometer_pasang')
def _compute_odometer_tire(self):
for r in self:
tampung = r.odometer_pengecekan - r.odometer_pasang
r.odometer_tire += tampung
i want to make field odometer_tire always count from odometer_cek but for now odometer_tire not counting sum
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- 프로젝트
- MRP
신고된 질문입니다
2
답글
4347
화면
you need to add onchange method to achieve your goal...
Why ignore the onchange method?
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
|
2
12월 23
|
2897 | ||
|
|
3
2월 21
|
18828 | ||
|
|
1
8월 18
|
9046 | ||
|
|
2
8월 18
|
4438 | ||
|
|
0
4월 18
|
4278 |