Commit Graph

5051 Commits

Author SHA1 Message Date
Ankush Menat
f862339024 fix: use get_all instead of get_list for child tables 2021-11-29 13:04:29 +05:30
Jannat Patel
8cc1dc8079
Merge branch 'develop' into home-onboarding 2021-11-29 10:24:06 +05:30
Ankush Menat
69a17b9e51
refactor: move Bin queries to qb/orm (#28522) 2021-11-27 20:07:02 +05:30
Noah Jacob
7ff30a4b2b
fix: incorrect balance for warehouses (#28583) 2021-11-26 17:33:57 +05:30
Ganga Manoj
a1055d6bd3
Merge branch 'develop' into product-bundle-fixes 2021-11-25 20:00:30 +05:30
Ankush Menat
87f2dcfb59
fix: total stock summary UI glitch #28564
fix: total stock summary UI glitch
2021-11-25 19:38:44 +05:30
Ankush Menat
ed94f0f3f2 refactor: deduplicate during repost background job 2021-11-25 16:37:19 +05:30
Ankush Menat
55631dd0d6 test: item-wh deduplication in reposting 2021-11-25 16:37:19 +05:30
Ankush Menat
0d0e24a5f5 perf: skip unnecessary item-wh reposts
Using basic idea that repost with older posting date will also take care
of subsequent posting dates...

When Item-WH reposts are queued:

1. If another repost with same item-wh but older posting date exists
    then skip current one.
2. If another repost with same item-wh but newer posting date exists
    then skip another one.
2021-11-25 16:37:19 +05:30
Ankush Menat
1d3842f03a fix: dont erase voucher_type and voucher_no for item_wh repost
kept for tracability.
2021-11-25 16:37:19 +05:30
Ankush Menat
a5a8c9104f perf: index for item-sh on repost item valuation
Item-WH based reposting requires querying existing similar repost.
Assuming there is only 1 max extra entry with same params just indexing
item-WH is sufficient to speed up the query.
2021-11-25 16:37:19 +05:30
Ankush Menat
45dd46be3d feat: option to select reposting method
In current implementation selecting Item-Warehouse based reposting is
better for few users, who don't use depenent SLEs but have frequent
transactions involving same items.

This change lets them switch to item-warehouse based reposting if
required.

Only use this if you understand technicalities of stock reposting. This
is experimental but will become mainstream in coming days.
2021-11-25 16:37:19 +05:30
Ankush Menat
a36c249d3d test: item-wh repost creation 2021-11-25 16:37:19 +05:30
GangaManoj
8370042f82 fix: Reset indices in the Packed/Bundle Items table on deleting Product Bundles 2021-11-24 21:06:23 +05:30
Jannat Patel
5b2ba24563 fix: company tour 2021-11-24 19:19:45 +05:30
Saqib
136dd4f801
Merge branch 'develop' into product-bundle-fixes 2021-11-24 11:27:12 +05:30
GangaManoj
0803f87660 fix: Fix Product Bundle price calculation when there are multiple Product Bundles 2021-11-24 06:07:58 +05:30
Ankush Menat
0df9cf9526
chore: remove dead/irrelevant links from workspace (#28519)
* chore: remove dead link to shopify settings

* chore: unlink "debug" reports from stock dashboard
2021-11-23 15:08:51 +05:30
Ankush Menat
c436e30ee6 fix: don't use cached doc while reposting 2021-11-22 12:40:18 +05:30
Ankush Menat
aa024fc9da fix: ignore permissions while creating repost
If user reached this code then they already have permission to create
stock transaction, hence ignore permission checks while
creating/cancelling repost item valuation entries.
2021-11-22 12:40:18 +05:30
Ankush Menat
42f1dd98dd fix: restrict repost valuation to manager roles 2021-11-22 12:40:18 +05:30
marination
23486a929d fix: (style) Warehouse Capacity Dashboard UI
- Made refresh button icon visible
- Edit Capacity button size and alignment
- Medium font on dashboard
2021-11-17 14:21:37 +05:30
Marica
612bb5c749
Merge branch 'develop' into se-required-items-from-jc 2021-11-16 18:03:40 +05:30
Marica
4afcbfdc08
Merge branch 'develop' into pr-return-ux 2021-11-16 15:15:48 +05:30
marination
293f6cbafd fix: Sider, Linter and Server Side Test
- Fix Server side PR test
- linter: re-arrange imports
- sider: avoid single line multi statement
- Code cleanup: Improve code readability and avoid horizontal scroll in test_purchase_receipt
- Removed unused variables in test_purchase_receipt
2021-11-16 14:36:15 +05:30
Ahmed Shareef
952fc87c99
refactor: fix help section background in dark mode (#28406) 2021-11-16 14:30:13 +05:30
Ankush Menat
ed99aca36f test: basic test for serialize reco cancel 2021-11-16 10:00:18 +05:30
Ankush Menat
8c85012a70 fix: can not cancel stock reconciliation with sr no 2021-11-16 10:00:18 +05:30
Rohan
043e3255d6
fix: remove item-item group name validation (#28392) 2021-11-15 19:41:17 +05:30
Ankush Menat
7fcaeca403 fix: don't make naming series mandatory for items
Item variants are an exception, hence this needs to be checked
conditionally.
2021-11-15 18:18:22 +05:30
marination
05ec7cce82 test: Purchase Receipt Received Qty 2021-11-15 17:49:14 +05:30
marination
afe1c45f7f fix: Sider + Fields UX
- remove extra space (sider)
- PR: Bring rejected qty in grid view
- PI: Rename `Stock Qty` to `Accepted Qty in Stock UOM`
- PI: Move `Accepted Qty in Stock UOM` under Stock UOM
2021-11-15 17:17:29 +05:30
Marica
18f9e3558e
Merge branch 'develop' into se-required-items-from-jc 2021-11-11 11:14:37 +05:30
Ankush Menat
12e81df2b7 fix: default value for allow neg stock in repost_item_valuation
Negative stock can be toggled back after queuing transactions, this
causes failure when repost is executed.

Now allow_negative_stock stock is set at time of queuing the repost job.
This means setting changes done afterwards won't affect already
submitted reposts.
2021-11-10 13:05:14 +05:30
Ankush Menat
e498389b00 fix: ignore cancelled entries in incorrect balance qty report 2021-11-10 12:09:51 +05:30
Ankush Menat
fdfa39c231 fix: avoid mutating iterator while iterating over it 2021-11-09 18:04:50 +05:30
Marica
031178224f
Merge branch 'develop' into se-required-items-from-jc 2021-11-09 17:33:20 +05:30
marination
e8d0c25dff fix: Partial Trabsfers against JC
- Fixed transferred qty not back updating on JC if partial transfer
- Partial transfer not mapping pending qty from JC correctly in SE
- tests for above cases
- minor code cleanup
2021-11-09 17:29:29 +05:30
Anupam Kumar
092936d8ba
Merge branch 'develop' into manufacturing-work-order-stop 2021-11-09 10:51:09 +05:30
Anupam
663a7afe4d fix: get_planned_qty chnages 2021-11-09 10:50:38 +05:30
marination
5fb5a757cf refactor: (ux) Accepted/Rejected/Received Qty UX 2021-11-08 13:23:42 +05:30
mergify[bot]
c0b889b94d
fix: auto update price list rate (#28255) (#28256)
* fix: auto update price list rate

* fix: hide field when auto insert isn't enabled

(cherry picked from commit bb3957eba35a5204a1a01e412dee596532bd525e)

Co-authored-by: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com>

[skip ci]
2021-11-07 17:42:51 +05:30
Ankush Menat
8fe5feb6a4 chore: remove all six compat code 2021-11-05 11:16:29 +05:30
Ankush Menat
6098e92ba9 chore: remove utf-8 compat code 2021-11-05 11:16:29 +05:30
mergify[bot]
25f647f067
fix: Bulk update of valid upto field wasn't working (bp #28242)
* fix: Bulk update of valid upto field wasn't working

Check in dates for the price list was failing because valid_upto field was string. Converting to date fixed the problem.

* chore: extend fix and cleanup whitespace

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 95a5ef1d416d54ecf0f557586b341b0dce2a0b05)

Co-authored-by: fatihustaoglu <46131068+fatihustaoglu@users.noreply.github.com>
2021-11-04 21:46:48 +05:30
Marica
51fb543f67
Merge branch 'develop' into se-required-items-from-jc 2021-11-08 18:05:11 +05:30
Noah Jacob
cb064b06ad
fix: added job_card_item link in material request (#28222)
* fix: added job_card_item links in material request

* fix: add no copy to row references
2021-11-03 11:53:57 +00:00
marination
3da03028f3 fix: Pull Items that are in JC in Stock Entry against JC
- Check if items pulled in stock entry are present in Job Card
- Code cleanup and removed redundant checks

Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
2021-11-03 17:05:57 +05:30
marination
48886ee705 chore: Add comment above fix for future reference 2021-11-02 15:57:41 +05:30
marination
048210a8f6 fix: Remove warehouse filter on Batch field for Material Receipt 2021-11-02 15:49:58 +05:30
Ankush Menat
1eab3a44f6 fix(ux): stock levels take time after item merge
Item merge creates a repost and depending on number of entries it can
take from 1 to n hours for it to finish. (depending upon queued up
reposts)

Added message so users don't feel confused till this operation is
finished.
2021-11-01 15:32:59 +05:30
Ankush Menat
f7ffe04a4b fix: use warehouse to find company 2021-11-01 14:13:56 +05:30
Ankush Menat
a0727b2e82 fix: pass company while fetching valuation rate
If company is not supplied and valuation rate is 0, then default
company is used for checking if perpetual inventory is enabled or not.
This makes little sense as different companies can have different
setting for perpetual inventory.
2021-11-01 14:13:56 +05:30
Ankush Menat
ff9cfe0d14 fix: sort by creation to break tie 2021-10-29 16:56:15 +05:30
Ankush Menat
f4b60a48f5 refactor: simplify sr no fetching 2021-10-29 16:56:15 +05:30
Ankush Menat
2aa019ae4c fix: fetch serial nos from ledger unconditionally 2021-10-29 16:56:15 +05:30
Noah Jacob
deb6b38fab refactor: replaced db.sql with qb 2021-10-29 16:56:15 +05:30
Noah Jacob
b44945380d fix: incorrect amount of serial_nos fetched 2021-10-29 16:56:15 +05:30
Ankush Menat
b01635e1da
refactor!: remove hub #28117
refactor!: remove hub
2021-10-28 14:07:15 +05:30
Ankush Menat
5902762ec8 fix(ux): alternative item two way validation 2021-10-27 19:46:06 +05:30
Saqib
879a1fca76
perf(minor): improve sales invoice submission (#27916)
* perf: skip get_pricing_rules if no pricing rule exists

* perf: fetch mode of payments data in single query

* perf: get total company stock only for purchase order

* perf: skip insertion of stock ledger entry

* fix: undo changes to allow negative stock flag

* fix: sider

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-27 11:42:50 +05:30
Ankush Menat
479ecb8de0 test: picklist item grouping 2021-10-27 11:10:52 +05:30
Ankush Menat
6942900555 refactor: use defaultdict and enumeration 2021-10-27 11:10:52 +05:30
Diksha Jadhav
f2d136e574 feat(pick list): group items based on item code and warehouse before printing picklist 2021-10-27 11:10:52 +05:30
Noah Jacob
fdaf93f76c
refactor: shows opening balance from filtered from_date (#26877)
* refactor: shows opening balance from filtered from_date

* refactor: opening balance considered from filtered from_date in stock ledger

* fix: check if stock reco is opening and misc cleanups
2021-10-23 21:04:42 +05:30
Alan
2849297471
refactor: move process loss report to manufacturing (#28043)
* refactor: move process loss report to manufacturing

* test: fix process loss report test

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-21 11:07:47 +05:30
Ankush Menat
da3635b94f test: execute manufacturing reports 2021-10-20 20:35:11 +05:30
Ankush Menat
126ba16740 fix: remove debug from query 2021-10-20 20:35:11 +05:30
marination
a9341672cf test: Include serial no with spaces in it in sanitation test 2021-10-14 19:49:13 +05:30
Shariq Ansari
790c1cda6f
fix: Removing unused fields from workspace JSON files #27612
fix: Removing unused fields from workspace JSON files
2021-10-13 16:18:20 +05:30
Ankush Menat
4ebae7c5dc
Merge branch 'develop' into optimize-get-item-details 2021-10-12 20:39:49 +05:30
Ankush Menat
7bafa11d57
fix: undo changes to allow negative stock flag 2021-10-12 20:39:10 +05:30
Deepesh Garg
6f107da165
perf: Add indexes in stock queries and speed up bin updation #27758
perf: Add indexes in stock queries and speed up bin updation
2021-10-12 20:15:55 +05:30
Ankush Menat
8d69ec72a6 fix: remove transaction commit from tests 2021-10-12 16:17:15 +05:30
Ankush Menat
acdb26a4bb refactor: rollback after full test 2021-10-12 16:17:15 +05:30
Ankush Menat
06fa35a9c1 test: add custom TestCase class and use in stock 2021-10-12 16:17:15 +05:30
Saqib Ansari
c7fc609236 perf: skip insertion of stock ledger entry 2021-10-12 13:30:40 +05:30
Saqib Ansari
eb3aae870f perf: get total company stock only for purchase order 2021-10-12 13:29:32 +05:30
Noah Jacob
4bbe434d43
Merge pull request #27800 from noahjacob/buy_on
refactor: updated buying onboarding tours.
2021-10-11 15:33:58 +05:30
Ankush Menat
6019f60d0a
fix(perf): index creation on voucher_detail_no (#27866)
voucher_detail_no is supposed to have an index, it was added on
on_doctype_update function of table, however this function is only
called if DocType itself is updated and `on_update` is called on
DocType. Stock ledger Entry doctype hasn't changed since addition of
this index in function.

Before: Lack of this index was causing full table scan in
get_future_sle_to_fix function. (~50 seconds in a reposting job)

After: Single row is fetched (~0.5 second in full reposting job)

Learnings:
1. Add simple indexes via doctype only
2. For complex indexes always change doctype.json file for it to take
   effect.
2021-10-08 16:12:15 +05:30
Deepesh Garg
fabbf68e0e
Merge pull request #27872 from 18alantom/fix-make-billing-address-not-read-only
fix: remove readonly from billing address
2021-10-08 15:07:15 +05:30
18alantom
41fefa356f fix: remove readonly from billing address 2021-10-08 14:31:13 +05:30
Chillar Anand
772d4753e7
refactor: Clean up mutable defaults and add CI check (#27828)
* refactor: Clean up mutable defaults and add CI check
2021-10-06 16:58:48 +00:00
Alan
d4b2471cea
fix: use ceil in case of whole uoms for reorder qty (#27834)
* fix: use ceil in case of whole uoms for reorder qty

* fix: cache uom query
2021-10-06 18:16:33 +05:30
mergify[bot]
233bf5dd29
fix: using DN for transfer w/o internal customer (backport #27798) (backport #27805) (#27807)
* fix: using DN for transfer w/o internal customer (backport #27798) (#27805)

* fix: using DN for transfer w/o internal customer (#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 df1f8fddf6e2f4106c1a2778614ba9a1dc5ff67e)

* fix(ux): use toast instead of popup

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

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py

* fix: resolve conflict

* fix: resolve conflicts

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-05 16:16:21 +05:30
Noah Jacob
3132dcd94a
fix: batch_no not mapped from PR to Stock Entry (#27794) 2021-10-05 14:40:40 +05:30
Noah Jacob
f5e0cad6a1 refactor: updated onboarding cards and tours 2021-10-05 13:24:22 +05:30
Alan
7da777880b
fix: add (uom, brand) Item details in an Item Price (#27561)
* fix: add (uom, brand) and update (uom) Item details in an Item Price

* fix: order of query interpolation args

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

* fix: named interpolation, remove item price

* fix: sql error

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-05 12:35:23 +05:30
Alan
5c372202d5
fix: set item uom as stock_uom if it isn't set (#27623)
* fix: set item uom as stock_uom if it isn't set
2021-10-04 22:38:04 +05:30
Ankush Menat
a04f9c904e
fix: option to limit reposting in certain timeslot (#27725) 2021-10-01 13:05:36 +05:30
Ankush Menat
4685ed5a8c
fix: distribution of additional costs in mfg stock entry (#27629)
* 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.
2021-09-30 09:58:59 +05:30
Deepesh Garg
b39f8a6215
fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684)
* fix: Ignore user permission for Represents Company field in Sales and Purchase docs

* fix: Ignore user permission for fiscal year company
2021-09-29 15:54:35 +05:30
Alan
b91333afdd
fix: set item.qty as mandatory in picklist (#27680) 2021-09-28 06:41:37 +00:00
rohitwaghchaure
bf2a590332
fix: View Stock / Accounting Ledger button not showing in the stock entry (#27570) 2021-09-17 18:39:21 +05:30
Saqib
e03d9aa889
fix: unecessary keyword args were passed in mapper functions (#27563) 2021-09-17 13:03:27 +05:30
Marica
41f11eca72
fix: Remove duplicates from customer_code field (#27555) 2021-09-17 10:27:29 +05:30
Saqib
5eba1ccd51
fix: no validation on item defaults (#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>
2021-09-16 17:31:37 +05:30
Marica
9b388883d3
fix: Validate if item exists on uploading items in stock reco (#27538)
* fix: Validate if item exists on uploading items in stock reco

- Uploading non existent item in stock reco and then changing warehouse or batch gave an error
- Check for non existent item

* chore: translation

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2021-09-16 15:47:17 +05:30
rohitwaghchaure
e6a1ad8016
fix: not able to submit stock entry with 350 items (#27523) 2021-09-15 20:42:47 +05:30
Ankush Menat
70c203d19e
test: automated test for running all stock reports (#27510)
* 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
2021-09-15 19:24:35 +05:30