Merge branch 'master' into develop
This commit is contained in:
commit
1b9caf90dd
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.1.21'
|
__version__ = '7.1.22'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@ -296,4 +296,3 @@ def save_invoice(e, si_doc, name):
|
|||||||
si_doc.docstatus = 0
|
si_doc.docstatus = 0
|
||||||
si_doc.flags.ignore_mandatory = True
|
si_doc.flags.ignore_mandatory = True
|
||||||
si_doc.insert()
|
si_doc.insert()
|
||||||
frappe.log_error(frappe.get_traceback())
|
|
||||||
|
|||||||
@ -79,9 +79,9 @@ class Timesheet(Document):
|
|||||||
self.status = "Completed"
|
self.status = "Completed"
|
||||||
|
|
||||||
def set_dates(self):
|
def set_dates(self):
|
||||||
if self.docstatus < 2:
|
if self.docstatus < 2 and self.time_logs:
|
||||||
start_date = min([d.from_time for d in self.time_logs])
|
start_date = min([getdate(d.from_time) for d in self.time_logs])
|
||||||
end_date = max([d.to_time for d in self.time_logs])
|
end_date = max([getdate(d.to_time) for d in self.time_logs])
|
||||||
|
|
||||||
if start_date and end_date:
|
if start_date and end_date:
|
||||||
self.start_date = getdate(start_date)
|
self.start_date = getdate(start_date)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user