Commit graph

122 commits

Author SHA1 Message Date
Prateeksha Singh
466de4f19b refactor(allowed_modules): use the new modules API 2019-02-06 17:07:13 +05:30
Prateeksha Singh
e93cea1336 refactor(desktop_icons): Remove references and repurpose bootinfo
- Also revert deleting desktop page doc
2019-02-06 17:03:27 +05:30
KanchanChauhan
f581ebfbb8 feat: Restrict user in mentions (#6520)
Avoid mentioning and accidentally sending email to Supplier or Customer or left employees
2018-11-22 11:50:46 +05:30
Suraj Shetty
1f6a6a1045 Add banner Image 2018-10-21 09:53:05 +05:30
Mangesh-Khairnar
20d0bd34a5 profile: likes, post and pinned post 2018-10-21 09:53:05 +05:30
Suraj Shetty
4692ecfab2 Load user bio 2018-10-21 09:52:12 +05:30
Rushabh Mehta
2e6a202652 Postgres support for Frappe (#5919)
* [start] postgres

* [wip] started refactoring db_schema

* Add psycopg2 to requirements.txt

* Add support for Postgres SQL

- Separate frameworkSQL, database, schema, setup_db file for
mariaDB and postgres
- WIP

* Remove quotes from sql to make it compatible with postgres as well

* Moved some code from db_schema to database.py

* Move code from db_schema to schema.py

Add other required refactoring

* Add schema chages

* Remove redundant code in file

* Add invalid column name exception class to exceptions.py

* Add back tick in query wherever needed and replace ifnull with coalesce

* Update get_column_description code in database.py file

* Remove a print statement

* Add keys to get on_duplicate query

* Add bactick wherever necessary

- Remove db_schema.py file

* Remove DATE_SUB as it is incompatible with postgres

- Fix prepare_filter_condition

* Add backtick and quotes wherever necessary
- Move get_database_size to frappe.db namespace
- fix some left out bugs and errors

* Add code to create key and unique index
- added mysql and posgres in their respective database.py

* Add more bacticks in queries and fix some errors
- Pass keys to on_duplicate_update method
- Replace MONTH with EXTRACT function
- Remove DATEDIFF and CURDATE usage

* Cast state value to int in toggle_two_factor_auth
- since two_factor_auth has the datatype of Int

* Refactor
- Replace Timediff with normal arithmetic operator
- Add MAX_COLUMN_LENGTH
- Remove Redundant code
- Add regexp character constant
- Move create_help_table to database.py
- Add get_full_text_search_condition method
- Inherit MariaDBTable from DBTable

* Replace Database instance with get_db method

* Move db_manager to separate file

* Refactor
- Remove some unwanted code
- Separate alter table code for postgres and mysql
- Replace data_type with column_type in database.py

* Make fulltext search changes in global_search.py

* Add empty string check

* Add root_password to site config

* Create cli command for postgres console

* Move setup of help database to setup_db.py

* Add get_database_list method

* Fix exception handling
- Replace bad_field handler with missing_column handler

* Fix tests and sql queries

* Fix import error

* Fix typo db -> database

* Fix error with make_table in help.py

* Try test for postgres

* Remove pyhton 2.7 version to try postgres travis test

* Add test fixes

* Add db_type to the config of test_site_postgres

* Enable query debug to check the reason for travis fail

* Add backticks to check if the test passes

* Update travis.yml
- Add postgres addon

* Try appending 'd_' to hash for db_name
- since postgres does not support dbname starting with a number

* Try adding db_type for global help to make travis work

* Add print statements to debug travis failure

* Enable transaction and remove debug flag

* Fix help table creation query (postgres)

* Fix import issue

* Add some checks to prevent errors
- Some doctypes used to get called even before they are created

* Try fixes

* Update travis config

* Fix create index for help table

* Remove unused code

* Fix queries and update travis config

* Fix ifnull replace logic (regex)

* Add query fixes and code cleanup

* Fix typo
- get_column_description -> get_table_columns_description

* Fix tests
- Replace double quotes in query with single quote

* Replace psycopg2 with psycopg2-binary to avoid warnings
- http://initd.org/psycopg/docs/install.html#binary-install-from-pypi

* Add multisql api

* Add few multisql queries

* Remove print statements

* Remove get_fulltext_search_condition method and replace with multi query

* Remove text slicing in create user

* Set default for 'values' argument in multisql

* Fix incorrect queries and remove few debug flags
- Fix multisql bug

* Force delete user to fix test
- Fix Import error
- Fix incorrect query

* Fix query builder bug

* Fix bad query

* Fix query (minor)

* Convert boolean text to int since is_private has datatype of int
- Some query changes like removed double quotes
and replace with interpolated string to pass multiple
value pass in one of the query

* Extend database class from an object to support python 2

* Fix query
- Add quotes around value passed to the query for variable comparision

* Try setting host_name for each test site
- To avoid "RemoteDisconnected" error while testing data migration test
- Update travis.yml to add hosts
- Remove unwanted commit in setup_help_database

* Set site hostname to data migration connector (in test file)
- To connect the same site host

* Fix duplicate entry issue
- the problem is in naming series file.
In previous commits I unknowingly changed a part of a series query
due to which series were not getting reset

* Replace few sql queries with orm methods

* Fix codacy

* Fix 'Doctype Sessions not found' issue

* Fix bugs induced during codacy fixes

* Fix Notification Test

- Use ORM instead of raw sql

* Set Date fallback value to 0001-01-01

- 0000-00-00 is invalid date in Postgres
- 0001-01-01 works in both

* Fix date filter method

* Replace double quotes with single quote for literal value

* Remove print statement

* Replace double quotes with single

* Fix tests

- Replace few raw sql with ORM

* Separate query for postgres

- update_fields_to_fetch_query

* Fix tests

- replace locate with strpos for postgres

* Fix tests

- Skip test for datediff
- convert bytes to str in escape method

* Remove TestBot

* Skip fieldname extraction

* Replace docshare raw sql with ORM

* Fix typo

* Fix ancestor query test

* Fix test data migration

* Remove hardcoded hostname

* Add default option and option list for db_type

* Remove frappe.async module

* Remove a debug flag from test

* Fix codacy

* fix import issue

* Convert classmethod to static method

* Convert few instance methods to static methods

* Remove some unused imports

* Fix codacy

- Add exception type
- Replace few instance methods with static methods
- Remove unsued import

* Fix codacy

* Remove unused code

* Remove some unused codes

- Convert some instance methods to static function

* Fix a issue with query modification

* Fix add_index query

* Fix query

* Fix update_auth patch

* Fix a issue with exception handling

* Add try catch to a reload_doc

* Add try-catch to file_manager_hook patch

* import update_gravatar to set_user_gravatar patch

* Undo all the wrong patch fixes

* Fix db_setup code 😪
- previously it was not restoring db from source SQL
which is why few old patched were breaking
(because they were getting different schema structure)

* Fix typo !

* Fix exception(is_missing_column) handling

* Add deleted code
- This code is only used in a erpnext patch.
Can be moved to that patch file

* Fix codacy

* Replace a mariadb specific function in a query used in validate_series

* Remove a debug flag

* Revert changes (rename_parent_and_child)

* Fix validate_one_root method

* Fix date format issue

* Fix codacy
- Disable a pylint for variable argument warning
- Convert an instance method to static method

* Add bandit.yml

The Codacy seems to use Bandit which generates
warning for every subprocess import and its usage during pytest
Since we have carefully used subprocess (avoided user input),
warnings needs to be avoided.
This can be removed if we have any alternative for subprocess usage.

* Skip start_process_with_partial_path check

* Fix typo

* Add python 2.7 test

* Move python versions in travis.yml

* Add python versions to jobs

* Overwrite python version inheritance for postgres in travis.yml

* Add quotes around python version in .travis.yml

* Add quotes around the name of the job

* Try a travis fix

* Try .travis.yml fix

* Import missing subprocess

* Refactor travis.yml

* Refactor travis.yml
- move install and tests commands to separate files
- Use matrix to build combination of python version and db type

* Make install.sh and run-tests.sh executable

* Add sudo required to travis.yml to allow sudo cmmands in shell files

* Load nvm

* Remove verbose flag from scripts

* Remove command-trace-print flag

* Change to build dir in before script

* Add absolute path for scripts

* Fix tests

* Fix typo

* Fix codacy
- fixes - "echo won't expand escape sequences." warning

* Append (_) underscore instead of 'd' for db_name

* Remove printf and use mysql execute flag
2018-09-21 10:20:48 +05:30
sivankar
a48b76b940 refactored code to add support in filters to get descendant or ancest… (#5847)
* refactored code to add support in filters to get descendant or ancestor for tree type documents

* added semicolon and comments to imporve code quality

* refactored code to add not ancestor and not descendants of filters

* added test cases for ancestors of and descendants of

* Translate labels
2018-08-14 12:19:18 +05:30
Prateeksha Singh
0d8b9c8653 Revert "Modules dropdown" (#5855)
* Revert "bench use <site> should check if the  site exists (#5849)"

This reverts commit 630858eb96.

* Revert "Add option to convert password to use ASCII instead of Unicode when needed by smtp server config (#5793)"

This reverts commit 191684f6a5.

* Revert "Token based authentication (#5752)"

This reverts commit abd3333bae.

* Revert "[minor] test fix"

This reverts commit b6ba3915a6.

* Revert "allow null when time field is not required (#5832)"

This reverts commit 803f6b0c7b.

* Revert "remove duplicate field entry for fieldname two_factor_authentication (#5846)"

This reverts commit 6a06e65d20.

* Revert "Query Report (#5845)"

This reverts commit f870a0bd25.

* Revert "Modules dropdown (#5767)"

This reverts commit 6f908b3443.
2018-07-23 15:34:34 +05:30
Prateeksha Singh
6f908b3443 Modules dropdown (#5767)
* [modules-dropdown] init

* [modules-sidebar] setup structure

* [modules-sidebar] add chunks to group

* [modules-dropdown] ellipsis

* [move] help menu to explore menu

* merge help column to modules

* [modules-dropdown] get explore links from hooks

* [add] explore_link secondary

* [modules-dropdown] Places list

* [modules-dropdown] deprecate desk link, make icon dropdown

* [modules-dropdown] collapsible help menu

* [remove] global navbar icon style

* [boot] define core modules, use in dropdown

* [modules-dropdown] code style fixes
2018-07-19 18:06:37 +05:30
Suraj Shetty
a93bc87363 Permission fixes (#5530)
* Add User Permissions to Config module

* Update Permission Manager help

* Fix share button

* Remove user-permissions page

* Remove unnecessary error modals

* User Permission UI fixes
- Fix double multicheck bug on save
- Add margin above and below select all button

* Update user_permissions dict realtime on client side

- Remove user_permissions from boot

* Cast permission dict values to int
2018-05-04 19:49:11 +05:30
Suraj Shetty
14c621fca2 Success Action (#5434)
* success model init

* ui changes

* whitelisted get_count method

* refactor success action

* refactor form.js
- lint error fixes
- reject promise on error

* Refactor
- option to add body to msg-alert
- remove unwanted css
- tweak msg-alert ui

* remove alert on any action click

* sample success modal config for toDo

* success alert redesign

* docstatus check

* close button position fix

* add doctype for success action setting

* remove unwanted changes

* remove unused import

* rename success action setting to success action

* add translatable label

* rename for_doctype to ref_doctpe

* remove unused frappe import

* replace get_list with get_all
to ignore permission check while loading boot
2018-04-18 11:22:51 +05:30
Nabin Hait
944b45b62d fixed merge conflict 2018-04-06 15:05:15 +05:30
Prateeksha Singh
8106b3839e [add] allowed app icons 2018-04-05 14:43:28 +05:30
Rohit Waghchaure
8044b8be89 [Fix] Footer for report print 2018-04-04 15:15:02 +05:30
Makarand Bauskar
d0fd1482c4 [hotfix] ignore the disabled reports in sidebar Reports section (#4200) 2017-09-28 12:12:16 +05:30
Rushabh Mehta
fd7e8eda62 [wip] file upload with socketio 2017-09-14 13:07:29 +05:30
Aditya Hase
e6bd1e4995 Replaced all instances of 'unicode' with 'six.text_type' (#3825) 2017-08-02 16:57:39 +05:30
Rushabh Mehta
f609a478ae [refactor] user permissions (#3713)
* [refactor] user permissions

* [fix] tests

* [ux] user-permissions

* [minor] cleanup system settings

* [minor] end progress
2017-07-28 14:33:31 +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
almeidapaulopt
b17b73c4f3 GSuite integration (#3252)
* GSuite initial commit

* GSuite initial commit

* cleanups

* exception handle

* gsuite script: add doGet

* Add GSuite integration to the upload popup

* hide dialog fields if gsuite disabled

* move gsuite code to gsuite.js from upload.js

* documentation

* change name format

* typo on GSuite

* copy paste the file .gs

* fix:don't show gsuite when creating a file in filemanager

* add version to webapp

* add webapp default url

* move webapp to html fied

* fix rebase

* fixes for codecy
2017-06-13 14:55:07 +05:30
Makarand Bauskar
17a09e4b70 [feature] domainification for frappe (#3227)
* [feature] domainify doctype, pages and roles

* [minor] added get active domain method to __init__

* [fixes] minor fixes in domainification and added test cases

* [minor] added checkbox-editor class to render the domains

* [minor] added checkbox_selector option

* [minor] added or_filters to filter restrict to domain doctype and roles

* [minor] fixed codacy errors
2017-06-13 14:36:01 +05:30
Faris Ansari
5adc4d2d24 Add file_watcher_port in common_site_config.json (#3375)
* Add file_watcher_port in common_site_config.json

* minor
2017-05-24 17:57:55 +05:30
Rushabh Mehta
62f0480117 [rename] frappe.www.print to frappe.www.printview 2017-05-03 15:59:24 +05:30
Javier Wong
ff2e37135d [Enhancement] Allow Notes (announcements) to be notified every time a user logins (#3094)
* [Enhancement] Allow Notes (announcements) to be notified every time a user logins.

* [Fix] Add Notify on Login flag in frappe.boot.notes

* Patch Doctype Notes to notify once for all existing notes

* Added newline to end of patch_notes_notify_once file

* [fix] Changed Notes Notify Once flag to Notify On Every Login

* Update note.json

* [fix] Removed frappe/patches/v7_2/patch_notes_notify_on_every_login.py
2017-04-17 14:43:59 +05:30
Nabin Hait
19b38ecaf9 Get allowed reports with report type 2017-04-13 15:14:15 +05:30
pratu16x7
f1595c06b4 [fix] set report-type for custom role reports 2017-04-13 14:33:09 +05:30
rohitwaghchaure
b4ae808980 Added system_page field in page to differentiate system page and custom page, patch to set reference doctype in the custom role, fixed sql query to get users reports (#3078) 2017-04-13 12:43:32 +05:30
Faris Ansari
3bf9c976c1 [fix] Reports in sidebar 2017-03-30 13:05:26 +05:30
Kanchan Chauhan
4a5875bda5 Sidebar reports fixed 2017-03-20 14:43:13 +05:30
Rohit Waghchaure
67f4de1802 [fix] Separate has role patch to make custom role from custom docperm, if custom role not available then chceck standard permission for page and report 2017-03-13 13:46:04 +05:30
Rohit Waghchaure
da424049a1 [Enhance] Role permission for page and report, added reset roles button 2017-03-11 13:49:25 +05:30
mbauskar
eda7b659a3 [WIP] Email Inbox view for Communication 2017-03-08 14:41:43 +05:30
Rohit Waghchaure
4c357643db Fixed patch, travis 2017-03-06 18:26:22 +05:30
Rohit Waghchaure
1dc9dbe28f patches for migration of roles 2017-03-06 14:42:14 +05:30
Rohit Waghchaure
cc37c5fda8 rename page role to has role, added doctype custom role to set the roles, added screen to set roles to the page and report 2017-03-06 14:38:54 +05:30
Rohit Waghchaure
e57e9f170b [Enhancement] Provision to add roles in the report 2017-03-06 14:38:54 +05:30
Makarand Bauskar
99d97530b1 [enhancement] Feedback Feature (#2683) 2017-02-09 11:30:54 +05:30
Rushabh Mehta
0a86d1941c [fix] boot.py 2017-01-19 15:23:29 +05:30
Rushabh Mehta
e1f1a411c8 [fix] email dialog 2017-01-19 15:05:51 +05:30
rohitwaghchaure
d78ae6001d [Enhancement] Added letter head for the report (#2472) 2016-12-20 16:43:07 +05:30
Rushabh Mehta
a099690e8f Revert "[optimize] remove count(*) from queries" (#2353) 2016-11-22 10:55:13 +05:30
Rushabh Mehta
0ff140fa2b [optimize] remove count(*) from queries 2016-11-21 14:58:18 +05:30
rohitwaghchaure
06b2b44b45 Remember last selected value (#2203) 2016-11-03 11:12:48 +05:30
Rushabh Mehta
ef3412b9cb [enhance] set doctype label via Customize Form frappe/frappe#2019 (#2061)
* [enhance] set doctype label via Customize Form frappe/erpnext#2019

* Update customize_form.py
2016-09-20 11:20:46 +05:30
Rushabh Mehta
80ca5fecad [minor] expire notification in popup note 2016-08-30 09:59:23 +05:30
Rushabh Mehta
f20bf4ae25 [feature] show note to all users on popup (#2017) 2016-08-29 15:40:26 +05:30
Rushabh Mehta
db9ba845e5 [enhancement] bulk update tool! 2016-07-15 16:28:20 +05:30
Anand Doshi
a7ace6ae38 [fix] limits and site_info 2016-06-25 21:56:27 +05:30
Rushabh Mehta
17d9177c86 [minor] awesome bar for treeviews 2016-06-25 18:28:14 +05:30