Commit graph

39 commits

Author SHA1 Message Date
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
David Arnold
608f2ed20b
test: make phone number unique bis (#24367) 2024-01-16 10:56:47 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
barredterra
b553ed98d8 refactor: inline immediately returned variable
Inline a variable to a return in the case when the
variable being declared is immediately returned
2023-08-08 18:09:49 +02:00
Gavin D'souza
31049b705e fix(db_query): With as_list, pass NULL to maintain order 2023-01-25 14:01:02 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Ankush Menat
40f27f908a style: format JS files with prettier 2022-08-04 14:51:01 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +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
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
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
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Himanshu Warekar
7dba556b8c test: fix test cases 2019-09-16 10:19:40 +05:30
Himanshu Warekar
cc74ab39a0 test: fix test cases 2019-09-15 20:38:17 +05:30
Himanshu Warekar
9f0a4a6cb0 fix: reintroduced mobile_no 2019-09-11 20:12:57 +05:30
Himanshu Warekar
cbaf7f08f5 fix: codacy 2019-08-11 09:12:38 +05:30
Himanshu Warekar
d50c35f3cf chore: codacy fixes 2019-08-09 16:50:02 +05:30
Himanshu Warekar
8658cecbd6 fix: report 2019-08-09 13:42:58 +05:30
Himanshu Warekar
779654a621 fix: rename field in contacts 2019-08-09 11:04:49 +05:30
Himanshu Warekar
fa662e1732 feat: move to newer contacts structure 2019-08-08 23:49:53 +05:30
Himanshu
0e7123d141 fix(Addresses and Contacts Report): Frappe throw when no record present (#7504) 2019-05-21 14:50:49 +05:30
Himanshu Warekar
5c3121ab84 fix: making it py2 and py3 compatible 2019-04-06 22:50:05 +05:30
Himanshu Warekar
b3359f5eb2 fix: code refactor 2019-04-06 21:53:09 +05:30
Himanshu Warekar
422a1e151b fix: test cases using assertListEqual 2019-04-05 16:00:16 +05:30
Himanshu Warekar
f06fa603d7 fix: test case 2019-04-05 15:22:55 +05:30
Himanshu Warekar
1b4550c503 fix: test case 2019-04-05 15:05:09 +05:30
Himanshu
14f63830ad
fix: test case 2019-04-05 13:29:07 +05:30
Himanshu Warekar
674bee4cde fix: fetch all contacts and addresses 2019-04-05 11:01:51 +05:30
Aditya Hase
837bfc0995 fix(unicode): Import unicode_literals in every file (#6805)
* fix(unicode): Import unicode_literals in every file

* fix(unicode): Test if safe_json_loads return unicode instead of bytes
2019-01-25 11:56:27 +05:30
Shivam Mishra
12798c9ee5 Fixed Addresses and Contacts Report (#6651)
* Fixed Addresses and Contacts Report

* minor change

* [Report Fix] Added test cases for Addresses and Contacts Report

* [Report Fix] Fixed a small typo 'Doctype' - 'DocType'

* [Report Fix] Fixed code formatting

* [Code Formatting] Removed unused variables

* [Code Formatting] Removed unused variable doc
2019-01-02 09:12:07 +05:30
Ameya Shenoy
b42a87746a
Merge branch 'master' into staging-fixes 2018-10-19 12:42:37 +00:00
Rohit Waghchaure
4db18698d5 [Fix] Report Addresses And Contacts not working 2018-10-17 15:46:25 +05:30
Faris Ansari
09735e9f3e Query Report: deprecated query_report_filters_by_name (#5834)
* QueryReport

- Remove set_filters_by_name
- Remove save_user_settings
- Only print visible columns

* Query Report

- Deprecate frappe.query_report_filters_by_name
- New API: get_filter_value and set_filter_value
in frappe.query_report object
- Replace instances of old API with new API

* Undo changes in query_report.py
2018-07-18 09:28:36 +05:30
Shreya Shah
2c05009df3 Modify Report Addresses and Contacts (#5642)
* Modify Report Addresses and Contacts

Removed party type references and moved that to a new report in ERPNext.

* Change label to Reference Type

* Rename labels
2018-06-01 18:04:59 +05:30
Ameya Shenoy
9c4f47b461 optimized addr_and_contact report by @nabinhait
Old implemetation involved 2 sql queries for every party_type, one for
address and one for contact. This was timing out if the party_type size
was too large. New implementation involves 3 queries only.

Stats:
	no_of_records | party_type | old_time | new_time
	--------------+------------+----------+---------
	27000         | Customer   | 209 secs | 1.5 sec
2018-05-09 17:50:43 +05:30
Makarand Bauskar
6f164ed975 [minor] removed the default for party type field in address and contacts report (#4614) 2017-12-14 14:53:22 +05:30
KanchanChauhan
f52e389d4f Salutation and Gender in Contact (#3079) 2017-06-13 15:25:53 +05:30