Commit graph

48 commits

Author SHA1 Message Date
Nabin Hait
f28f1b79af
fix: Updated modified date 2019-06-05 14:47:30 +05:30
Mangesh-Khairnar
1387c331bc fix: print format builder setup (#7531) 2019-05-22 15:04:42 +05:30
Faris Ansari
37b65fb7ec fix: Disallow editing standard print formats 2019-05-09 15:32:04 +05:30
Faris Ansari
beb2727bb3
fix: Print Format UX (#7284)
- Rename type Server and Client to Jinja
- Rename Js to JS
- Patch
- Reload Print Format when new one is created
- Missing Semicolon and sanity check
2019-04-20 13:09:02 +05:30
karthikeyan5
2c9f5aeb90 feat(Raw Printing): added help text in UI 2019-04-16 15:40:56 +05:30
karthikeyan5
41fa048718 feat(Raw Printing): added "Enable Raw Printing"
> added more comments in code
2019-04-16 15:40:56 +05:30
karthikeyan5
70c256f81b feat(Raw Printing): Adding Support for qz-tray 2019-04-16 15:40:56 +05:30
Faris Ansari
19cd7bc6bc
fix: Hide Standard field since it is not editable (#7272)
- Standard can only be set in developer mode
2019-04-15 16:40:55 +05:30
Faris Ansari
5ac4a34f24 fix: Update modified to pick up field change
- Default Print Language is not picked up in some migrations
2019-03-11 05:32:03 +00:00
Rushabh Mehta
fc80532a80 fix: default source for letter head to be image 2019-02-12 09:58:09 +05:30
Rushabh Mehta
ddefbf9dfc feat(letter head): ability to set letter head directly from image 2019-02-12 09:56:23 +05:30
Sagar Vora
c8f23b4746 Merge branch 'master' into develop 2019-01-30 20:08:53 +05:30
Sagar Vora
6811d8396f
fix: fallback not reqd for section label, has default (#6865) 2019-01-30 19:44:13 +05:30
Faris Ansari
621cadcf22
Revert "fix: Print Format Builder not working unexpected string (#6861)" (#6863)
This reverts commit 42ec843b24.
2019-01-30 18:43:40 +05:30
Kartik Sharma
42ec843b24 fix: Print Format Builder not working unexpected string (#6861)
* Fix Print Format Builder

* fix: add *working* fallback

* fix: keep quotes around attr value
2019-01-30 18:41:12 +05:30
Sagar Vora
ef82f39f99 Merge branch 'staging' into develop 2019-01-29 18:24:11 +05:30
Faris Ansari
cc033a67eb fix(PrintFormat): Section Labels with spaces in them got truncated (#6819) 2019-01-25 11:19:57 +05:30
Aditya Hase
7bd056c2d1 fix: Use ImportError instead of ModuleNotFoundError (#6808)
ModuleNotFoundError is available in python 3.6

This should have been included in Frappe PR #6797
2019-01-23 16:43:37 +05:30
Frappe Bot
22f4433406 Merge branch 'staging' into develop 2018-11-13 11:02:24 +00:00
rohitwaghchaure
30ee228b4a Code cleanup and fixed print permission error (#6377) 2018-11-12 11:08:18 +05:30
Ameya Shenoy
e551153ea0
Merge branch 'staging' into develop 2018-09-26 07:21:28 +00:00
Faris Ansari
f169f6231d fix(ux): Reorder Print Server fields (#6115)
- fix timeline overflow text
2018-09-24 12:46:41 +05:30
Chinmay Pai
6e84bbe80d
Merge branch 'develop' into file-api 2018-09-21 13:42:32 +05:30
Rushabh Mehta
2e6a202652 Postgres support for Frappe (#5919)
* [start] postgres

* [wip] started refactoring db_schema

* Add psycopg2 to requirements.txt

* Add support for Postgres SQL

- Separate frameworkSQL, database, schema, setup_db file for
mariaDB and postgres
- WIP

* Remove quotes from sql to make it compatible with postgres as well

* Moved some code from db_schema to database.py

* Move code from db_schema to schema.py

Add other required refactoring

* Add schema chages

* Remove redundant code in file

* Add invalid column name exception class to exceptions.py

* Add back tick in query wherever needed and replace ifnull with coalesce

* Update get_column_description code in database.py file

* Remove a print statement

* Add keys to get on_duplicate query

* Add bactick wherever necessary

- Remove db_schema.py file

* Remove DATE_SUB as it is incompatible with postgres

- Fix prepare_filter_condition

* Add backtick and quotes wherever necessary
- Move get_database_size to frappe.db namespace
- fix some left out bugs and errors

* Add code to create key and unique index
- added mysql and posgres in their respective database.py

* Add more bacticks in queries and fix some errors
- Pass keys to on_duplicate_update method
- Replace MONTH with EXTRACT function
- Remove DATEDIFF and CURDATE usage

* Cast state value to int in toggle_two_factor_auth
- since two_factor_auth has the datatype of Int

* Refactor
- Replace Timediff with normal arithmetic operator
- Add MAX_COLUMN_LENGTH
- Remove Redundant code
- Add regexp character constant
- Move create_help_table to database.py
- Add get_full_text_search_condition method
- Inherit MariaDBTable from DBTable

* Replace Database instance with get_db method

* Move db_manager to separate file

* Refactor
- Remove some unwanted code
- Separate alter table code for postgres and mysql
- Replace data_type with column_type in database.py

* Make fulltext search changes in global_search.py

* Add empty string check

* Add root_password to site config

* Create cli command for postgres console

* Move setup of help database to setup_db.py

* Add get_database_list method

* Fix exception handling
- Replace bad_field handler with missing_column handler

* Fix tests and sql queries

* Fix import error

* Fix typo db -> database

* Fix error with make_table in help.py

* Try test for postgres

* Remove pyhton 2.7 version to try postgres travis test

* Add test fixes

* Add db_type to the config of test_site_postgres

* Enable query debug to check the reason for travis fail

* Add backticks to check if the test passes

* Update travis.yml
- Add postgres addon

* Try appending 'd_' to hash for db_name
- since postgres does not support dbname starting with a number

* Try adding db_type for global help to make travis work

* Add print statements to debug travis failure

* Enable transaction and remove debug flag

* Fix help table creation query (postgres)

* Fix import issue

* Add some checks to prevent errors
- Some doctypes used to get called even before they are created

* Try fixes

* Update travis config

* Fix create index for help table

* Remove unused code

* Fix queries and update travis config

* Fix ifnull replace logic (regex)

* Add query fixes and code cleanup

* Fix typo
- get_column_description -> get_table_columns_description

* Fix tests
- Replace double quotes in query with single quote

* Replace psycopg2 with psycopg2-binary to avoid warnings
- http://initd.org/psycopg/docs/install.html#binary-install-from-pypi

* Add multisql api

* Add few multisql queries

* Remove print statements

* Remove get_fulltext_search_condition method and replace with multi query

* Remove text slicing in create user

* Set default for 'values' argument in multisql

* Fix incorrect queries and remove few debug flags
- Fix multisql bug

* Force delete user to fix test
- Fix Import error
- Fix incorrect query

* Fix query builder bug

* Fix bad query

* Fix query (minor)

* Convert boolean text to int since is_private has datatype of int
- Some query changes like removed double quotes
and replace with interpolated string to pass multiple
value pass in one of the query

* Extend database class from an object to support python 2

* Fix query
- Add quotes around value passed to the query for variable comparision

* Try setting host_name for each test site
- To avoid "RemoteDisconnected" error while testing data migration test
- Update travis.yml to add hosts
- Remove unwanted commit in setup_help_database

* Set site hostname to data migration connector (in test file)
- To connect the same site host

* Fix duplicate entry issue
- the problem is in naming series file.
In previous commits I unknowingly changed a part of a series query
due to which series were not getting reset

* Replace few sql queries with orm methods

* Fix codacy

* Fix 'Doctype Sessions not found' issue

* Fix bugs induced during codacy fixes

* Fix Notification Test

- Use ORM instead of raw sql

* Set Date fallback value to 0001-01-01

- 0000-00-00 is invalid date in Postgres
- 0001-01-01 works in both

* Fix date filter method

* Replace double quotes with single quote for literal value

* Remove print statement

* Replace double quotes with single

* Fix tests

- Replace few raw sql with ORM

* Separate query for postgres

- update_fields_to_fetch_query

* Fix tests

- replace locate with strpos for postgres

* Fix tests

- Skip test for datediff
- convert bytes to str in escape method

* Remove TestBot

* Skip fieldname extraction

* Replace docshare raw sql with ORM

* Fix typo

* Fix ancestor query test

* Fix test data migration

* Remove hardcoded hostname

* Add default option and option list for db_type

* Remove frappe.async module

* Remove a debug flag from test

* Fix codacy

* fix import issue

* Convert classmethod to static method

* Convert few instance methods to static methods

* Remove some unused imports

* Fix codacy

- Add exception type
- Replace few instance methods with static methods
- Remove unsued import

* Fix codacy

* Remove unused code

* Remove some unused codes

- Convert some instance methods to static function

* Fix a issue with query modification

* Fix add_index query

* Fix query

* Fix update_auth patch

* Fix a issue with exception handling

* Add try catch to a reload_doc

* Add try-catch to file_manager_hook patch

* import update_gravatar to set_user_gravatar patch

* Undo all the wrong patch fixes

* Fix db_setup code 😪
- previously it was not restoring db from source SQL
which is why few old patched were breaking
(because they were getting different schema structure)

* Fix typo !

* Fix exception(is_missing_column) handling

* Add deleted code
- This code is only used in a erpnext patch.
Can be moved to that patch file

* Fix codacy

* Replace a mariadb specific function in a query used in validate_series

* Remove a debug flag

* Revert changes (rename_parent_and_child)

* Fix validate_one_root method

* Fix date format issue

* Fix codacy
- Disable a pylint for variable argument warning
- Convert an instance method to static method

* Add bandit.yml

The Codacy seems to use Bandit which generates
warning for every subprocess import and its usage during pytest
Since we have carefully used subprocess (avoided user input),
warnings needs to be avoided.
This can be removed if we have any alternative for subprocess usage.

* Skip start_process_with_partial_path check

* Fix typo

* Add python 2.7 test

* Move python versions in travis.yml

* Add python versions to jobs

* Overwrite python version inheritance for postgres in travis.yml

* Add quotes around python version in .travis.yml

* Add quotes around the name of the job

* Try a travis fix

* Try .travis.yml fix

* Import missing subprocess

* Refactor travis.yml

* Refactor travis.yml
- move install and tests commands to separate files
- Use matrix to build combination of python version and db type

* Make install.sh and run-tests.sh executable

* Add sudo required to travis.yml to allow sudo cmmands in shell files

* Load nvm

* Remove verbose flag from scripts

* Remove command-trace-print flag

* Change to build dir in before script

* Add absolute path for scripts

* Fix tests

* Fix typo

* Fix codacy
- fixes - "echo won't expand escape sequences." warning

* Append (_) underscore instead of 'd' for db_name

* Remove printf and use mysql execute flag
2018-09-21 10:20: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
Charles-Henri Decultot
1e5edc9a11 Print format builder translations 2018-08-10 16:49:57 +00:00
Ameya Shenoy
2d10c8e074
minor fixes
- [x] linting fixes
- [x] removed format as a parameter, instead used print_format
- [x] removed pycups as a requirement, user needs to manually install
- [x] moved import from global to inside a function to prevent errors
- [x] uncheck Enable Print Server is pycups is not installed
2018-07-24 11:03:11 +00:00
sbco
87ba4f8553 Add frm.trigger for server_ip & port 2018-07-02 02:01:21 +03:00
Mohammed R Abukhamseen
6087ee7c9c
Update print_settings.py 2018-06-29 05:39:40 +03:00
sbco
664a92eda4 set defult 2018-06-29 03:36:28 +03:00
sbco
d6ca2ceaee enable print server 2018-06-28 12:45:07 +03:00
Saurabh
1e00ef289e Merge branch 'master' into develop 2018-04-25 11:35:48 +05:30
Manas Solanki
e95df5491e fixed the letterhead (#5477) 2018-04-21 20:19:01 +05:30
ci2014
a40c8dd3bb Allow users to define default language for print format (#4777)
* Update print_format.json

* Update print.js

* Update print.js

* Update form.js

* Set default lang when print_format lang not found
2018-02-13 13:33:52 +05:30
Nabin Hait
4d4e5dcc02 Fixes for align labels right 2017-09-14 12:25:21 +05:30
Faris Ansari
3df0659c87 [Print Format] Align labels to right (#4068) 2017-09-06 12:17:48 +05:30
Rushabh Mehta
3ba0baaff4 Merge pull request #3947 from rmehta/print-style
[added] print style
2017-08-22 11:03:51 +05:30
Rohit Waghchaure
40bdc767dc [minor] Bypass template validation for js print format 2017-08-19 15:15:58 +05:30
Rushabh Mehta
e62de7b0e7 [minor] print_style.js 2017-08-18 15:03:41 +05:30
Rushabh Mehta
7dedc69461 [print-style] sync, fix tests and remove selection 2017-08-18 14:53:38 +05:30
Rushabh Mehta
595b4a88be [fix] no default print style 2017-08-18 09:26:13 +05:30
Rushabh Mehta
19e9834850 [added] print style 2017-08-17 18:34:14 +05:30
Rushabh Mehta
eac06ccd77 [tests] reset frappe.local.form_dict 2017-07-03 14:31:41 +05:30
Rushabh Mehta
16ed88051e [tests] test_print_format.py test by printing 2017-07-03 14:19:41 +05:30
Faris Ansari
e1b243996a Added files in .eslintignore, updated globals 2017-06-02 15:00:15 +05:30
Faris Ansari
2a3b34822b Remove all implicit global variables 2017-06-02 15:00:14 +05:30
Makarand Bauskar
9149fbc5df [minor] fixes for default print format appears twice (#3392) 2017-05-26 12:44:38 +05:30
Rushabh Mehta
11d575af46 [rename] Print module to Printing 2017-05-03 15:59:24 +05:30