commit | 6c92cff22657908498a6ee208965a75593fadf44 | [log] [tgz] |
---|---|---|
author | Gaurav Naik <gvrvnk@gmail.com> | Fri May 11 07:52:50 2018 +0530 |
committer | Gaurav Naik <gvrvnk@gmail.com> | Fri May 11 07:52:50 2018 +0530 |
tree | 6de500d495e082c16ecaacc38d5540ac4d046c48 | |
parent | 56f0328bed064354dc4115896fda588130e624ee [diff] |
Accounting Period autoname
diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index 31f1849..030189d 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py
@@ -7,4 +7,9 @@ from frappe.model.document import Document class AccountingPeriod(Document): - pass + def validate(self): + self.validate_overlap() + + def autoname(self): + company_abbr = frappe.db.get_value("Company", self.company, "abbr") + self.name = " - ".join([self.period_name, company_abbr])