@ api.onchange ( 'duration' )def compute_status ( self ):
if self .duration! = 0 :
for record in self .subscription:
record.write ({ 'subscription_months_calc' : record.duration + record.subscription_months_calc})
record. write ({ 'subscription_expiry_date' : record.subscription_registration_date + relativedelta (
months = record.subscription_months_calc)})
I have wrote the above function to make change into my another custom module. It is not changing the value nor it is giving an error. Kindly help me.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
Hi,
Please try his code
from odoo.fields import Date |
Hope it helps
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
1
11월 24
|
1226 | ||
|
1
4월 23
|
2584 | ||
|
7
2월 23
|
9123 | ||
|
0
9월 22
|
1715 | ||
|
1
7월 22
|
1474 |