Commit Graph

1616 Commits

Author SHA1 Message Date
Saqib
8aad02f822 fix: naming series - cannot reset current value to zero (#23505) 2020-10-04 18:13:58 +05:30
prssanna
031502e64c fix: longer timeout for company replace abbreviation 2020-09-28 13:34:24 +05:30
Suraj Shetty
bf7adb8b38 refactor: Format and sanitise user inputs to search queries. (#23064)
* refactor: Sanitize whitelisted method inputs

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* refactor: Format and sanitize tax_account_query inputs

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* refactor: Validate and sanitize search inputs via decorator

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

* style: Minor formatting fix

* refactor: Validate and sanitize search inputs using decorator

* fix: Typo

* fix: Remove unwanted import statement

* refactor: Repalce validate_and_sanitize_search_inputs() with validate_and_sanitize_search_inputs

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>

Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-08-20 11:17:30 +05:30
Anupam Kumar
8969e19594 fix: Opportunity/Quotation Lost Reason Fix (#23016) 2020-08-13 09:19:53 +05:30
Nabin Hait
395f44c8b7 fix: Replace company abbr 2020-07-14 20:46:25 +05:30
Marica
5d5cb0ac28 fix: Set Root as Parent if no parent in new tree view node (#22507) 2020-06-30 08:21:07 +05:30
mergify[bot]
835b1b4f0d fix: Insert Supplier Group via List View (#22403) (#22407)
(cherry picked from commit 7af7bb8311)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-06-23 19:18:18 +05:30
Anupam K
168d070d73 email digest html fix
(cherry picked from commit bd449c8d07)
2020-06-19 06:09:49 +00:00
mergify[bot]
59938a46eb fix: typo for language in Terms description (#22270) (#22272)
(cherry picked from commit c159556c24)

Co-authored-by: Kenneth Sequeira <33246109+kennethsequeira@users.noreply.github.com>
2020-06-18 09:46:03 +05:30
Vishal Dhayagude
18b3c4802b fix: pound, gram to Ounce converion factor added (#21710)
* fix: pound, grams to Ounce converion factor added

* fix: patch date updated for UOM Conversion Factor

* fix: grams move to gram

* fix: duplicate entry of uom converion factor and patch added

* fix: typo fix

* fix: minor changes

* Update patches.txt

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-05-25 15:13:09 +05:30
Nabin Hait
ff49a2f0b6 fix: Ignored user permission for parent_company and existing_company field in Company (#21010) 2020-03-26 13:36:21 +05:30
Chinmay D. Pai
e53e96f01b chore: pass traceback and error message as kwargs
fixes issue where the system tries to generate an error log but fails
with the following error:

Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 421, in install_country_fixtures
    frappe.get_attr(module_name)(company_doc, False)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 17, in setup
    make_fixtures(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 523, in make_fixtures
    set_tax_withholding_category(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 543, in set_tax_withholding_category
    fiscal_year = get_fiscal_year(today(), company=company)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 24, in get_fiscal_year
    return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 80, in get_fiscal_years
    raise FiscalYearError(error_msg)
erpnext.accounts.utils.FiscalYearError: Date 20-03-2020 not in any active Fiscal Year.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/app.py", line 62, in application
    response = frappe.api.handle()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/handler.py", line 61, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 1054, in call
    return fn(*args, **newargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 273, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 296, in _save
    self.insert()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 260, in insert
    self.run_post_save_methods()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 926, in run_post_save_methods
    self.run_method("on_update")
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 794, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 1065, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 1048, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 788, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 107, in on_update
    install_country_fixtures(self.name)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 423, in install_country_fixtures
    frappe.log_error(str(e), frappe.get_traceback())
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 1524, in log_error
    method=title)).insert(ignore_permissions=True)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 231, in insert
    self._validate()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/document.py", line 463, in _validate
    self._validate_length()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/base_document.py", line 583, in _validate_length
    self.throw_length_exceeded_error(df, max_length, value)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/model/base_document.py", line 599, in throw_length_exceeded_error
    .format(reference, _(df.label), max_length, value), frappe.CharacterLengthExceededError, title=_('Value too big'))
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 377, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 356, in msgprint
    _raise_exception()
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/frappe/frappe/__init__.py", line 316, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.CharacterLengthExceededError: Error Log f2cbb8c0f2: 'Title' (Traceback (most recent call last):
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/setup/doctype/company/company.py", line 421, in install_country_fixtures
    frappe.get_attr(module_name)(company_doc, False)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 17, in setup
    make_fixtures(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 523, in make_fixtures
    set_tax_withholding_category(company)
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/regional/india/setup.py", line 543, in set_tax_withholding_category
    fiscal_year = get_fiscal_year(today(), company=company)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 24, in get_fiscal_year
    return get_fiscal_years(date, fiscal_year, label, verbose, company, as_dict=as_dict)[0]
  File "/home/frappe/benches/bench-version-12-2020-03-19/apps/erpnext/erpnext/accounts/utils.py", line 80, in get_fiscal_years
    raise FiscalYearError(error_msg)
erpnext.accounts.utils.FiscalYearError: Date 20-03-2020 not in any active Fiscal Year.
) will get truncated, as max characters allowed is 140

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-20 13:57:30 +05:30
Deepesh Garg
71e9f23d77 fix: Update is_tree field in Tree doctypes (#20982) 2020-03-19 11:00:55 +05:30
Deepesh Garg
4d954f1a5f Merge pull request #20836 from Thunderbottom/welcome-email-fix-v12
fix: use ERPNext in welcome email when default company is not set
2020-03-16 15:54:09 +05:30
Nabin Hait
e2a31f221a fix: Multiple fixes for travis (#20950) 2020-03-16 15:36:10 +05:30
Marica
2f2cef6c5f fix: ModuleNotFoundError on Turkey Company setup (#20854) 2020-03-09 18:07:55 +05:30
Chinmay D. Pai
12cdf0fb52 fix: use ERPNext in welcome email when default company is not set
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-05 10:11:55 +05:30
Priyanka Gangar
7766530afc fix: fetch sales person name (#20801)
* fix: fetch sales person name

* Update sales_person.js

Co-authored-by: pinka0925 <44537026+pinka0925@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-03-02 19:24:14 +05:30
Shivam Mishra
f08b5e4866 feat: ignore permission when deleting linked emails (#20753) 2020-02-27 19:07:39 +05:30
rohitwaghchaure
ec45c096a0 fix: pricing rule not working on item groups (#20546) 2020-02-09 19:45:42 +05:30
Pranav Nachnekar
3ef80f2d2e fix: disallow quick entry for doctypes with tree view (#20453)
* fix: imporer escaping

* fix: disallow quick entry for doctypes with tree view
2020-02-03 17:05:30 +05:30
NahuelOperto
875bac8bb9 Fix sql injection 2020-01-27 08:58:01 -03:00
Pranav Nachnekar
c2b9598966 fix: imporer escaping (#20329) 2020-01-17 11:45:03 +05:30
Pranav Nachnekar
4479b93c1a fix: escape % in customer name (#20203)
* fix: add new delivery note button in Sales Order

* fix: escape % in customer name

* Update sales_order.js

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-01-09 12:22:11 +05:30
rohitwaghchaure
b7fd9a652d Merge pull request #19929 from 0Pranav/delete-company-txn-query-v12
fix: replace sql with orm query for deleting company communications
2019-12-20 13:48:23 +05:30
0Pranav
03db85f3e7 fix: replace sql query by orm in delete_communications and added tests 2019-12-16 16:54:03 +05:30
deepeshgarg007
6a8ff1bebe fix: Add missing import 2019-12-14 21:31:11 +05:30
Deepesh Garg
72649c207f feat(regional): Auto state wise taxation for GST India (#19877)
* feat(regional): Auto state wise taxation for GST India

* fix: Update gst category on addition of GSTIN

* fix: Codacy and travis fixes

* fix: Travis

* fix(test): Update GST category only if GSTIN field available

* fix: Test Cases

* fix: Do not skip accounts if place of supply is not present

* fix: Auto GST taxation for SEZ Party types

* fix: Automatic taxation for multi state

* fix: Codacy and travis fixes

* fix: Auto GST template selection in Sales Order

* fix: Move inter state check and source state to tax category

* fix: Remove unique check from tax template

* fix: Remove unique check from tax template

* fix: Address fetching logic in Sales

* fix: fecth tax template on company address change

* fix: fetch company gstin on address change

* fix: company_gstin set value fix

* fix: Mutiple fixes and code refactor

* fix: Add missing semicolon

* fix: Company address fetching in sales invoice

* fix: Remove print statement

* fix: Import functools

* fix: Naming fixes and code cleanup

* fix: Update patches

* fix: Remove changes in patches.txt

* fix: Iteritems compatibility for python 3
2019-12-10 15:54:29 +05:30
Saqib
1919af2ff1 Fixed Asset Refactor Review fixes (#19666)
* fix: fixed asset item creation ux fixes

* fix: auto creation of asset ux fixes

* fix: [LCV] incorrect condition when checking assets linked with PR

* fix: bulk update assets

* refac: remove company level cwip enabling
* cwip can be enabled only on category level

* fix: #19649
2019-11-22 16:32:34 +05:30
Ben Knowles
49cd19d917 fix: update syntax error in company.js (#19661) 2019-11-22 11:36:02 +05:30
rohitwaghchaure
a85ddf2fb4 fix: performance issue of sales invoice while save/submit (#19598)
* fix: performace issue of sales invoice while save/submit

* Cached price list data, item group child data, added indexing for blanket order
2019-11-19 18:47:48 +05:30
Joseph Marie Alba
2578d49b84 Correct bug in abbr cause by missing " " separator (#19605)
Only 1 letter ABBR is generated after typing in a COMPANY NAME separated by spaces. This is due to missing " " value in split method.

For example: 

Company Name:    ABC Multiple Industries
Generates Abbr:     A
Correct Abbr should be:  AMI

This is caused by mission " " in split method.
2019-11-19 14:54:09 +05:30
Shivam Mishra
776ff2f75d fix: query for item group listing (#19604) 2019-11-19 14:51:25 +05:30
rohitwaghchaure
94565d69d1 fix: travis failing (#19568) 2019-11-13 18:58:22 +05:30
rohitwaghchaure
ffbfaf7099 fix: email digest showing incorrect upcoming events (#19552) 2019-11-13 10:59:23 +05:30
Marica
d00c59830e feat: Disable CWIP Accounting checkbox added in Company and Asset Category (#19262)
* feat: Disable CWIP Accounting checkbox added in Company and Asset Category

Asset Settings is removed completely
Disable CWIP Accounting checkbox will give priority to Asset Category

* fix: Changed checkbox name to 'Enable Capital Work in Progress Accounting'

- checkbox will be disabled by default
- Enabling it in Company will globally enable it
- When globally disabled , it's value on the asset category will be considered

* chore: Added patch to set pre-existing CWIP checkbox value into new checkbox

* fix(test): Asset

* fix: Asset Test and Patch

* fix(test): Opening Invoice Creation Tool

* Update asset.py

* fix: Patch and other fixes
2019-11-12 19:17:43 +05:30
Tufan Kaynak
06c6f7cfd3 fix: Currency Exchange for_selling and for_buying on the same day (#19339)
* fix: test data of Currency Exchange to incluse buying and selling

test data of Currency Exchange to incluse buying and selling

* fix: Currency Exchange Test corrected to include selling and buying exchange_rate

Currency Exchange Test corrected to include selling and buying exchange_rate

* fix: Currency Exchange for_selling and for_buying fields test and functionality restored


In this fix:
* You can now add a separate exchange_rate in date for_selling and for_buying. You could not before because the unique field name was only calculated to allow a single name for a date
* tests did not account for for_selling and for_buying fields and thier uniqueness

* Update test_currency_exchange.py

* Update test_records.json

* fix: update test_records.json

* Update test_records.json

* The basic package for turkey is defined. It is empty now but applications specific to Turkey will be created under that package.

* fix: update code with scapes vs.tabs

updated the code regarding spaces issue

* Update currency_exchange.py
2019-11-11 17:11:16 +05:30
Rohit Waghchaure
730c8a145d minor: code cleanup 2019-11-05 12:46:52 +05:30
Anurag Mishra
a11e738801 feat: Stock value and account balance sync. (#19233)
* feat: Allow user to sync stock_value and account_balance jv if perpetual inventory is checked

* fix(test): Sales Invoice

* fix(test): Purchase Invoice

* fix(test): Delivery Note

* fix: more test_case

* fix(test): Stock Entry

* fix(test): Purchase Receipt

* fix(more-test): Stock Entries

* fix(more-test): Sales Invoice and Delivery Note

* fix: tests for delivery note

* fix: tests for stock reconciliation

* refactor: stock and account balance function

* fix(more-test): Warehouse

* fix(test): Landed Cost Voucher

* fix: changes requested
2019-10-31 15:55:03 +05:30
Rohit Waghchaure
88d2c97391 fix: default accounts are not added on creation of company 2019-10-28 17:50:31 +05:30
deepeshgarg007
799f8d4f93 Merge branch 'develop' of https://github.com/frappe/erpnext into demo-fixes 2019-10-23 08:47:11 +05:30
Abdulla P I
4f4e490d53 fix(HR):adding is_compensatory as default in setup (#19307) 2019-10-21 13:42:17 +05:30
deepeshgarg007
3db65ef7e8 fix: Demo Script 2019-10-15 19:16:45 +05:30
Rohit Waghchaure
66072fec5a fixed conflicts 2019-10-15 14:18:59 +05:30
ashish-greycube
74dc3c99de feat: coupon_code and referral_sales_partner functionality 2019-10-15 11:44:45 +05:30
Himanshu
2985cffc52 Merge branch 'develop' into global_search_modules 2019-10-02 16:36:19 +05:30
Himanshu
37f4316df0 Update setup_wizard.py 2019-09-30 16:02:24 +05:30
Himanshu
201bcaf2ca fix(Company): Do not set default account if left blank (#19131)
* chore: use dict to set_default_account

* fix: dont override expense account if left empty

* fix: set accounts only if new company

* chore: fix alignment

* fix: test cases
2019-09-30 14:56:08 +05:30
Himanshu Warekar
21abc3aa50 fix: add doctypes for modules 2019-09-30 13:40:02 +05:30
Himanshu
83b0b2adec feat(Global Search): Add fixtures for global search (#19049) 2019-09-27 00:59:48 +05:30