Bugfix for tasks not having customer field.
This commit is contained in:
parent
44c15961c7
commit
08c31a2e3f
1 changed files with 2 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ def before_insert(doc, method):
|
|||
doc.project_template = project_doc.project_template
|
||||
if project_doc.job_address:
|
||||
doc.custom_property = project_doc.job_address
|
||||
|
||||
|
||||
def after_insert(doc, method):
|
||||
print("DEBUG: After Insert Triggered for Task")
|
||||
print("DEBUG: Linking Task to Customer and Address")
|
||||
|
|
@ -18,7 +18,4 @@ def after_insert(doc, method):
|
|||
AddressService.append_link_v2(
|
||||
doc.custom_property, "links", {"link_doctype": "Task", "link_name": doc.name}
|
||||
)
|
||||
ClientService.append_link_v2(
|
||||
doc.customer, "tasks", {"task": doc.name, "project_template": doc.project_template }
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue