Commit graph

179 commits

Author SHA1 Message Date
Rushabh Mehta
3dd5e399fa [minor] base_document.py return empty list if not filters 2017-11-14 16:48:43 +05:30
Rushabh Mehta
c02a7469aa
[refactor] a better set-only-once implementation with child tables (#4475)
* [refactor] a better set-only-once implementation with child tables

* [refactor] document.is_child_table_same(fieldname)

* [refactor] tests

* [refactor] tests

* [test] catch timeout reason

* [minor] edit in full page more prominent

* [minor] tests
2017-11-13 17:17:20 +05:30
Achilles Rasquinha
b8825ca116 Pure Python MySQL instead mysqlclient (with Python C API) (#4280)
* added PyMYSQL instead mysqlclient-python

* added pymysql import

* fixed db module import

* foxed self._conn wrapper

* updated cursor migration

* removed existent converters

* some more fixes towards API port

* modified travis

* updated doctype and revereted yml

* modified travis

* refreshed logging

* raw fix

* moved from hard coded constants to declarable instances

* moved from hard coded constants to declarable instances

* refactoring and logging

* moved to global import declaration

* fixed codacy

* unfixed codacy

* minor fix

* binary_type has a single

* deprecated alternative

* merged with latest

* fixed merge conflicts

* using deprecated alternative

* raw fix

* stupid fix

* using StringTypes instead

* brutal hack

* log

* tundebazy to the rescue

* fixed content_hash error

* frappe/database.py

* frappe/database.py

* updated database.py

* updated requirements

* updated requirements

* fixed codacy

* fixed codacy

* moved from DatabaseOperationalError to pymysql.InternalError

* moved from DatabaseOperationalError to pymysql.InternalError

* fixed codacy

* empty commit

* fixed codacy

* fixed codacy
2017-11-06 16:42:01 +05:30
Makarand Bauskar
6574920ca0 [hotfix] ignore validate_length for single doctypes (#4343) 2017-10-27 14:49:38 +05:30
Faris Ansari
d20f9e2895 Data Migration Tool (for hub) (#4144)
* migration tool

* custom field for primary key added

* foreign key and multiple linking F_key issue resolved

* refined code

* many-to-one mapping temp fix

* added support for pre-process + cleaned up code

* [various] fixes to setup wizard for developer mode, frappe.enqueue_doc, share with assign

* Refactor data migration module

* added migration for hub

* Add "Skip errors" in data import tool

* move db_set to document.py

* Add Data Migration Run

* Dynamic Migration ID

* move run() from Mapping to Run

* Push Deleted Documents

* fixes

* [migration] doc operation counts

* insert and update instead of push in connection

* fix count and total_pages, skip sync if total_pages is 0

* [migration] child tables

* fix complete()

* [page] remove required libs

* Add sidebar.js, rename old sidebar.js to form_sidebar.js

* [minor] get_empty_state fixes

* svg in icon

* remove image check

* fix codacy

* fix is_child_table check

* [connector] add get_list()

* Add test for Data Migration Run

* fix test

* truncate tabNote

* fix test

* sync todo with event to fix test

* fix db count

* [mapping] export Mapping to json

* Add docs for Data Migration Tool

* [migration] pull data as list, test case

* [hub] remove mapping export to files

* Pull refactor

* [test]

* Add comments

* [mapping] exec in mapping formula

* fix codacy

* fix codacy

* Remove exec for pre-process and post-process

* Add pre and post process for Push

* Remove formula

* fixes

* [refactor] add failed_log to pull, handle error in pull

* [test] Push, pull, update

* Fix codacy, fix insert_doc for pull

* Set migration id on successful insert

* fix update_doc

* fix update_doc

* method is a function

* child table mapping

* Refactor logging

* fix update_doc again

* fix hostname, password

* update docs, minors

* Remove assign_if_none

* Remove error handling from connection methods

* [refactor] Data migration run

* Break push stages into methods

* Migration run refactor

- fix test
- add separate fields for logging

* fix codacy

* fix hostname password

* fix test
2017-10-05 11:15:35 +05:30
Aditya Hase
7da257bfaa Use raise instead of six.reraise 2017-08-22 17:20:39 +05:30
Rushabh Mehta
751a35fe57 Merge pull request #3907 from adityahase/fix-sql-dict-values
Explicitly convert dict.values() to list
2017-08-11 12:57:22 +05:30
Aditya Hase
dfedd584ca Explicitly convert dict.values() to list 2017-08-11 00:12:00 +05:30
Aditya Hase
769338f136 Replaced all instances of basestring with six.string_types 2017-08-11 00:10:11 +05:30
Rushabh Mehta
1b3fab9daf [text-editor] dont keep refreshing value and better message for mandatory missing 2017-07-05 14:38:05 +05:30
Rushabh Mehta
45cbb7facc [minor] cleanups and optimization fixes 2017-06-20 12:46:43 +05:30
tundebabzy
bbde2ec4cf rewrite use of dict.iteritems (#3498)
* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility

* dict.iteritems to six.iteritems(dict) for python3 compatibility
2017-06-19 09:10:21 +05:30
tundebabzy
6fbe20caaa Except and raise statement python 3 compatible style (#3216)
* changes exception and raise statements to python 3 style

* changes except statement to python 3 style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* changes except and raise statement to python 3 compatible style

* adds six.reraise to fix python 3 style raise statements with traceback

* fixes indentation
2017-05-11 10:51:59 +05:30
Rushabh Mehta
1b13539b4f [fix] covert to unicode before sanitizing #8347 2017-05-10 14:24:55 +05:30
Nabin Hait
d836d1367f Fixed merge conflict 2017-03-15 11:26:55 +05:30
mbauskar
5cd886b8cf [hook] added before_change hook to trigger email_alerts before db_set 2017-03-10 09:51:01 +05:30
paurosello
583100ac51 Set Only Once for Datetime (#2621)
The same problem that Date was facing appears with Datetime, otherwise it fails as it is comparing different types.
2017-01-24 10:58:33 +05:30
Rushabh Mehta
e223c5b740 Merge branch 'develop' into custom-perms-1 2017-01-13 19:04:49 +05:30
robert schouten
48dc91a59f Email inbox (#2485)
* Communication_reconciliation

* Email inbox

* added collapsed timeline for communication

* new email prefill from when only one address

* timeline duplication and notifcation and stability fixs

* add subject to timeline

* email system v7 fixes

* added password required validation

* use proper email datetime

* email inbox v7.1 fixes

* email inbox communication_date used instead of created

* email inbox communication data cleanup

* remove old patch

* email inbox permit unlinking

* [fix] duplication queue and rename domain to email domain

* fix rename domain

* email inbox index optimisation

* email inbox relink doctype query usability fix

* email_inbox Set attachment variable for forwards and replies based on whether it exists or not

* uidnext fixes and cleanup

* email inbox fix tests

* fix rebase timeline issue

* email inbox threading and cleanup

* email inbox cleanup

* bring inbox into frappe and cleanup

* fix missed path

* inbox cleanup

* email-inbox move service back to account

* separate to erpnext contact match

* email inbox cleanup and move relink and timeline fix

* relink optimisation

* inbox fix footer

* keep email drafts on pages not just forms

* email inbox add sent items

* email inbox allow not save list settings on query

* email inbox cleanup and remove communications recon

* add suspend sending button in email queue

* fix rebase error

* email inbox assorted fixes

* email inbox fixes and relink option only when linked otherwise link;

* email inbox fix sender fullname as administrator

* create user email to custom button

* email inbox sent no match and seen

* email inbox fix unicode issues with subject recipient and sender
2017-01-13 14:45:11 +05:30
Rushabh Mehta
636c662048 [patch] added patch for migration 2017-01-12 15:48:49 +05:30
Nabin Hait
8c7bd2f76f Merge pull request #2341 from rmehta/fetch-server-side
[fix] fetch values server side for link fields
2016-12-05 16:41:07 +05:30
Nabin Hait
47ecf4c513 Merge branch 'master' into develop 2016-11-30 12:13:56 +05:30
shreyas
684bb80f8e [Minor] convert date type to string when field is set as 'set_only_once' or constant 2016-11-28 17:15:41 +05:30
Rushabh Mehta
349e803bd1 [fix] fetch values server side for link fields 2016-11-18 14:49:27 +05:30
Rushabh Mehta
9ef8f18fcf [fix] for tests, and db_set now accepts dict 2016-11-17 09:45:44 +05:30
Rushabh Mehta
8f6d3d9a11 [fix] in_standard_filter should be in docfield, not doctype 2016-10-26 19:33:04 +05:30
Rushabh Mehta
f124354250 [fix] default value for check 2016-10-26 19:33:04 +05:30
Rushabh Mehta
aece05a792 [fix] default for checks in db_insert and show top 20 filter values 2016-10-26 19:33:04 +05:30
Nabin Hait
b2908df91b get the default value of check field if none, for insert / update 2016-10-19 14:20:50 +05:30
Rushabh Mehta
7b69625cbe [fix] tests 2016-10-19 09:21:55 +05:30
Rushabh Mehta
8a87064541 [fix] get_valid_dict use default if none 2016-10-18 17:46:09 +05:30
Rushabh Mehta
1026a48a97 [refactor] code for integration service scheduled events 2016-10-13 14:59:23 +05:30
Rushabh Mehta
bae97cfed4 Email Alert on any controller method (#2157)
* [docs] typo

* [email alert] now on any standard controller method

* [minor] install customizations with intall;

* [test] [fix] and truncate subject in email;

* [fix] error log seen issue
2016-10-08 11:11:36 +05:30
Rushabh Mehta
9353303be6 Exporting Customizations docs and other minor fixes (#2136)
* [fix] email alert in sync

* [fixes] web form mandatory and docs for exporting customizations
2016-10-03 12:18:57 +05:30
Rushabh Mehta
83eee92692 [fix] route too long 2016-07-28 11:13:13 +05:30
Rushabh Mehta
7c870d6ba4 [fix] dont update modified timestamp if called from post save methods 2016-07-20 12:55:19 +05:30
Rushabh Mehta
22c3f7966d [enhance] run actions in background doc.queue_action("submit") 2016-07-19 17:12:37 +05:30
Nabin Hait
bbb3391300 removed print statement 2016-07-04 11:40:32 +05:30
Anand Doshi
aaabd81329 [enhancement] auto-link URLs in Text Editor using bleach.linkify 2016-06-29 12:49:20 +05:30
Anand Doshi
26f379e08b [fix] doc.get_password 2016-06-15 17:39:03 +05:30
Anand Doshi
526e9ea2d7 [security] encrypt passwords that need to be retrievable, except User password which should be hashed 2016-06-13 17:18:59 +05:30
Anand Doshi
8d8b58d5ee [fix] doc.flags.ignore_validate_constants 2016-06-09 16:08:51 +05:30
Rushabh Mehta
fe8a3b2b0c [minor] added doc.update_modified() 2016-04-13 18:21:28 +05:30
Rushabh Mehta
acff9c6288 [fix] run_method 2016-04-11 12:43:20 +05:30
Rushabh Mehta
addda4a30c [fix] open filtered list when clicked on notifications circle 2016-04-11 12:42:12 +05:30
Anand Doshi
7132935fef Merge branch 'master' into develop 2016-04-07 17:39:51 +05:30
Rushabh Mehta
78607beeee [cleanup] print format css and default print view 2016-04-06 15:29:55 +05:30
Anand Doshi
398235f5c7 [fix] don't update name during db_update 2016-04-05 18:26:47 +05:30
Rushabh Mehta
61218f7a80 Merge pull request #1661 from rmehta/link-count
[enhancement] count number of times a link is used and show most popular links on thei top
2016-03-30 13:16:04 +05:30
Rushabh Mehta
78262a2a04 [cleanup] grid, multiple items 2016-03-21 13:04:16 +05:30