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

fix: Don't add name field for singles

This commit is contained in:
Faris Ansari 2019-10-26 20:16:19 +05:30
parent fa004db117
commit 1f77238cd4

View File

@ -25,7 +25,7 @@ module.exports = class BaseMeta extends BaseDocument {
setValues(data) {
Object.assign(this, data);
if (!this.fields.find(df => df.fieldname === 'name')) {
if (!this.fields.find(df => df.fieldname === 'name') && !this.isSingle) {
this.fields = [
{
label: frappe._('Name'),