Merge pull request #3428 from nabinhait/develop
[fix] Fiscal year issue due to missing field in Material Request
This commit is contained in:
commit
9fd42ed2f7
@ -38,6 +38,7 @@ class AccountsController(TransactionBase):
|
|||||||
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
|
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
|
||||||
|
|
||||||
def before_recurring(self):
|
def before_recurring(self):
|
||||||
|
if self.meta.get_field("fiscal_year"):
|
||||||
self.fiscal_year = None
|
self.fiscal_year = None
|
||||||
if self.meta.get_field("due_date"):
|
if self.meta.get_field("due_date"):
|
||||||
self.due_date = None
|
self.due_date = None
|
||||||
@ -46,7 +47,7 @@ class AccountsController(TransactionBase):
|
|||||||
for fieldname in ["posting_date", "transaction_date"]:
|
for fieldname in ["posting_date", "transaction_date"]:
|
||||||
if not self.get(fieldname) and self.meta.get_field(fieldname):
|
if not self.get(fieldname) and self.meta.get_field(fieldname):
|
||||||
self.set(fieldname, today())
|
self.set(fieldname, today())
|
||||||
if not self.fiscal_year:
|
if self.meta.get_field("fiscal_year") and not self.fiscal_year:
|
||||||
self.fiscal_year = get_fiscal_year(self.get(fieldname))[0]
|
self.fiscal_year = get_fiscal_year(self.get(fieldname))[0]
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user