2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 20:00:29 +00:00

Applying change to child first and then to parent in a child document

This commit is contained in:
Piyush Singhania 2021-10-14 23:39:32 +05:30
parent 9b9edd700c
commit 0cf247fa48

View File

@ -86,6 +86,7 @@ module.exports = class BaseDocument extends Observable {
// always run applyChange from the parentdoc
if (this.meta.isChild && this.parentdoc) {
await this.applyChange(fieldname);
await this.parentdoc.applyChange(this.parentfield);
} else {
await this.applyChange(fieldname);