Hi guys,
I want to put a caculatation in a child table which use data from another childtable in the doctype. Like that
And here my child table:
Who know how to solve this? Pls help me.
Thanks
Hi guys,
I want to put a caculatation in a child table which use data from another childtable in the doctype. Like that
Hi I’m new to frappe and facing kinda similar issue as yours, i want a calculation in the same childtable.
the information in the childtable is populated from some calculation, i want to calculate a value called working hours upon change in the populated values
Enable developer mode. When you enable developer mode files will be created.
Consider parent doctype is Master and child doctype is Status. Slave doctype contains two fields, status and issued on. Master doctype contains a field masterstatus. To update last updated status value of Slave(Child) in masterstatus of Master. Edit the Master.py
from frappe.model.document import Document
1. class Master(Document):
2. def before_save(self):
3. if(len(self.status_details)>0):
4. self.masterstatus = f'{self.status_details[-1].status}'
masterstatus is a read only field and status_details (Line no 3) is table field with options Slave in Master doctype.