No description
- 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 |
||
|---|---|---|
| .github | ||
| cypress | ||
| esbuild | ||
| frappe | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .flake8 | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .mergify.yml | ||
| .pre-commit-config.yaml | ||
| .pylintrc | ||
| .releaserc | ||
| .snyk | ||
| .stylelintrc | ||
| attributions.md | ||
| bandit.yml | ||
| CODE_OF_CONDUCT.md | ||
| codecov.yml | ||
| CODEOWNERS | ||
| cypress.json | ||
| dev-requirements.txt | ||
| generate_bootstrap_theme.js | ||
| hooks.md | ||
| LICENSE | ||
| Makefile | ||
| node_utils.js | ||
| package.json | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| SECURITY.md | ||
| setup.py | ||
| sider.yml | ||
| socketio.js | ||
| yarn.lock | ||
Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext
Login for the PWD site: (username: Administrator, password: admin)
Table of Contents
Installation
Contributing
Resources
- frappeframework.com - Official documentation of the Frappe Framework.
- frappe.school - Pick from the various courses by the maintainers or from the community.
License
This repository has been released under the MIT License.