Commit graph

186 commits

Author SHA1 Message Date
Suraj Shetty
6e874fbac4 Fix custom script help (#5635) 2018-06-01 12:09:31 +05:30
Zarrar
e76b3eef4e [Enhance] New DocField - 'Fetch From' (#5563)
* add new docfield fetch_from - serves as add_fetch

* replace options.split with fetch_from.split

* copied data from options to fetch_from

* patch to update fetch_from for docfield, custom_field and property_setter

* update tests according to fetch_from change
2018-05-23 11:07:57 +05:30
Rushabh Mehta
b4650f42a1 [minor] remove in_dialog old property 2018-05-16 12:51:01 +05:30
Rushabh Mehta
e5d2c82760 [minor] ignore_validate option while creating custom fields 2018-04-26 10:09:40 +05:30
Suraj Shetty
0be4342649 User permissions redux (#5314)
* [start] removing simpler user permission structure

* permission changes
removed "apply user permission" from has_permission

* test fixes and other supporting fixes

* Removed Apply user permission code

* additional check to see if user has some user permissions related to a doctype

* test fixes

* removed a test

* Permission changes
- Code to restrict access if module is blocked for user.
- [Fix] ignore user perm if applicable

* List view restrictions ui changes

* removed unwanted apply user perm code

* permission (block module fix)

* permission fix

* change user permission
user permission will not be applied if user doesn't have role permission

* removed left "apply_user_permissions" property

* add user permission help template

* perm js refactor

* ui / ux changes
restrict list view before entering view if user is not permitterd
add description for if owner check in role permission manager

* codacy fixes

* permission code fix
add controller permission check
add blocked module check in build_permission

* optimized get blocked module method
2018-04-03 10:42:04 +05:30
schilgod
a01275d71c set fieldname for Section Break and Column Break, only if fieldname is not set, else it breaks existing custom fields. Also Use label for creating fieldname if user has entered label (#5171) 2018-03-12 11:50:02 +05:30
Nabin Hait
1e55b7cc68 Fixed merge conflict 2018-03-09 16:37:43 +05:30
Zarrar
d49f9e417b Allow col_break & sec_break without label (#5123) 2018-03-08 10:52:57 +05:30
Achilles Rasquinha
abb7f14bbd self.assertEqual 2018-02-28 21:19:01 +05:30
Faris Ansari
e581be9fa8 Add translation support for DocFields (#5002)
* Initial changes for Translation

* Merged translate app into frappe core

* Minor typo fix

* Fixes while syncing translations

* Set defaults

* Fixes on setup

* Improve Code Quality

* Could Code Quality be Improved?

* Small code tweaks

* Minor typo fix

* Addition of Translatable Property

* Small fixes for Codacy Comments

* Simplify code

* Show translations in grid

* Remove enabled from Language

* Revert render_template logic

* typo

* Cleanup unused methods

* move patch to erpnext

* fix codacy

* Update patches.txt

* Update patches.txt
2018-02-16 15:12:12 +05:30
Manas Solanki
267d16575c throw message for the bad add fetch (#4939)
* throw message for the bad add fetch

* wrong fieldname in the error message of add fetch configuration
2018-02-02 11:32:57 +05:30
Prateeksha Singh
2bb25442fd
Merge pull request #4876 from pratu16x7/hotfix
ignore xss on barcode by default, fixes frappe/erpnext#11973
2018-01-19 15:16:19 +05:30
Prateeksha Singh
077230c922 ignore xss on barcode by default, fixes frappe/erpnext#11973 2018-01-19 15:11:27 +05:30
Harsh Patel
b1bbc16c99 Fixed ERPNext issue #12282 (#4754)
* Proposed fix for issue #12282

* [Mod] Modified the get_value in test_customize_form.py for method "test_save_customization_field_property"

* [Fix] Does not allow changing the property of standard fields only.

* [Mod] Code documentation in test_customize_form.py
2018-01-09 15:43:22 +05:30
Rushabh Mehta
b4001046d5 [fix] customize_form.py https://discuss.erpnext.com/t/delivery-note-appears-as-delivery-chalan-on-erpnext-cloud/30589 2017-11-14 15:28:28 +05:30
Rushabh Mehta
4fa7730845 [fix] upload for customize form (#4397) 2017-10-27 16:44:49 +05:30
Shreya Shah
7fa97e97fe Able to add options for customized form (#4369)
* exception added to add options

* Update customize_form.py

* Update customize_form.py
2017-10-27 15:18:44 +05:30
Revant Nandgaonkar
ebf3554754 Geolocation control (#4327)
* added static map field

* leaflet draw plugin added to map control

* Editable layer working no icons

* Save and load data in form field

* images and icons working

* Locate plugin added, and loads on geolocation

* organized map control code

* loads layer as per form

* new form clears editableLayers

* update: leaflet 1.2.0 and leaflet-draw 0.4.2

* changed to ERPNext colors

* Multiple map fields and fixes

* fixes codacy suggestions

* loaded geojson data editable

* Map layers editable

* add only one layer on draw:create

* code organized with helper functions

* Replaced Leaflet Draw with Leaflet Editable

* read values from database

* layers saved in db

* Using Patched Leaflet Draw (mobile-friendly)

* Working Map field with multiple forms open

* Leaflet Draw css image path fix

* Leaflet Draw

Fixes Leaflet draw css image paths
Fixes Circle marker and Circle

* locate to geolocation or set featurecollection as center

* [fix] leaflet fitBounds padding 50,50

* [Fix] Leaflet (auto) locate

* Map field basic test

* added refresh button on map

* Mute map geojson in print format

* renamed Map field to Geolocation

* Suggested changes and fixes

* eslint disable

* csslint allow important
2017-10-25 18:30:25 +05:30
Prateeksha Singh
1e253b9d13 [controls] Barcode Control (#4335)
* [start] display barcode based on input

* [wip]

* [barcode] use set_value

* parse and set

* remove quagga

* [barcode] set in db

* [fix] set height

* cleanup

* remove from build.json, require instead

* [fix] declare JsBarcode global in .eslintrc
2017-10-18 12:24:58 +05:30
Rushabh Mehta
f0e23a5a6c [refactor] domain and domain settings (#4163)
* [refactor] domain and domain settings

* [fix] test_domain.py

* [fix] patches

* [fix] domain activation after setup

* [fix] tests and lint

* [fix] tests and lint

* [enhance] better prompt naming

* [fix] setup wizard test

* [fix] testing

* [minor] new item in quick entry from form dashboard
2017-10-17 12:29:08 +05:30
Makarand Bauskar
007bb0d684 [hotfix] enable Update button if error occured after customize form save (#4294) 2017-10-10 13:56:25 +05:30
Aditya Hase
2aa4186af5 Explicitly convert filter object to string 2017-09-27 01:08:07 +05:30
Rushabh Mehta
800b9c559a [minor] added create_custom_fields as a utility function 2017-09-04 14:40:40 +05:30
mbauskar
3913bc542f Merge branch 'master' into staging 2017-08-21 08:54:38 +05:30
mbauskar
2631edd4f3 [hotfix] doctype field in custom script should be mandatory 2017-08-18 11:31:51 +05:30
mbauskar
a5d3c90e97 resolved merge conflicts 2017-08-08 12:52:50 +05:30
Makarand Bauskar
bb750d5739 [test] test_customize_form.js (#3875) 2017-08-08 12:23:32 +05:30
Rushabh Mehta
805633860f [test] test_customize_form.js 2017-08-03 22:22:03 +05:30
Rushabh Mehta
7f4bdc45bc [test] test_customize_form.js 2017-08-03 18:37:35 +05:30
Rushabh Mehta
8fdc823e7e [test] test_customize_form.js 2017-08-03 18:24:27 +05:30
Rushabh Mehta
6dde90571d [test] test_customize_form.js 2017-08-03 17:01:41 +05:30
Rushabh Mehta
44a0cc0940 [test] test_customize_form.js 2017-08-03 12:19:36 +05:30
Makarand Bauskar
09a3a77ec2 [revert] Print traceback on ImportError in get_app_commands (#3846)
* [revert] Print traceback on ImportError in get_app_commands

* [tests] fixed the customize form test cases
2017-08-03 11:30:06 +05:30
Rushabh Mehta
eb2c725dba [fix] stop action if trigger fails for validate and before_, fixes frappe/erpnext#10200 (#3842)
* [fix] stop action if trigger fails for validate and before_, fixes frappe/erpnext#10200

* [fix] stop action if trigger fails for validate and before_, fixes frappe/erpnext#10200

* [fix] codacy

* [fix] add test to tests.txt
2017-08-02 17:53:28 +05:30
Manas Solanki
96297e1ff4 restrict user for changing the option property except few fieldtype (#3666)
* restrict user for changing the option property

* test case modification
2017-07-13 13:59:56 +05:30
Faris Ansari
13a7b60f14 Color picker (#3649)
* Added new Color picker pallet for calendar

* Review changes for Color Picker.

* Refactor code as per reviews.

* Refactor code for blur event.

* Add Color to db_schema

* set_value on click, minor cleanup

* Remove test field from Event

* styling

* revert event.json
2017-07-12 14:02:18 +05:30
Saurabh
19ee84a58e Validate column length (#3556)
* [fix] validate column length while creating doctype or custom field

* [fix] not allow user to add custom fields in [Custom Field, Customize Form Field, Customize Form, Custom Script, Property Setter]

* [fix] check if fieldname is conflicting with method names

* [fix] don't allow Custom Script and Property Setter to be updated via customize form
2017-07-05 15:03:01 +05:30
Makarand Bauskar
de2ce50d7a Merge pull request #3534 from rohitwaghchaure/field_type_change_issue
[Fix] Don't allow user to change the select fieldtype to data from the customize form
2017-06-27 19:29:54 +05:30
Rohit Waghchaure
2c5e6c7d0f [Fix] Don't allow user to change the select fieldtype to data from the customize form 2017-06-24 18:18:46 +05:30
Rushabh Mehta
6a725d6c95 [cleanups] 2017-06-22 18:21:48 +05:30
Rushabh Mehta
0879ecf326 [minor] in create_custom_field, if you set "append" to insert_after, it till append to the last field 2017-06-20 18:29:42 +05:30
Sagar Vora
67ac93201a Added columns field (#3469) 2017-06-13 14:50:15 +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
e1b243996a Added files in .eslintignore, updated globals 2017-06-02 15:00:15 +05:30
Faris Ansari
e243d76244 Rename validated to frappe.validated 2017-06-02 15:00:15 +05:30
Faris Ansari
b99fd5a4d3 Fixed tab spacing 2017-06-02 15:00:14 +05:30
Faris Ansari
2a3b34822b Remove all implicit global variables 2017-06-02 15:00:14 +05:30
Faris Ansari
bec6b5c827 Update Custom Field background color in Customize Form (frappe/erpnext#6432) (#3334) 2017-05-19 10:37:43 +05:30
Makarand Bauskar
b8f1fdc92e [minor] fixed the set_query for the doctype field in Custom Field (#3275) 2017-05-12 11:14:30 +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