Commit graph

15851 commits

Author SHA1 Message Date
Erick Jimenez
affe5b8659 Fix "frappe.is_user_logged_in" js function (#5548)
* Fix is_user_logged_in js function

* Add missing semicolon
2018-05-16 11:12:31 +05:30
Frappe PR Bot
f3930a7026 [Translation] Updated Translations (#5552) 2018-05-16 11:12:06 +05:30
Suraj Shetty
92e4db1dd9 Fix a bug with whitelisted method (#5551)
- Add additional check to avoid wrong user set
2018-05-16 11:11:37 +05:30
Ameya Shenoy
7b003a71bc Python 3 fixes for PR bot (#5554)
In python 2 writing to file can be done by reading the file as 'w' or
'wb', however, in python 3 if we're writing 'utf-8' encoded stuff to a
file, it needs to be opened using the 'wb' argument. 'b' here stands for
binary.
2018-05-16 11:11:04 +05:30
Suraj Shetty
2e52177f51 Replace frappe.db.sql to frappe.get_list to apply permissions (#5556)
* Replace frappe.db.sql with frappe.get_list
- Permission check for treeviews

* Optimize get_role_permissions
- Avoid setting of roles each time when is_perm_appicable is called

* Fix codacy
- Remove trailing whitespace
2018-05-16 11:10:45 +05:30
Saurabh
f1b35c82f4 [fix] resolved merge conflicts 2018-05-15 12:56:21 +05:30
Saurabh
757f37aa7a Merge branch 'hotfix' 2018-05-15 12:51:03 +05:30
Saurabh
b42eb308a7 bumped to version 10.1.31 2018-05-15 13:21:03 +06:00
Saurabh
c3b97bc456
Merge pull request #5544 from codingCoffee/opti_addr_contact
optimized addr_and_contact report by @nabinhait
2018-05-15 12:08:27 +05:30
Saurabh
c1a338f8c0
Merge pull request #5491 from codingCoffee/decimal_fix
added handler for decimal object in response
2018-05-15 11:54:31 +05:30
Saurabh
488e4a5426
Merge pull request #5550 from netchampfaris/hotfix
Quick Kanban Board
2018-05-15 11:53:49 +05:30
Faris Ansari
3d5c09d41a
fix codacy 2018-05-15 11:30:52 +05:30
Zarrar
b2873be5fb [Fix] Email and Contact fixes (#5519)
* use multiselect for email dialog, improv email fetch query

* patch to create contact for all user

* append number if same name found for company

* update tests
2018-05-14 19:21:35 +05:30
Faris Ansari
4015238512 Quick Kanban Board
- dont create project implicitly, results in Deadlock most of the time
- add explicit field to set the project
2018-05-14 12:43:28 +05:30
Prateeksha Singh
da2e00e570
Merge pull request #5547 from pratu16x7/jsBarcode-import
[purge] remove jsbarcode lib, import
2018-05-11 15:57:48 +05:30
Prateeksha Singh
d54980b665 [purge] remove jsbarcode lib, import 2018-05-11 15:52:56 +05:30
Rushabh Mehta
cca360e8ef [minor] dont render .min.js files as jinja templates 2018-05-10 22:28:42 +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
Sushant Nadkar
a122de51b2 Show fieldname as tooltip for all users if developer_mode=1 (#5543) 2018-05-09 12:45:32 +05:30
Ameya Shenoy
fc99d691d1 Fix python3 issue reading pdf (#5541)
File types other than plain text files weren't sent properly in email. The initial implementation of try except used to destroy the file object in the try statement, and hence we were getting a blank string in the except block. The fix involves reading the file object separately before trying to decode it.
2018-05-08 15:41:12 +05:30
Nabin Hait
6737f1912c Fixed merge conflict 2018-05-08 15:27:37 +05:30
Nabin Hait
f717296a87 Merge branch 'hotfix' 2018-05-08 15:26:51 +05:30
Nabin Hait
db5682e688 bumped to version 10.1.30 2018-05-08 15:56:51 +06:00
Saurabh
2147bca5d4 [fix] set no_copy property for workflow state field (#5531)
* [fix] set no_copy property for workflow state field

* [fix] check if custom field exists before loading doc
2018-05-08 15:16:08 +05:30
Ameya Shenoy
09e71d0d77 added floor and ceil to frappe.utils (#5536)
Added frappe wrappers to math.ceil and math.floor, since they are widely
used functions. Also added their docstrings for documentation and wote
test cases. And some minor typo fixes
2018-05-08 15:13:50 +05:30
Nabin Hait
09cbf49ff1
Increase the length of Singles table columns (#5540) 2018-05-08 15:12:00 +05:30
Shreya Shah
c51a2b884e Rename occurrences for Production Order to Work Order (#5534) 2018-05-08 11:21:48 +05:30
mnatalia
18ecf1f3e7 Update new_message.html (#5535)
Added possibility to translate.
2018-05-08 11:16:55 +05:30
Suraj Shetty
9356e4272d Fix auto dropdown for tag on page load (#5532)
* Fix auto dropdown for tag on page load

* Fix tag related bugs

- reset doc user_tags on change
- move "label conversion toTitle" from onTagAdd listener
to addTag function
- remove unnecessary refresh call
2018-05-08 11:10:55 +05:30
Saurabh
6ccd3386bb
Merge pull request #5533 from saurabh6790/boilerplate_fix
escape new line char while creating boilerplate for app
2018-05-07 15:34:48 +05:30
Saurabh
c899c94c96 escape new line char while creating boilerplate for app 2018-05-07 12:50:19 +05:30
Ameya Shenoy
439effed7d Rebuild help for docs which have been renamed (#5521)
After execution of a bulk rename, the help cache for the particular
doctype didn't used to change. Added this fix to ensure the help is
rebuilt for the particular doctype whose docs have been renamed
2018-05-06 11:59:00 +05:30
Nabin Hait
e3682cec22 Fixed merge conflict 2018-05-05 12:12:28 +05:30
Nabin Hait
947f409826 Merge branch 'hotfix' 2018-05-05 12:08:47 +05:30
Nabin Hait
00adb31d69 bumped to version 10.1.29 2018-05-05 12:38:47 +06:00
Nabin Hait
3bb36344a6 minor fix 2018-05-05 12:07:54 +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
Ameya Shenoy
5cc28b1257 pip fix (#5527) 2018-05-04 19:05:48 +05:30
Ameya Shenoy
dc8af84563 Login fix for python3 (#5529)
decode bytes to string
2018-05-04 18:36:27 +05:30
ci2014
8b2e4a5f4c Check for list_renderer before accessing settings (#5469)
* Check for list_renderer before accessing settings

In the master version of frappe, in the first attempt of calling the file manager (when onload is called) the report doesn't build, because in the report view, there is no such attribute list_renderer available.

In that change we check if the list renderer is not undefined and only setup the menu, drag and drop and copy function, when the list_renderer object is available.

This problem might not occur in the developer versions (datatables), but many people still work with the master version and need a working file manager report.

* Update file_list.js
2018-05-04 13:15:30 +05:30
Manas Solanki
62fe836f43 time taken by the patch along with success message (#5524) 2018-05-04 13:14:10 +05:30
Suraj Shetty
3109123249 Permission improvements (#5494)
* Overwrite "if owner" restriction*
- Overwrite "if owner" restriction if user has other valid roles
(with access rights) without if_owner enabled for it in doc perm
eg:
If a doctype has 2 docperm for Role A and Role B and the docperm with
Role A has  if owner enabled.

Suppose User 1 has Role A, then User 1 should see only docs
which was created by him.

Now if User 2 has Role A and Role B, User 2 should be able to see all the
records because Role B has unrestricted access on doctype.
------------------------------------------------------

Previously in case of User 2, the restriction(of if owner) from Role A
used to reflect and User 2 was only able to view only records made by
him.

This commit will overwrite the if_owner restriction in such case.
- Refactor get_role_permission method

* Add advanced control for user permission
- Add ability to skip user permission check for specific doctype

* Refactor "linked with" method
- Add option to skip linked with doctype which has
ignore_user_permission enabled against them.

* Clear "linked with doctype" cache on doctype changes

* [Minor] Fix formatting

* Fix error and bugs in linked_with method

* Format code

* Add fix to get allowed docs from user_permission

* Fix has_user_permission bug

* Add before migrate patch for user permission

* Fix typo
2018-05-04 13:13:29 +05:30
Prateeksha Singh
6724cf1776
Merge pull request #5200 from CodedInternet/password-hashing
Migrate password hashing away from mysql password()
2018-05-03 17:42:42 +05:30
Prateeksha Singh
d2dfda2711
Merge pull request #4973 from lasalesi/configurablepdfborder
using regex instead of soup to parse pdf page margins
2018-05-03 17:41:52 +05:30
Prateeksha Singh
329831512b
Merge pull request #5520 from netchampfaris/printview-footer
Show footer in Full Page printview
2018-05-03 17:37:20 +05:30
Prateeksha Singh
1204b67af9
Merge pull request #5481 from Zlash65/multiselect
MultiSelect field - enhance to work like link field
2018-05-03 17:04:05 +05:30
Zlash65
0f04531215 minor requested changes 2018-05-03 17:00:37 +05:30
Zlash65
e42d84bc5e use get_data to override data list 2018-05-03 17:00:37 +05:30
Zlash65
369fb8fbc6 multiselect - behave like link field 2018-05-03 17:00:37 +05:30
Faris Ansari
1cef6890e3 Show footer in Full Page printview 2018-05-03 16:12:16 +05:30