Commit graph

100 commits

Author SHA1 Message Date
Gavin D'souza
d81fe8699c feat: frappe.db.set_single_value
Alias to frappe.db.set_value without having to pass the doctype name
twice or teh second one as None

Other changes:
* set/get db APIs for single DocTypes
* Make use of redundant cache key in frappe.db.get_single_value
2022-01-10 21:03:14 +05:30
Gavin D'souza
3b7b555148 fix: Pass parent_doctype required for DatabaseQuery perm checks
has_child_table_permission would throw 'Parent DocType Required: Please
specify a valid parent DocType for {TEST DOCTYPE}' after the previous
commit 33b7d7d74f. Passing parent_doctype
solves this
2021-12-24 13:57:07 +05:30
Ankush Menat
b1d0e574a0 feat(REST): OR filters in REST API 2021-11-27 17:17:05 +05:30
Sagar Vora
0b0f896258 fix: cleaner implementation for link validation 2021-11-12 10:36:21 +05:30
Sagar Vora
af41d9f8a5 fix: stricter validation 2021-11-11 12:29:49 +05:30
Sagar Vora
9503e7788a fix: restore validate_link 2021-11-11 12:24:22 +05:30
Faris Ansari
179960d67f
Merge pull request #14134 from netchampfaris/print-format-builder-beta
feat: New Print Format Builder
2021-10-25 12:12:08 +05:30
Sagar Vora
b60f0772db fix: do not pop doctype and docname 2021-10-23 15:51:16 +05:30
mergify[bot]
868d545ba5
Merge branch 'develop' into print-format-builder-beta 2021-10-22 04:38:08 +00:00
Sagar Vora
9df93d341b fix: ignore flags in frappe.client.bulk_update 2021-10-21 15:35:02 +05:30
Faris Ansari
f4bd62c010 feat: More features
- Letterhead editing
- Edit Header and Footer
- Margin Text
- PrintFormatGenerator class handles generation of HTML and PDF and repeating of Header/Footer
- Simplify /printpreview
- Separate renderer files for each fieldtype
2021-09-15 18:50:41 +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
ahashad
ecb81929c7
Update client.py (#12790)
Fix You do not have enough permissions to access this resource Error, when adding barcode during creating new stock Item.
2021-04-08 04:43:36 +00:00
Walstan Baptista
193dbec47c
fix: frappe.client.get_value() to work when as_dict is false (#12739) 2021-03-31 16:33:34 +00:00
Rushabh Mehta
d959fc7310 fix(minor): tests and linting 2021-03-30 11:52:46 +05:30
Rushabh Mehta
2248c6c410 fix(minor): lockdown frappe.client.get_list 2021-03-30 11:25:40 +05:30
Saurabh
a0086db9b6
fix(frappe client): validate http method for frappe.client api (#11228) 2020-09-14 12:30:30 +05:30
Rushabh Mehta
7895ddf865 fix(minor): client.get_value fix for single 2020-08-22 21:18:38 +05:30
Rushabh Mehta
2b80e710bc fix(minor): client.get_value fix for single 2020-08-22 21:15:45 +05:30
Rushabh Mehta
ffa785bb47 fix(client.py): fix get_value for name 2020-08-21 15:14:59 +05:30
Rushabh Mehta
a4dfac507b fix(minor): use get_list in client.get_value for tighter checks 2020-08-19 14:57:59 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Suraj Shetty
19dae7c3b3 fix(UX): Hide Amend button if the document has been already ame… (#8306)
* fix: Hide Amend button if the document has been already amended

* chore: Remove unused code to avoid confusion

* style: Remove unused variable

* refactor: Rename method
2019-09-02 16:18:56 +05:30
Faris Ansari
0c7392a597 fix: Fetch app_logo via hooks 2019-06-18 19:05:25 +05:30
Prssanna Desai
12a3dc1124 feat(desk): Show preview popover on hover of link and control fields 2019-04-24 15:09:41 +05:30
Prssanna Desai
c062b388a7 Improve preview popover 2019-04-24 15:09:41 +05:30
Prssanna Desai
f2391ff87a Add preview popover on hover to all link fields 2019-04-24 15:09:41 +05:30
Suraj Shetty
fbf67b78b1 Move get_safe_filters to frappe.utils 2019-03-11 19:41:50 +05:30
Aldo
67eb4d7245 fix: typo in frappe.client.attach_file which resulted in error (#6977)
It returned `f.as_dict()`. `f` is not declared in the current scope.\Changed it with `_file`.
`return _file.as_dict()`
2019-02-25 11:33:26 +05:30
Ameya Shenoy
13524a1ad5
Merge branch 'staging' into develop 2018-11-23 08:14:29 +00:00
Ameya Shenoy
d1d0edc636
Merge branch 'master' into staging-fixes 2018-11-23 08:07:36 +00:00
rohitwaghchaure
a3f63ca1bd fix: Child table data can be get easily by passing fake parent id (#6509) 2018-11-22 10:24:06 +05:30
Ameya Shenoy
f0f8851809
fix: commonify json.loads for filters 2018-10-23 13:20:05 +05:30
Suraj Shetty
32f8ae5c81 Fix count filter load 2018-10-21 09:52:12 +05:30
Chinmay Pai
6e84bbe80d
Merge branch 'develop' into file-api 2018-09-21 13:42:32 +05:30
Chinmay Pai
75c7992557
file-api: add new test, fix minor bugs and code indentation
Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-21 13:40:25 +05:30
Faris Ansari
89d56e4de1 fix(translations): Replace translations by keyword with indexed version
Keywords in the translation also gets translated which
results in an error because python cannot find the key
2018-09-18 11:55:10 +05:30
Chinmay Pai
5bd66f134d
file-api: add improvements to save() api
file can now be saved by calling save() on the file object instance

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-13 09:46:48 +05:30
Chinmay Pai
6eca292e1a
[3/3] file-api: code migration
migrate api from file_manager.py to file.py

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-09-06 01:18:21 +05:30
Chinmay Pai
16a99f5472
[1/3] file-api: code migration
migrate api from file_manager.py to file.py

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
2018-08-31 01:55:15 +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
Achilles Rasquinha
e1be2a19c6 Added Quick Edit 2018-03-31 12:57:24 +05:30
Nabin Hait
cc251a0869 Fixed merge conflict 2018-03-29 13:52:00 +05:30
Ameya Shenoy
a5788e1746 Child table permission error fix (#5311)
Initially there were no permission checks on child table, which made the
child table data exposable through the API. The fix issued in commit
807a300fd8 involved default denying
permission to access child tables via client.py . The current fix checks
the permissions on the parent doctype and allows access if the user has
access on the parent
2018-03-29 13:11:36 +05:30
Nabin Hait
b455d90631 Merge branch 'master' into develop 2018-03-28 08:43:50 +05:30
Rushabh Mehta
807a300fd8 [hotfix] dont allow API query for child table 2018-03-28 06:41:56 +05:30
Dominik Ottenbreit
cc19e06ed7 Fix docstring information to be clear (#5025)
* Fix docstring information to be clear

Updated the docstrings due to errors I encountered:
* `is_private` must be 1, normally would expect true or false
* `filedata` must be urlencoded base64 to work

* Update client.py
2018-02-19 11:20:29 +05:30
Revant Nandgaonkar
856cbfa675 Attach file via ReST API (POST) (#4965)
* Attach file via ReST API (POST)

* [Fix] import save_file

* request body as param, validate request method

* explicit naming - decode_base64
2018-02-12 17:06:58 +05:30
Achilles Rasquinha
eb229ad14b Fixed Codacy 2018-01-18 16:57:04 +05:30