Commit graph

192 commits

Author SHA1 Message Date
Suraj Shetty
39dfb96ff8
Merge pull request #14152 from anupamvs/address-spacing 2021-09-09 12:30:53 +05:30
Anupam
35d563edb0 fix: contact.py spacing issue 2021-09-09 11:50:47 +05:30
Anupam
6ca2788cc5 fix: spacing issue 2021-09-09 11:48:20 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
65864c027f chore: Update module license header
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
2021-09-03 11:51:01 +05:30
Gavin D'souza
c489846547 Merge branch 'develop' into unnecessary_comprehensions 2021-06-11 19:30:23 +05:30
Gavin D'souza
651a9ff42e fix: Return address 'name' instead of 'parent' field 2021-05-28 21:43:07 +05:30
Gavin D'souza
bd6fcddd04 chore: Drop unreachable code 2021-05-26 16:41:32 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Gavin D'souza
e8cf96d1d3 fix: Replace cmp with different logic
cmp was being used from past.builtins library since it was deprecated in
PY2. It's hard to understand behaviour of their usages, so this is an
attempt to replicate behaviour with simpler logic, making this more
readable.

Also, removed usages of iteritems and string_types, compatibility
imports
2021-05-26 13:25:01 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
Suraj Shetty
57166b9964 test: Fix test dependencies 2021-05-05 13:15:52 +05:30
Frappe Bot
d30596b15e refactor: Delete Qunit test files
Since it is no longer used
2021-04-27 21:37:15 +05:30
Andy Zhu
138c7841c2
fix: set_primary and set_primary_email bug (#12299)
* fix: set_primary and set_primary_email bug

When user untick the `is_primary_phone` or `is_primary_mobile` from the contact numbers table, we should reset the phone, mobile number etc.
Same goes for the email address table.

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.py

fix variable naming as suggested

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* test: Set empty string instead of none for number

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2021-03-10 05:02:50 +00:00
barredterra
3ad56b2d5f fix: fetch contacts in auto repeat 2021-02-03 15:46:00 +01:00
Suraj Shetty
b5d9c1e816 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-11-06 10:42:37 +05:30
sezanzeb
ea6ebd396b chore: State/Province for Address 2020-10-21 16:18:01 +02:00
Shivam Mishra
9e39a7464a Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-10-21 11:55:13 +05:30
Abhishek Balam
e31162e9f1 fix: move get_shipping_address() from frappe to erpnext since it has no references 2020-10-14 21:10:16 +05:30
Abhishek Balam
37a3096b68 fix: remove serverside validation 2020-10-14 19:09:36 +05:30
Abhishek Balam
fb40044496 fix: moving 'is your company address' field to erpnext 2020-10-14 18:09:28 +05:30
Suraj Shetty
ba29d8d8b4 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-10-01 13:10:37 +05:30
Wolfram Schmidt
a4c7eb9620
Update salutation.json (#11501)
Abbility to merge salutations after creation. Usefull when Mistakes are made like "Mrs." and "Mrs"

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>
2020-09-21 15:04:08 +05:30
Suraj Shetty
7035eff6e3 Merge branch 'develop' of https://github.com/frappe/frappe into rebrand-ui 2020-08-27 19:32:57 +05:30
prssanna
b33471c35a fix: replace darkgrey with darkgray 2020-08-27 15:44:37 +05:30
Afshan
ce161b37f8 fix: contact not showing in form 2020-08-26 22:32:46 +05:30
Suraj Shetty
21a0cafe62
fix: Validate and sanitise whitelisted search methods using decorator (#11197)
* fix: Validate and sanitize whitelisted search methods using decorator

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* refactor: Replace decorator name

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>
2020-08-05 19:42:19 +05:30
Chinmay D. Pai
42daf5a905
chore: escape value and remove unused condition
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-20 19:05:43 +05:30
Chinmay D. Pai
28399ba94b
fix: check for searchfield in meta
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-16 15:41:29 +05:30
Chinmay D. Pai
1e6e305a37
fix: check if searchfield exists in default columns
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-16 15:36:07 +05:30
Chinmay D. Pai
907411d33f
fix: validate if field exists in meta before adding to query
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-16 15:33:04 +05:30
Suraj Shetty
0e1a8006ff
fix: Return empty array 2020-07-14 12:56:12 +05:30
Chinmay D. Pai
36d1b5f015
fix: check if field exists in meta before executing query
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-09 12:27:39 +05:30
Chinmay D. Pai
338151a7e5
fix: correctly format sql query
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-07 13:00:55 +05:30
Chinmay D. Pai
8ddfd2344d
chore: add search queries to whitelist
these functions are called through search widget and need to be
whitelisted to work

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-07-02 12:55:04 +05:30
Suraj Shetty
62661704d3
feat: Show phone icon if phone call handler is available (#10626) 2020-06-13 20:21:09 +05:30
Shivam Mishra
19e16d8a5a fix: TypeError in cmp 2020-05-16 20:08:38 +05:30
Rohit Waghchaure
ee0e4e0a44 fix: '>' not supported between instances of 'int' and 'NoneType' 2020-05-03 20:46:21 +05:30
Gavin D'souza
24e0174fcf fix: enable validations for email and phone data fields 2020-04-08 12:35:33 +05:30
Nabin Hait
006609f59e fix: Duplicate check before inserting in contcat email table 2020-03-30 19:34:36 +05:30
Deepesh Garg
05767310f8
fix: Preferred billing and shipping address selection (#9538)
* fix: Preferred billing and shipping address selection

* fix: Remove unnecessary code

* fix: looping

* fix: Cleaner function
2020-02-27 16:44:31 +05:30
Himanshu
52068ec0ca
fix: format error message (#9500)
* chore: format error message

* chore: formatting

* fix: remove / from translated string

* fix: typo

Co-authored-by: sahil28297 <37302950+sahil28297@users.noreply.github.com>
2020-02-19 15:53:46 +05:30
Himanshu
1353ef24b0
fix(Contact): Dont reroute from Contact to unrelated document (#9432)
* fix:dont reroute to doc if unrelated

* Update frappe/contacts/doctype/address/address.js

Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update frappe/contacts/doctype/contact/contact.js

Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>

* Update address.js

* Update contact.js

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-02-17 06:40:10 +00:00
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Marica
b1db148dc8 fix: More informational error message in Address. (#9352)
* fix: More informational error message in Address.

* fix: Changed message, added title.

* fix: Changes compatible with translations.

* fix: Translation fixes.

* style: Fix formatting

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-01-28 10:43:18 +00:00
deepeshgarg007
b4bff1d009 fix: Remove changes in notifications 2019-12-06 09:26:32 +05:30
deepeshgarg007
59d6be6446 fix: revert changes made to get_default_address function 2019-12-06 09:21:24 +05:30
deepeshgarg007
649759fc3f fix: Default and company address fixes 2019-11-29 14:56:37 +05:30
Gavin D'souza
57654d94aa fix(web-forms): view addresses only by session user 2019-11-20 12:53:52 +05:30
Himanshu Warekar
e1a7112d86 fix: test cases for contacts 2019-10-10 23:33:11 +05:30