From 496e277d8aa1663aeb766c3e492d8002c436fbab Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Mon, 9 Mar 2015 18:30:43 +0530 Subject: [PATCH] print format added --- .../doctype/job_applicant/job_applicant.json | 9 +- .../hr/doctype/offer_letter/offer_letter.json | 116 ++++-------------- .../hr/doctype/offer_letter_terms/__init__.py | 0 .../offer_letter_terms.json | 75 +++++++++++ .../offer_letter_terms/offer_letter_terms.py | 9 ++ erpnext/hr/doctype/offer_term/__init__.py | 0 erpnext/hr/doctype/offer_term/offer_term.json | 70 +++++++++++ erpnext/hr/doctype/offer_term/offer_term.py | 9 ++ .../hr/doctype/offer_term/test_offer_term.py | 11 ++ erpnext/hr/print_format/__init__.py | 0 .../hr/print_format/offer_letter/__init__.py | 0 .../offer_letter/offer_letter.json | 16 +++ 12 files changed, 216 insertions(+), 99 deletions(-) create mode 100644 erpnext/hr/doctype/offer_letter_terms/__init__.py create mode 100644 erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.json create mode 100644 erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.py create mode 100644 erpnext/hr/doctype/offer_term/__init__.py create mode 100644 erpnext/hr/doctype/offer_term/offer_term.json create mode 100644 erpnext/hr/doctype/offer_term/offer_term.py create mode 100644 erpnext/hr/doctype/offer_term/test_offer_term.py create mode 100644 erpnext/hr/print_format/__init__.py create mode 100644 erpnext/hr/print_format/offer_letter/__init__.py create mode 100644 erpnext/hr/print_format/offer_letter/offer_letter.json diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.json b/erpnext/hr/doctype/job_applicant/job_applicant.json index 3ba3012f3d..f35cacda07 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.json +++ b/erpnext/hr/doctype/job_applicant/job_applicant.json @@ -1,9 +1,5 @@ { -<<<<<<< HEAD - "autoname": "", -======= "autoname": "JA-.######", ->>>>>>> Offer Letter - New Doctype added and job_applicant naming changed "creation": "2013-01-29 19:25:37", "description": "Applicant for a Job", "docstatus": 0, @@ -70,11 +66,7 @@ ], "icon": "icon-user", "idx": 1, -<<<<<<< HEAD "modified": "2015-03-23 05:42:02.016041", -======= - "modified": "2015-03-04 15:30:02.663549", ->>>>>>> Offer Letter - New Doctype added and job_applicant naming changed "modified_by": "Administrator", "module": "HR", "name": "Job Applicant", @@ -94,5 +86,6 @@ "write": 1 } ], + "search_fields": "applicant_name", "title_field": "applicant_name" } \ No newline at end of file diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.json b/erpnext/hr/doctype/offer_letter/offer_letter.json index 4014c44c1a..e98ab6b4c2 100644 --- a/erpnext/hr/doctype/offer_letter/offer_letter.json +++ b/erpnext/hr/doctype/offer_letter/offer_letter.json @@ -5,6 +5,7 @@ "autoname": "Offer-.#####", "creation": "2015-03-04 14:20:17.662207", "custom": 0, + "default_print_format": "Offer Letter", "docstatus": 0, "doctype": "DocType", "document_type": "Transaction", @@ -36,7 +37,8 @@ "options": "job_applicant.applicant_name", "permlevel": 0, "precision": "", - "read_only": 1 + "read_only": 1, + "reqd": 1 }, { "fieldname": "column_break_3", @@ -45,6 +47,7 @@ "precision": "" }, { + "allow_on_submit": 1, "fieldname": "status", "fieldtype": "Select", "label": "Status", @@ -55,7 +58,7 @@ }, { "allow_on_submit": 0, - "fieldname": "desgnation", + "fieldname": "designation", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, @@ -69,92 +72,10 @@ "print_hide": 0, "read_only": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0 }, - { - "fieldname": "section_break_4", - "fieldtype": "Section Break", - "permlevel": 0, - "precision": "" - }, - { - "allow_on_submit": 0, - "fieldname": "expected_joining_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Expected Joining Date", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "column_break_7", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, - { - "allow_on_submit": 0, - "description": "In months.", - "fieldname": "probation_period", - "fieldtype": "Int", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Probation Period", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "section_break_9", - "fieldtype": "Section Break", - "permlevel": 0, - "precision": "" - }, - { - "allow_on_submit": 0, - "fieldname": "salary", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "label": "Salary", - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0 - }, - { - "fieldname": "column_break_11", - "fieldtype": "Column Break", - "permlevel": 0, - "precision": "" - }, { "fieldname": "company", "fieldtype": "Link", @@ -162,7 +83,22 @@ "options": "Company", "permlevel": 0, "precision": "", - "print_hide": 1 + "print_hide": 1, + "reqd": 1 + }, + { + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "permlevel": 0, + "precision": "" + }, + { + "fieldname": "offer_terms", + "fieldtype": "Table", + "label": "Offer Terms", + "options": "Offer Letter Terms", + "permlevel": 0, + "precision": "" }, { "fieldname": "section_break_14", @@ -216,7 +152,7 @@ "is_submittable": 1, "issingle": 0, "istable": 0, - "modified": "2015-03-05 00:54:34.719300", + "modified": "2015-03-10 11:41:24.870015", "modified_by": "Administrator", "module": "HR", "name": "Offer Letter", @@ -225,11 +161,10 @@ "permissions": [ { "amend": 1, - "apply_user_permissions": 0, "cancel": 1, "create": 1, "delete": 1, - "email": 0, + "email": 1, "export": 1, "import": 1, "permlevel": 0, @@ -237,8 +172,7 @@ "read": 1, "report": 1, "role": "HR User", - "set_user_permissions": 0, - "share": 0, + "share": 1, "submit": 1, "write": 1 } diff --git a/erpnext/hr/doctype/offer_letter_terms/__init__.py b/erpnext/hr/doctype/offer_letter_terms/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.json b/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.json new file mode 100644 index 0000000000..70a7e611ac --- /dev/null +++ b/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.json @@ -0,0 +1,75 @@ +{ + "allow_copy": 0, + "allow_import": 0, + "allow_rename": 0, + "creation": "2015-03-05 12:53:45.342292", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "fields": [ + { + "allow_on_submit": 0, + "fieldname": "offer_term", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Offer Term", + "no_copy": 0, + "options": "Offer Term", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0 + }, + { + "fieldname": "column_break_2", + "fieldtype": "Column Break", + "permlevel": 0, + "precision": "" + }, + { + "allow_on_submit": 0, + "fieldname": "value", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 1, + "label": "Value", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "modified": "2015-03-10 18:28:01.978680", + "modified_by": "Administrator", + "module": "HR", + "name": "Offer Letter Terms", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.py b/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.py new file mode 100644 index 0000000000..f98cc9feee --- /dev/null +++ b/erpnext/hr/doctype/offer_letter_terms/offer_letter_terms.py @@ -0,0 +1,9 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class OfferLetterTerms(Document): + pass diff --git a/erpnext/hr/doctype/offer_term/__init__.py b/erpnext/hr/doctype/offer_term/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/hr/doctype/offer_term/offer_term.json b/erpnext/hr/doctype/offer_term/offer_term.json new file mode 100644 index 0000000000..61e45a4b4d --- /dev/null +++ b/erpnext/hr/doctype/offer_term/offer_term.json @@ -0,0 +1,70 @@ +{ + "allow_copy": 0, + "allow_import": 1, + "allow_rename": 0, + "autoname": "field:offer_term", + "creation": "2015-03-05 13:00:30.900471", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "Master", + "fields": [ + { + "allow_on_submit": 0, + "fieldname": "offer_term", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Offer Term", + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0 + } + ], + "hide_heading": 0, + "hide_toolbar": 0, + "in_create": 0, + "in_dialog": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "modified": "2015-03-10 18:19:23.032194", + "modified_by": "Administrator", + "module": "HR", + "name": "Offer Term", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 0, + "export": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "HR User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, + "write": 1 + } + ], + "read_only": 0, + "read_only_onload": 0, + "sort_field": "modified", + "sort_order": "DESC" +} \ No newline at end of file diff --git a/erpnext/hr/doctype/offer_term/offer_term.py b/erpnext/hr/doctype/offer_term/offer_term.py new file mode 100644 index 0000000000..6a63201106 --- /dev/null +++ b/erpnext/hr/doctype/offer_term/offer_term.py @@ -0,0 +1,9 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class OfferTerm(Document): + pass diff --git a/erpnext/hr/doctype/offer_term/test_offer_term.py b/erpnext/hr/doctype/offer_term/test_offer_term.py new file mode 100644 index 0000000000..d0dd14d1e6 --- /dev/null +++ b/erpnext/hr/doctype/offer_term/test_offer_term.py @@ -0,0 +1,11 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest + +# test_records = frappe.get_test_records('Offer Term') + +class TestOfferTerm(unittest.TestCase): + pass diff --git a/erpnext/hr/print_format/__init__.py b/erpnext/hr/print_format/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/hr/print_format/offer_letter/__init__.py b/erpnext/hr/print_format/offer_letter/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/hr/print_format/offer_letter/offer_letter.json b/erpnext/hr/print_format/offer_letter/offer_letter.json new file mode 100644 index 0000000000..08ad33398a --- /dev/null +++ b/erpnext/hr/print_format/offer_letter/offer_letter.json @@ -0,0 +1,16 @@ +{ + "creation": "2015-03-05 14:34:26.751210", + "custom_format": 0, + "disabled": 0, + "doc_type": "Offer Letter", + "docstatus": 0, + "doctype": "Print Format", + "html": "{% if letter_head and not no_letterhead %}\n
{{ letter_head }}

\n{% endif %}\n
\n\nDear {{ doc.applicant_name }},

\n\nWe are pleased to appoint you in the services of {{ doc.company }} on the terms and conditions detailed in this letter.\n\n

\n\nYour designation shall be {{ doc.designation }}.\n\n
\n{%- for row in doc.offer_terms -%}\n{{ row.offer_term }}: {{ row.value }}\n
\n{%- endfor -%}\n
\n\nPlease read the detailed terms as below. If you have any queries, feel free to get in touch with us.\nWe look forward to your long and fruitful career association with our organisation.\nIf you decide to join us, 'Welcome to {{ doc.company }} !'\n\n
\n
\n

\n\nYours truely,\n\n



\n\nAuthorized Signatory\n\n
{{ doc.company }}

\n
\n
\n\t{{doc.terms}}\n
", + "modified": "2015-03-09 18:51:17.400960", + "modified_by": "Administrator", + "name": "Offer Letter", + "owner": "Administrator", + "print_format_builder": 0, + "print_format_type": "Server", + "standard": "Yes" +} \ No newline at end of file