Commit graph

610 commits

Author SHA1 Message Date
Aradhya
f587140f6f Merge branch 'develop' of https://github.com/Aradhya-Tripathi/frappe into bg-submissions 2022-11-04 18:34:41 +05:30
Sagar Vora
cb7d25a293
fix(meta): ensure that insert_after is always considered when sorting fields (#18682)
* fix(meta): ensure that `insert_after` is always considered when sorting fields

* test: add nosemgrep to comment

Co-authored-by: Dany Roberts <danyrt@wahni.com>
2022-10-31 15:37:55 +05:30
Ankush Menat
8cca50bf26
refactor: remove naming case feature (#18672)
This has never worked since 2016... which can mean two things:
- No one really uses this.
- If I fix this now suddenly people will find different behaviour in
  naming because `name_case` is selected in some doctypes (but never
  tested)
2022-10-31 11:23:49 +05:30
phot0n
c3e2cd1629 fix: only allow queue_in_background in customize form 2022-10-30 23:42:14 +05:30
Aradhya
7cefc240ac fix: merge conflicts 2022-10-21 14:22:51 +05:30
Anoop
c44e278fed
feat: add video conferencing option (Google Meet) to Google Calendar integration (#17851)
* feat: add video conferencing (via google meet) for events syncing with google calendar

* fix: unset add_video_conferencing if sync_with_google_calendar not enabled

* fix: remove conference data if add_video_conferencing disabled during update

* fix: restrict add conferencing if event_category in Event, Meeting and Other

* fix: save meet link while pulling from calendar
updated response API Response comment with conference details
show google calendar section if pulled from google calendar

* feat: show link to join video conference with google meet

* fix(style): linter errors

* fix(style): linter errors

* fix: set conferenceDataVersion 1 only if google meet conferencing enabled
remove google meet link from event needs both conferenceData as null and conferenceDataVersion 1

* Update frappe/desk/doctype/event/event.py

show add_video_conferencing for events of all categories

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>

* Update frappe/desk/doctype/event/event.json

show add_video_conferencing for events of all categories

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>

* fix: handle empty ends_on, use starts_on

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>

* fix: do not update Event modified time on db set meet link

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>

* fix: add email field event participants table
set email from linked contact
google calendar event to use event participant email as attendees

* fix: attendees not cleared from google calendar event

* fix(style): linter suggestions

* fix: make email field non-read only, called set_participants_email from before_save hook

* test: update new no of fields in event doctype in test_fetch_to_customize

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
2022-10-18 19:07:48 +05:30
Shariq Ansari
b0c1e400ea
feat: configurable default views (#18409)
Co-authored-by: hrwx <himanshuwarekar@yahoo.com>
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-10-17 16:36:01 +05:30
Aradhya
fdf1ed9656 Merge branch 'develop' of https://github.com/frappe/frappe into bg-submissions 2022-10-12 19:34:00 +05:30
Ankush Menat
c3644093d9 style: format
[skip ci]
2022-10-12 17:38:41 +05:30
Aradhya
2b7ea89929 feat: Added submittable and queue in background logic 2022-10-11 21:24:28 +05:30
Rohan Bansal
5a431b0ec5 fix: ux improvements on doctype layout 2022-10-11 17:25:48 +05:30
Aradhya
b44ad8acb6 feat: Adding queue in background to customize form as well 2022-10-09 17:37:02 +05:30
Rohan Bansal
d98841eaac fix: handle new layout syncs differently 2022-10-06 16:27:20 +05:30
Rohan Bansal
d3997f118b Merge remote-tracking branch 'upstream/develop' into feat-doctype-layout-sync-dev 2022-10-06 16:27:16 +05:30
Devin Slauenwhite
5330814d7a
fix: make module to export required. (#18204) 2022-09-25 15:14:13 +05:30
Rohan Bansal
c2e44754d1 feat: allow syncing new fields in Doctype Layout 2022-09-06 17:51:25 +05:30
HENRY Florian
df9e8c62dd
feat: review Custom and Build workspace, move background Job to Build Workspace (#17981)
* feat: review link for Custom, build and NavBar

* feat: review link for Custom, build and NavBar

* feat: review link for Custom, build and NavBar

* feat: review link for Custom, build and NavBar

* feat: review link for Custom, build and NavBar

* feat: review link for Custom, build and NavBar

* chore: linter json

* fix: replace Block Module By Module Profile

* chore: cypress test

* chore: reset package.json to develop

* refactor: workspace link, system logs section

- removed workspace listview link, visiting list view isn't required for
  practically all the tasks
- Frappe Logs -> System Logs

[skip ci]

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-09-02 11:20:59 +05:30
Ankush Menat
e8af6b2c16 feat: make attachments public on doctypes
When this checkbox is checked, while uploading docs using fileuploader
the default visibility will be set to "public".

At present all uploaded attachments are private, however in following
cases it makes sense to set default as public:

1. Blog post
2. Item catalog
3. Website item

Considering this we decided to add this configurtion so developers can
specify sane default while user still has control over it using
"Customize form"

Enabled this for "blog post" doctype

Unrelatd change: consistent "form settings" section on DocType and customize
form
2022-08-26 12:42:26 +05:30
Ankush Menat
2eec621e95 chore: db.get_all -> get_all
Reduces 1 pointless function call.
Function calls are also not "super cheap" in python.
2022-08-22 11:35:14 +05:30
mergify[bot]
d1ce02474a
Merge pull request #17826 from resilient-tech/perf-custom-fields-creation
perf: ~65% faster `create_custom_fields`
2022-08-18 15:30:26 +00:00
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Sagar Vora
4b8ae3d471 perf: ~65% faster create_custom_fields 2022-08-13 18:20:05 +05:30
Raffael Meyer
a7633738ea
Merge branch 'develop' into merge_translated_doctypes 2022-08-13 14:03:32 +02:00
Sagar Vora
e3d581afdf fix: dont mutate df when creating custom fields 2022-08-13 12:57:03 +05:30
Himanshu
85467b3e96
Merge branch 'develop' into merge_translated_doctypes 2022-08-09 15:16:49 +01:00
Gavin D'souza
624c308659 Merge branch 'develop' of github.com:frappe/frappe into modules-refactor 2022-08-08 12:27:11 +05:30
hrwx
b01929405d refactor: translatable doctypes 2022-08-05 21:38:10 +01:00
Ankush Menat
40f27f908a style: format JS files with prettier 2022-08-04 14:51:01 +05:30
Gavin D'souza
3863d9bb80 fix(global_search): Trigger rebuilding on Custom Field's property change 2022-08-02 14:49:04 +05:30
Ankush Menat
b8d56eaefb chore: remove test doctypes from prod 2022-07-22 14:25:49 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Ankush Menat
6dfbf7b19e fix: show doctype and fieldname filters 2022-06-13 16:42:37 +05:30
Ankush Menat
359c7768f5 fix: multiple postgres transaction abort issues
- wrap setup fixtures in savepoint
- wrap scheduled_job_type in savepoint
- ignore duplicates where it's ignored by exc
- dont attempt to delete from deleted table
- delete custom field and commit - stale meta causes future inserts to
  insert unknown field.
2022-06-05 00:26:15 +05:30
chillaranand
25f82e966c refactor: Remove unused imports & code 2022-05-19 15:34:35 +05:30
chillaranand
1d763a6659 refactor: Fix flake8 issues 2022-05-19 15:34:35 +05:30
Himanshu
70409a3c7b
fix: set translated text to link field (#15451)
- Fixes [Issue/15324](https://github.com/frappe/frappe/issues/15324)
- When selecting a value for Link Field, the English text was set as link field value.
- This PR aims to fix it by setting the translated text as link field value on selection.

Todo:

- [x] Show translated text in the select dropdown
- [x] Set translated value to Link field on select
- [x] Show original value when link field is in focus
- [x] Add option to toggle this behaviour

### Behaviour

- Link field loses focus: show the translated name.
- Link field is focused
    - If old value is present
        - If options **are** one of [Role, DocType]: show the translated name
        - Else: show the name (untranslated) to enable search in untranslated values
    - Else: show what the user typed (untranslated) to enable search in untranslated values
- Value is selected: link field loses focus

## Demo

### Link to UOM in a custom Item DocType

The UOM names are in english, so the search needs to happen in english. When possible, the translation is displayed.

#### Before

https://user-images.githubusercontent.com/14891507/156415248-e5e80d05-53dc-4ca8-89c7-998986ff6e99.mov

#### After

https://user-images.githubusercontent.com/14891507/156410386-a874430c-f340-43ed-9c3a-92e8d4d50fc9.mov

### Link to DocType in Customize Form

The DocType names get translated before being searched. This is a preexisting hack in the framework for DocType and Role. In this case, we can search in the translations.

#### Before

https://user-images.githubusercontent.com/14891507/156414648-8e505f8c-9dee-4358-8182-3b358c28bb62.mov

#### After

https://user-images.githubusercontent.com/14891507/156411881-c4ca22e1-1397-4e13-9768-5e16b72f8d6d.mov

https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/customize-form/edit?wiki_page_patch=fdafee2715
2022-05-16 13:21:42 +00:00
phot0n
f14fb2326d test(customize form): rename test_autoincrement_autoname to test_change_to_autoincrement_autoname 2022-05-13 00:09:51 +05:30
phot0n
f6dac70033 refactor(minor): convert change_name_type_and_make_sequence function to setup_autoincrement_and_sequence method
* chore(Customize Form): remove autoincrement naming option from autoname description

* chore: move sequence cache comment from schema.py to database.py

* chore: added docstrings to some functions
2022-05-13 00:03:19 +05:30
phot0n
82aa8dee08 fix: don't allow autoincrement autoname from customize form
* test: test_change_autoname for doctype

* test: test_autoincrement_autoname for customize form
2022-05-12 15:18:02 +05:30
phot0n
edce9a1865 Revert "fix: allow setting autoincrement autoname from customize form"
This reverts commit d43d9594f0ed6f6d88466879bc36a5c5bca24b77.
2022-05-05 21:31:14 +05:30
phot0n
2ba1b6a549 chore: better naming for setup_name_type_and_sequence 2022-05-05 21:31:14 +05:30
phot0n
87916060c9 test: change autoname from customize form 2022-05-05 21:31:13 +05:30
phot0n
9f0c40dbba fix: create sequence onchange from any other autoname whcih is not autoincrement
* chore: use class variable for determining sequence cache

* chore: use sql_ddl when creating sequence
2022-05-05 21:31:13 +05:30
phot0n
646d2271b8 fix: allow setting autoincrement autoname from customize form
* chore: updated the warning under autoincrement autoname
2022-05-05 21:31:13 +05:30
Ritwik Puri
b41379c78b
fix: misc fixes (integer primary keys) (#16307)
* fix: misc fixes

local.x gets resetted on every request so switched to a simple dict

simplified is_val_used in set_next_val function for sequences

* chore: use multisql for sequence methods

* fix: fields not updating on form

* minor(base_input): removed unnecessary branching in update_input

* chore: remove prints and rename autoincremented_status_map

* chore: added proper type hint + comment + formatting

* fix: added searching in cast_name rather than handling it manually

* fix: share condition query + test_build_match_conditions

* fix: add cast_name to more places

* test: test for sequence

* fix: sequence functions

* fix: inherit frappetestcase

* minor: attach sequence methods to db context local

* chore: update sequence function names in Database

use frappe.db for sequences in naming.py

* fix: convert filename to str (for autoincremented doctypes)

* chore: better regex for modifying values for postgres

* minor: allow changing name column type (if no data is present in the doctype)

* refactor: validate_autoname

converted it to a simple function
enabled changing autoincrement autoname from customize form

* fix: use sql_ddl for change_column_type in postgres

* fix: use not null constraint in postgres when changing name type

* fix(test): updated test_autoincremented_doctype_transition with transitioning when no data is present

* fix(test): updated test_cast_name

probably messed up during rebase

* fix(test): used rollback upon error in transaction for postgres

* chore: use frappe.db.x methods for sequences

* minor: use temporary sequences in test

* minor: use generate_hash for sequence naming in sequence tests

* chore: replace sequence imports with frappe.db.x

* chore: move out casting name fields to a separate method

* refactor: cast_name

more explicit cases for casts and added docstring

* fix: added space in test_cast_name

* chore: fix linter

* chore: better naming for can_change_name_column_type

* chore: add comment for autoincremented_site_status_map

* chore: update/add docstrings
2022-04-29 15:06:03 +05:30
gavin
f1cceba81b
Merge pull request #16763 from surajshetty3416/fix-autoname-validation
fix: Validate "autoname" for Customize Form
2022-04-28 15:03:39 +05:30
Suraj Shetty
30440026db fix: Do not allow autoname changes to/from autoincrement in customize form 2022-04-28 11:44:33 +05:30
Suraj Shetty
ccc82e2c4c
Merge pull request #15538 from noahjacob/phone_field_control
feat: Phone Control Type
2022-04-28 10:27:52 +05:30
Suraj Shetty
9422a4fc88 fix: Add naming_rule to retain changes from Customize Form 2022-04-27 10:25:47 +05:30
Suraj Shetty
8f94cb655f
Merge branch 'develop' into phone_field_control 2022-04-19 16:28:18 +05:30