mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: Mark parentdoc as dirty if child is dirty
This commit is contained in:
parent
ab51ce3122
commit
5273177768
@ -73,6 +73,11 @@ module.exports = class BaseDocument extends Observable {
|
||||
|
||||
if (this[fieldname] !== value) {
|
||||
this._dirty = true;
|
||||
// if child is dirty, parent is dirty too
|
||||
if (this.meta.isChild && this.parentdoc) {
|
||||
this.parentdoc._dirty = true;
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
this[fieldname] = [];
|
||||
for (let row of value) {
|
||||
|
Loading…
Reference in New Issue
Block a user