Skip to content

Commit

Permalink
Bumped to v13.12.1 (#32)
Browse files Browse the repository at this point in the history
* fix: Remove redundant description

* fix: Only display 'Role Allowed to Override Stop Action' if 'Maintain Same Rate Throughout Sales Cycle' is checked

* fix: Rename 'Action if Same Rate is Not Maintained' to 'Action if Same Rate is Not Maintained Throughout Sales Cycle'

* fix: Move related fields to the same section

* chore: remove snyk from dev-dependencies (frappe#27425)

* test: basic tests for controllers/queries (bp frappe#27422)

(cherry picked from commit 62fc544)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: fail migration due to None type during v13_0.update_returned_qty_in_pr_dn (frappe#27430)

* fix: fail migration due to None type

* fix: incorrect key: value pair in filter.

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: Template Error due to use of single quote (frappe#27433)

(cherry picked from commit dae0a1c)

* fix(ux): apply proper filtering in stock reports (frappe#27411) (frappe#27443)

* fix(ux): apply proper filtering in stock reports

Stock Balance: apply company filter to warehouse field
Stock Ageing: apply company filter to warehouse field

* fix: unnecessary parens

Co-authored-by: Alan <2.alan.tom@gmail.com>
(cherry picked from commit d743c41)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix(ux): clean invalid fields from variant setting (frappe#27442)

* fix(ux): clean invalid fields from variant setting (frappe#27412)

(cherry picked from commit 6ef879f)

* fix: resolve conflicts

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* Revert "fix: Salary component account filter (frappe#26605)" (frappe#27446)

This reverts commit aaea5ed.

* feat: (get_items_from) filter material request item in purchase order (frappe#24725)

* fix(Payroll): incorrect component amount calculation if dependent on another payment days based component (frappe#27453)

* fix(Payroll): incorrect component amount calculation if dependent on another payment days based component (frappe#27349)

* fix(Payroll): incorrect component amount calculation if dependent on another payment days based component

* fix: set component amount precision at the end

* fix: consider default amount during taxt calculations

* test: component amount dependent on another payment days based component

* fix: test

(cherry picked from commit bab644a)

* fix: conflicts in test file

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* fix: editable price list rate field in sales transactions (frappe#27455) (frappe#27461)

(cherry picked from commit a5baf90)

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>

* feat: Validity dates in Tax Withholding Rates

* fix: Advance TDS test case

* fix: Linting and patch fixes

* test: Update test case

* fix: Debug CI

* fix: Hardcode fiscal year and posting date

* fix: Test Case

* fix: Linting Issues

* fix: employee advance return through multiple additional salaries (frappe#27470)

* fix: employee advance return through multiple additional salaries (frappe#27438)

* fix: employee advance return through multiple additional salaries

* test: test repay unclaimed amount from salary

* fix: sorting in imports

(cherry picked from commit b98740b)

* fix: remove naming rule

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* fix(HR): Ignore invalid fields when updating employee details (frappe#27456) (frappe#27474)

(cherry picked from commit 95460d9)

Co-authored-by: Chillar Anand <chillar@avilpage.com>

* fix: Maintain same rate in Stock Ledger until stock become positive (frappe#27227)

* fix: Maintain same rate in Stock Ledger until stock become positive

* fix: Maintain same rate in Stock Ledger until stock become positive

* fix: Update fiscal year

* Merge pull request frappe#27481 from deepeshgarg007/gstin_filter_issue_v13

fix: GSTR-1 Reports not showing any data

* fix: Rename section break

* Merge pull request frappe#27486 from marination/job-card-excess-transfer-hotfix

fix: Handle Excess/Multiple Item Transfer against Job Card

* chore: sort imports

* Merge pull request frappe#27488 from marination/validate-cart-settings

fix: Args missing error on changing Price List currency with cart enabled

* fix: calculate operating cost based on BOM Quantity (frappe#27464) (frappe#27501)

* fix: calculate operating cost based on BOM Quantity

* fix: added test cases

(cherry picked from commit 2e2985e)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* fix: Patch for updating tax withholding category dates (frappe#27489) (frappe#27495)

(cherry picked from commit c53b78e)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* fix: Tags getting fetched correctly in Get Supplier in RFQ (Request For Quotation) (frappe#27499)

* fix: Tags getting fetched correctly in Get Supplier in RFQ( Request For Quotation ) frappe#26343

* fix: Linting issues

* fix: remove unnecessary caching

[skip ci]

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
Co-authored-by: Ankush Menat <ankush@iwebnotes.in>

* fix: Autoname for customer and supplier (frappe#27505)

* fix: Autoname for customer and supplier (frappe#27398)

(cherry picked from commit 759f2b7)

* fix: Resolve conflicts

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* fix: Values with same account and different account number in consolidated balance sheet report (frappe#27493) (frappe#27504)

(cherry picked from commit 625626b)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* Merge pull request frappe#27508 from marination/shopping-cart-fixes

fix: Shopping Cart and Variant Selection

* feat: provision to add scrap item in job card (frappe#27483) (frappe#27512)

(cherry picked from commit c5a77f6)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* feat: link items to supplier / customer (frappe#27479)

* Merge pull request frappe#27281 from DeeMysterio/party-specific-items

feat: link items to supplier / customer
(cherry picked from commit aa82624)

* fix: resolve conflict

Co-authored-by: DeeMysterio <dikshajadhav11.dj@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: table data deleted on submitted maintenance schedule (bp frappe#27513)

(cherry picked from commit 5e0b215)

Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>

* fix(minor): Remove b2c limit check from CDNR Invoices (frappe#27516)

* fix(minor): Remove b2c limit check from CDNR Invoices

* fix: Remove unnecessary format

* fix: not able to submit stock entry with 350 items (frappe#27523) (frappe#27526)

(cherry picked from commit e6a1ad8)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>

* test: automated test for running all stock reports (frappe#27510) (frappe#27522)

* test: automated test for running all stock reports

These test do not assert correctness, they just check that "execute" function
is working with sane filters.

* test: make report execution test modular

(cherry picked from commit 70c203d)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix(minor): Employee filter in Unpaid Expense Claims report (frappe#27530) (frappe#27531)

(cherry picked from commit 866763c)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* fix(ProdPlan): Get SubAssy Items does not work (bp frappe#27537)

* fix(ProdPlan): Get SubAssy Items does not work

This button wasn't working unless the document was saved already.

* fix: make form dirty when subassy item are fetched

(cherry picked from commit 78fe925)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* Merge pull request frappe#27543 from frappe-pr-bot/backport/version-13-hotfix/27538

fix: Validate if item exists on uploading items in stock reco

* fix: no validation on item defaults (frappe#27549)

* fix: no validation on item defaults (frappe#27393)

* fix: no validation on item defaults

* fix: cache value while validating

* test: item default company relation

* fix: reorder validations

* refactor: add guard conditions on update_defaults

* test: add default warehouse for item group

* fix: validate item defaults for item groups

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
(cherry picked from commit 5eba1cc)

* fix: resolve conflicts

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: Deferred revenue entries post account freezing

* fix: Remove duplicates from customer_code field (bp frappe#27555)

(cherry picked from commit 41f11ec)

Co-authored-by: Marica <maricadsouza221197@gmail.com>

* fix: unecessary keyword args were passed in mapper functions (frappe#27563) (frappe#27565)

(cherry picked from commit e03d9aa)

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>

* fix: unecessary keyword args were passed in mapper functions (frappe#27563) (frappe#27564)

(cherry picked from commit e03d9aa)

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>

* ci: fix docs checker for empty body (frappe#27569)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix(healthcare): Duplicate Contact error on add Patient (frappe#27427)

* fix: duplicate contact error when linking existing Customer to Patient
validation for existing User email and mobile before creating user on Patient update

* test: patient - test contact, user creation

* fix: test_patient_contact clearing contact breaking other tests
sider issues

* fix: use db_set instead of set_value

* fix(test): overlapping appointments

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* fix: PO/PINV -  Check if doctype has company_address field before setting the value (frappe#27441)

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>

* fix: PO/PINV -  Check if doctype has company_address field before setting the value (frappe#27441) (frappe#27575)

Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
(cherry picked from commit 666eaae)

Co-authored-by: vama <vamagithub@gmail.com>

* fix: Handle `is_search_module_loaded` for redis version < 4.0.0 (frappe#27574)

- Return False if error occurs

* fix: Handle `is_search_module_loaded` for redis version < 4.0.0 (frappe#27574) (frappe#27578)

- Return False if error occurs

(cherry picked from commit d6ed6d5)

Co-authored-by: Marica <maricadsouza221197@gmail.com>

* bumped to version 13.11.1

* fix: Test Case

* fix(plaid): query to check if bank account exists (frappe#27595)

* perf: extract loop invariant db calls

(cherry picked from commit 648b2d7)

* fix: warn when overbilling checks are skipped.

(cherry picked from commit 43bf82b)

* refactor: add guard clause in for loop

Reduce overly indented code/improve readability.

(cherry picked from commit 5e4fbba)

* fix(ux): better error message

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
(cherry picked from commit 21a955d)

* fix: Webform Permission for custom doctype (backport frappe#26232) (frappe#27592)

* fix: Webform Permission for custom doctype (frappe#26232)

* fix: Webform Permission for custom doctype

* fix: sider fix

* fix: app check condition for getting correct list_context

* chore: Better naming convention

* test: Added test case to check permission for webform of custom doctype

* chore: linting issue

* chore: linting issue

* fix: sider fix

* test: minor changes

* chore: linter and better naming method

* chore: linter fix

(cherry picked from commit 9aa6f52)

* chore: Resolved Conflicts

Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>

* fix: Set parent_detail_docname to prevent overwriting Packed/Bundle Items on saving (frappe#27571)

* fix: reference row added in allocation table (frappe#27613)

* Update training_result.js (frappe#27615) (frappe#27620)

cur_frm is deprecated

(cherry picked from commit 5c400da)

Co-authored-by: François de Ryckel <f.deryckel@gmail.com>

* feat: Merge POS invoices based on customer group (frappe#27553)

* feat: Merge POS invoices based on customer group (frappe#27471)

* feat: Merge POS invoices based on customer group

* fix: Linting Issues

* fix: fieldname

Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
(cherry picked from commit c9c8957)

* fix: Update patches.txt

* fix: Remove v14 patch

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* fix: (ux) Use subassembly schedule date while making WO from Prod Plan (bp frappe#27628)

- Set subassemply WO's planned start date from Production Plan

(cherry picked from commit 9110223)

Co-authored-by: Marica <maricadsouza221197@gmail.com>

* fix: remove bad default for anniversary reminders (frappe#27632) (frappe#27633)

🤦

(cherry picked from commit c302c7a)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: remove unknown field employee_name from query (frappe#27634)

* fix: remove unknown field employee_name from query

* fix: remove unknown fieldname

Co-authored-by: root <root@vultr.guest>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* feat: add `Partly Paid` status in Invoices (frappe#27636)

(cherry picked from commit c8b9a55)

Co-authored-by: Sagar Vora <sagar@resilient.tech>

* fix: holiday message reminder (frappe#27654)

Minor grammatical change

(cherry picked from commit dafe99b)

Co-authored-by: escix <preminik@preminik.com>

* fix: update default KSA VAT rate for setup (frappe#27614) (frappe#27622)

(cherry picked from commit abded89)

Co-authored-by: Kenneth Sequeira <33246109+kennethsequeira@users.noreply.github.com>

* fix: local variable 'fiscal_year_details' referenced before assignment (frappe#27658)

* fix: setting of gain/loss if party account is in company currency

(cherry picked from commit 64efe8b)

* chore: hide exchange gain loss if empty

(cherry picked from commit dd2d039)

* fix: cost center in exchange gain loss gl entry

(cherry picked from commit 78ad50e)

* patch: invalid gain loss gl entry

(cherry picked from commit beebfb3)

* chore: hide exchange gain loss if empty

(cherry picked from commit e6b4d33)

* fix: unknown column 'ref_exchange_rate'

(cherry picked from commit 18e5d59)

* chore: log modified invoices

(cherry picked from commit 30f59b0)

* fix: indentation

(cherry picked from commit 1f8ad72)

* fix: linting errors

(cherry picked from commit 711395d)

* fix: Tax Breakup table headers fix (frappe#27596) (frappe#27598)

(cherry picked from commit 0ff7367)

Co-authored-by: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>

* fix: Improvements in COA Importer (frappe#27584) (frappe#27587)

(cherry picked from commit f07ff92)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* fix: cannot set custom label for 'total' field in print format (frappe#27667)

* fix(ux): added exception of template item in filters (frappe#27560) (frappe#27675)

(cherry picked from commit 5c249de)

Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>

* fix: set item.qty as mandatory in picklist (frappe#27680) (frappe#27682)

(cherry picked from commit b91333a)

Co-authored-by: Alan <2.alan.tom@gmail.com>

* fix: apply price list after batch or serial no insertion (frappe#27566) (frappe#27683)

(cherry picked from commit 72c081f)

Co-authored-by: Alan <2.alan.tom@gmail.com>

* fix: cannot delete a project if linked with sales order (frappe#27536) (frappe#27689)

* feat(regional): toggle for reduced depreciation rate as per IT Act (frappe#27688)

* fix: Ignore user permission for Represents Company field in Sales and Purchase docs (frappe#27684) (frappe#27695)

* fix: Ignore user permission for Represents Company field in Sales and Purchase docs

* fix: Ignore user permission for fiscal year company

(cherry picked from commit b39f8a6)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* feat: TDS deduction using journal entry and other fixes (frappe#27451) (frappe#27672)

* fix: TDS deduction using journal entry

* fix: Multi category application against single supplier

* refactor: TDS payable monthly report

* fix: Server side handling for default tax withholding category

* fix: Supplier filter for Journal Entry

* refactor: TDS computation summary report

(cherry picked from commit cc5dd5c)

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>

* fix: Test case

* fix: added project name in the purchase order analysis

(cherry picked from commit c1f9997)

* fix: distribution of additional costs in mfg stock entry (frappe#27629) (frappe#27706)

* refactor: remove unnecessary list comprehensions

* fix: correct cost distribution logic

While apportioning costs same condition should be present on both sides
so total value is representative of all items to be apportioned.

Here while calculating incoming_items_cost only FG items are considered,
but while apportioning all items with to_warehouse are considered.

Solution: only apportion additional cost on FG items

* test: test cost distribution

* fix: patch for additional cost

fix(patch): consider PCV while patching

- consider Period closing voucher while patching
- recomute rates for SLE of affected stock entries

consider only FG/scrap item SLEs for recomputation of rates

* fix: remove client side logic for addn cost

All of this is done in python code hence removed client side code.

(cherry picked from commit 4685ed5)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: wrong company selected when marking attendance for all employees (frappe#27685)

* fix: wrong company selected when marking attendance for all employees

* fix: enable caching for repeated queries of the same employee

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* fix(Org Chart): use attribute selectors instead of ID selector for node IDs with special characters (frappe#27717) (frappe#27719)

* fix(Org Chart): use attribute selectors instead of ID selector for node IDs with special chars

* fix: UI tests

(cherry picked from commit 9e08229)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>

* fix: option to limit reposting in certain timeslot (bp frappe#27725)

(cherry picked from commit a04f9c9)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: Creating unique hash for slider id instead of slider name

(cherry picked from commit 3e8e6ac)

* fix: Fixed alignment of Title, Subtitle, Action Button

(cherry picked from commit 0de735f)

* chore: linter fix

(cherry picked from commit 18918e1)

* fix: Chart Of Accounts import button not visible

(cherry picked from commit 3529622)

* fix: Remove unwanted comments

(cherry picked from commit e4b89d2)

* fix: Linting issues

(cherry picked from commit ff570f4)

* fix: Website Items with same Item name unhandled, thumbnails missing

- Use naming series for Website Item. There could be two items with same name and different item code
- Fix: Website Item Page view breaks if cart is disabled
- Fix: thumbnails not created for Website Items after patch
- Fix: ‘Request for Quote’ button & cart summary not visible if checkout is disabled

(cherry picked from commit 36b519c)

* fix: Pre-commit formatting

(cherry picked from commit 77d4849)

* fix(India): Internal transfer check fix

(cherry picked from commit f0af24f)

* fix(asset): expected value after useful life validation (frappe#27787)

* fix: Tax breakup based on items, missing GST fields (frappe#27524)

* fix: Tax breakup based on items

* fix: added gst fields,warehouse validation to pos inv,patch

* fix: tax breakup test fix, eway bill hsn fix

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
(cherry picked from commit d49346a)

* fix: using DN for transfer w/o internal customer (backport frappe#27798) (frappe#27805)

* fix: using DN for transfer w/o internal customer (frappe#27798)

This used to be work before though not "advertised", since a lot of
users have started using it as feature, it can't be broken now.

(cherry picked from commit df1f8fd)

* fix(ux): use toast instead of popup

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* fix: COA Importer showing blank validations

(cherry picked from commit 0660d6e)

* fix: Use get_list instead of get_all to avoid perm issues

(cherry picked from commit 9507b2d)

* fix: ignore random periodicity in validations

(cherry picked from commit 3d3655e)

* fix: removed redundant piece of code (frappe#27817) (frappe#27822)

(cherry picked from commit cec66d2)

Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>

* fix: Update patches.txt

* fix: Update setup.py

* chore: change log for v13_12_0

* bumped to version 13.12.0

* Merge pull request frappe#27715 from frappe/mergify/bp/version-13-hotfix/pr-27668

fix: Batch scans get overwritten on the same row (backport frappe#27668)
(cherry picked from commit 15c9c08)

* fix: Maintenance Schedule child table status for legacy data (frappe#27554)

* fix: Maintenance Schedule child table status for legacy data

* fix: Include legacy draft schedules in patch

* fix: Pre-commit formatting

(cherry picked from commit cc143bc)
(cherry picked from commit 6ce2111)

* fix: Add patch to patches.txt

(cherry picked from commit 7c47f36)

* fix: reload doc in patch

(cherry picked from commit 6b38778)

* fix: remove stale doctypes and add msg for ecommerce refactor (bp frappe#27700)

(cherry picked from commit 6d99bb5)

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>

* bumped to version 13.12.1

* fix: translations

* fix: remove changelog

* feat: translations

* feat: translations

* feat: translations

* fix: remove notification

* fix: dn

* fix: target_warehouse depends_on

* fix: trans

* fix: video translations

* fix

* translations

* fix: trans

* trans

* feat: docs

Co-authored-by: GangaManoj <ganga.manoj98@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
Co-authored-by: Frappe PR Bot <frappe.pr.bot@gmail.com>
Co-authored-by: Devin Slauenwhite <devin.slauenwhite@gmail.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
Co-authored-by: Chillar Anand <chillar@avilpage.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
Co-authored-by: vama <vamagithub@gmail.com>
Co-authored-by: Vama Mehta <vama.mehta@inqubit.in>
Co-authored-by: Ankush Menat <ankush@iwebnotes.in>
Co-authored-by: DeeMysterio <dikshajadhav11.dj@gmail.com>
Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>
Co-authored-by: Anoop <3326959+akurungadam@users.noreply.github.com>
Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>
Co-authored-by: François de Ryckel <f.deryckel@gmail.com>
Co-authored-by: Bhavesh Maheshwari <34086262+bhavesh95863@users.noreply.github.com>
Co-authored-by: root <root@vultr.guest>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: escix <preminik@preminik.com>
Co-authored-by: Kenneth Sequeira <33246109+kennethsequeira@users.noreply.github.com>
Co-authored-by: Subin Tom <36098155+nemesis189@users.noreply.github.com>
Co-authored-by: Alan <2.alan.tom@gmail.com>
Co-authored-by: Mohammed Yusuf Shaikh <49878143+mohammedyusufshaikh@users.noreply.github.com>
Co-authored-by: Shariq Ansari <sharique.rik@gmail.com>
Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com>
  • Loading branch information
1 parent 840e6f2 commit 983d694
Show file tree
Hide file tree
Showing 149 changed files with 2,704 additions and 4,766 deletions.
6 changes: 3 additions & 3 deletions .github/helper/documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def docs_link_exists(body):

if response.ok:
payload = response.json()
title = payload.get("title", "").lower().strip()
head_sha = payload.get("head", {}).get("sha")
body = payload.get("body", "").lower()
title = (payload.get("title") or "").lower().strip()
head_sha = (payload.get("head") or {}).get("sha")
body = (payload.get("body") or "").lower()

if (title.startswith("feat")
and head_sha
Expand Down
8 changes: 0 additions & 8 deletions .snyk

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/integration/test_organizational_chart_desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ context('Organizational Chart', () => {

it('navigates to org chart', () => {
cy.visit('/app');
cy.awesomebar('Organizational Chart');
cy.visit('/app/organizational-chart');
cy.url().should('include', '/organizational-chart');

cy.window().its('frappe.csrf_token').then(csrf_token => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/test_organizational_chart_mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ context('Organizational Chart Mobile', () => {
it('navigates to org chart', () => {
cy.viewport(375, 667);
cy.visit('/app');
cy.awesomebar('Organizational Chart');
cy.visit('/app/organizational-chart');
cy.url().should('include', '/organizational-chart');

cy.window().its('frappe.csrf_token').then(csrf_token => {
Expand Down
2 changes: 1 addition & 1 deletion erpnext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from erpnext.hooks import regional_overrides

__version__ = '13.11.0'
__version__ = '13.12.1'

def get_default_company(user=None):
'''Get default company for user'''
Expand Down
15 changes: 9 additions & 6 deletions erpnext/accounts/deferred_revenue.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,15 @@ def make_gl_entries(doc, credit_account, debit_account, against,
try:
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
frappe.db.commit()
except Exception:
frappe.db.rollback()
traceback = frappe.get_traceback()
frappe.log_error(message=traceback)

frappe.flags.deferred_accounting_error = True
except Exception as e:
if frappe.flags.in_test:
raise e
else:
frappe.db.rollback()
traceback = frappe.get_traceback()
frappe.log_error(message=traceback)

frappe.flags.deferred_accounting_error = True

def send_mail(deferred_process):
title = _("Error while processing deferred accounting for {0}").format(deferred_process)
Expand Down
2 changes: 1 addition & 1 deletion erpnext/accounts/doctype/budget/budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
currency = frappe.get_cached_value('Company', args.company, 'default_currency')

msg = _("{0} Budget for Account {1} against {2} {3} is {4}. It will exceed by {5}").format(
_(action_for), frappe.bold(args.account), args.budget_against_field,
_(action_for), frappe.bold(args.account), _(args.budget_against_field),
frappe.bold(budget_against),
frappe.bold(fmt_money(budget_amount, currency=currency)),
frappe.bold(fmt_money(diff, currency=currency)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ frappe.ui.form.on('Chart of Accounts Importer', {
// make company mandatory
frm.set_df_property('company', 'reqd', frm.doc.company ? 0 : 1);
frm.set_df_property('import_file_section', 'hidden', frm.doc.company ? 0 : 1);
frm.set_df_property('chart_preview', 'hidden',
$(frm.fields_dict['chart_tree'].wrapper).html()!="" ? 0 : 1);

// Show import button when file is successfully attached
if (frm.page && frm.page.show_import_button) {
create_import_button(frm);
if (frm.doc.import_file) {
frappe.run_serially([
() => generate_tree_preview(frm),
() => create_import_button(frm),
() => frm.set_df_property('chart_preview', 'hidden', 0)
]);
}

frm.set_df_property('chart_preview', 'hidden',
$(frm.fields_dict['chart_tree'].wrapper).html()!="" ? 0 : 1);
},

download_template: function(frm) {
Expand All @@ -36,7 +40,7 @@ frappe.ui.form.on('Chart of Accounts Importer', {
fieldname: "template_type",
fieldtype: "Select",
reqd: 1,
options: ["Plantilla de Muestra", "Blank Template"],
options: ["Plantilla de Muestra", __('Blank Template')],
change: () => {
let template_type = d.get_value('template_type');

Expand Down Expand Up @@ -76,9 +80,6 @@ frappe.ui.form.on('Chart of Accounts Importer', {
if (!frm.doc.import_file) {
frm.page.set_indicator("");
$(frm.fields_dict['chart_tree'].wrapper).empty(); // empty wrapper on removing file
} else {
generate_tree_preview(frm);
validate_csv_data(frm);
}
},

Expand All @@ -103,26 +104,9 @@ frappe.ui.form.on('Chart of Accounts Importer', {
}
});

var validate_csv_data = function(frm) {
frappe.call({
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.validate_accounts",
args: {file_name: frm.doc.import_file},
callback: function(r) {
if(r.message && r.message[0]===true) {
frm.page["show_import_button"] = true;
frm.page["total_accounts"] = r.message[1];
frm.trigger("refresh");
} else {
frm.page.set_indicator(__('Resolve error and upload again.'), 'orange');
frappe.throw(__(r.message));
}
}
});
};

var create_import_button = function(frm) {
frm.page.set_primary_action(__("Import"), function () {
frappe.call({
return frappe.call({
method: "erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.import_coa",
args: {
file_name: frm.doc.import_file,
Expand All @@ -131,7 +115,7 @@ var create_import_button = function(frm) {
freeze: true,
freeze_message: __("Creating Accounts..."),
callback: function(r) {
if(!r.exc) {
if (!r.exc) {
clearInterval(frm.page["interval"]);
frm.page.set_indicator(__('Import Successful'), 'blue');
create_reset_button(frm);
Expand All @@ -149,12 +133,33 @@ var create_reset_button = function(frm) {
}).addClass('btn btn-primary');
};

var validate_coa = function(frm) {
if (frm.doc.import_file) {
let parent = __('All Accounts');
return frappe.call({
'method': 'erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.get_coa',
'args': {
file_name: frm.doc.import_file,
parent: parent,
doctype: 'Chart of Accounts Importer',
file_type: frm.doc.file_type,
for_validate: 1
},
callback: function(r) {
if (r.message['show_import_button']) {
frm.page['show_import_button'] = Boolean(r.message['show_import_button']);
}
}
});
}
};

var generate_tree_preview = function(frm) {
let parent = __('All Accounts');
$(frm.fields_dict['chart_tree'].wrapper).empty(); // empty wrapper to load new data

// generate tree structure based on the csv data
new frappe.ui.Tree({
return new frappe.ui.Tree({
parent: $(frm.fields_dict['chart_tree'].wrapper),
label: parent,
expandable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@

class ChartofAccountsImporter(Document):
def validate(self):
validate_accounts(self.import_file)
if self.import_file:
get_coa('Chart of Accounts Importer', 'All Accounts', file_name=self.import_file, for_validate=1)

def validate_columns(data):
if not data:
frappe.throw(_('No data found. Seems like you uploaded a blank file'))

no_of_columns = max([len(d) for d in data])

if no_of_columns > 7:
frappe.throw(_('More columns found than expected. Please compare the uploaded file with standard template'),
title=(_("Wrong Template")))

@frappe.whitelist()
def validate_company(company):
Expand Down Expand Up @@ -56,6 +67,7 @@ def import_coa(file_name, company):
else:
data = generate_data_from_excel(file_doc, extension)

frappe.local.flags.ignore_root_company_validation = True
forest = build_forest(data)
create_charts(company, custom_chart=forest)

Expand Down Expand Up @@ -120,7 +132,7 @@ def generate_data_from_excel(file_doc, extension, as_dict=False):
return data

@frappe.whitelist()
def get_coa(doctype, parent, is_root=False, file_name=None):
def get_coa(doctype, parent, is_root=False, file_name=None, for_validate=0):
''' called by tree view (to fetch node's children) '''

file_doc, extension = get_file(file_name)
Expand All @@ -131,13 +143,21 @@ def get_coa(doctype, parent, is_root=False, file_name=None):
else:
data = generate_data_from_excel(file_doc, extension)

forest = build_forest(data)
accounts = build_tree_from_json("", chart_data=forest) # returns alist of dict in a tree render-able form
validate_columns(data)
validate_accounts(file_doc, extension)

if not for_validate:
forest = build_forest(data)
accounts = build_tree_from_json("", chart_data=forest) # returns a list of dict in a tree render-able form

# filter out to show data for the selected node only
accounts = [d for d in accounts if d['parent_account']==parent]
# filter out to show data for the selected node only
accounts = [d for d in accounts if d['parent_account']==parent]

return accounts
return accounts
else:
return {
'show_import_button': 1
}

def build_forest(data):
'''
Expand Down Expand Up @@ -252,7 +272,7 @@ def get_template(template_type):
writer = UnicodeWriter()
writer.writerow(fields)

if template_type == 'Blank Template':
if template_type == _('Blank Template'):
for root_type in get_root_types():
writer.writerow(['', '', '', 1, '', root_type])

Expand Down Expand Up @@ -294,10 +314,7 @@ def get_sample_template(writer):


@frappe.whitelist()
def validate_accounts(file_name):

file_doc, extension = get_file(file_name)

def validate_accounts(file_doc, extension):
if extension == 'csv':
accounts = generate_data_from_csv(file_doc, as_dict=True)
else:
Expand All @@ -316,15 +333,10 @@ def validate_accounts(file_name):

validate_root(accounts_dict)

validate_account_types(accounts_dict)

return [True, len(accounts)]

def validate_root(accounts):
roots = [accounts[d] for d in accounts if not accounts[d].get('parent_account')]
if len(roots) < 4:
frappe.throw(_("Number of root accounts cannot be less than 4"))

error_messages = []

for account in roots:
Expand All @@ -333,9 +345,19 @@ def validate_root(accounts):
elif account.get("root_type") not in get_root_types() and account.get("account_name"):
error_messages.append(_("Root Type for {0} must be one of the Asset, Liability, Income, Expense and Equity").format(account.get("account_name")))

validate_missing_roots(roots)

if error_messages:
frappe.throw("<br>".join(error_messages))

def validate_missing_roots(roots):
root_types_added = set(d.get('root_type') for d in roots)

missing = list(set(get_root_types()) - root_types_added)

if missing:
frappe.throw(_("Please add Root Account for - {0}").format(' , '.join(missing)))

def get_root_types():
return ('Asset', 'Liability', 'Expense', 'Income', 'Equity')

Expand All @@ -361,23 +383,6 @@ def get_mandatory_account_types():
{'account_type': 'Stock', 'root_type': 'Asset'}
]


def validate_account_types(accounts):
account_types_for_ledger = ["Cost of Goods Sold", "Depreciation", "Fixed Asset", "Payable", "Receivable", "Stock Adjustment"]
account_types = [accounts[d]["account_type"] for d in accounts if not accounts[d]['is_group'] == 1]

missing = list(set(account_types_for_ledger) - set(account_types))
if missing:
frappe.throw(_("Please identify/create Account (Ledger) for type - {0}").format(' , '.join(missing)))

account_types_for_group = ["Bank", "Cash", "Stock"]
# fix logic bug
account_groups = [accounts[d]["account_type"] for d in accounts if accounts[d]['is_group'] == 1]

missing = list(set(account_types_for_group) - set(account_groups))
if missing:
frappe.throw(_("Please identify/create Account (Group) for type - {0}").format(' , '.join(missing)))

def unset_existing_data(company):
linked = frappe.db.sql('''select fieldname from tabDocField
where fieldtype="Link" and options="Account" and parent="Company"''', as_dict=True)
Expand Down
Loading

0 comments on commit 983d694

Please sign in to comment.