marination
6bde1bb5d2
test: Util to update cost in all BOMs
...
- Utility to update cost in all BOMs without cron jobs or background jobs (run immediately)
- Re-use util wherever all bom costs are to be updated
- Skip explicit commits if in test
- Specify company in test records (dirty data sometimes, company wh mismatch)
- Skip background jobs queueing if in test
2022-06-07 14:44:00 +05:30
marination
15101190a6
chore: get_valuation_rate
in bom.py must always return float & goto Item master if no bins
2022-06-06 17:54:13 +05:30
marination
934db57fdd
chore: Miscellanous fixes/enhancements
...
- `get_valuation_rate`: if no bins are found return 0, SLEs do not exist either
- `get_valuation_rate`: Compute average valuation rate via query
- `get_rm_rate_map`: set order_by as None to avoid creating sort index (modified) each time query runs (seen in process list)
- BOM Update Batch: add status field and hide `boms_updated` so that users can see progress without loading all updated boms (too much data)
- BOM Update Batch: set batch row status to completed after job runs
- BOM Update Log: remove `parent_boms` field (just pass parent boms to processing function) & remove Paused state (not used)
- Move job to long queue to avoid choking default queue
- `update_cost_in_boms`: use `get_doc` as each BOM is accessed only once. Use `for_update` to lock BOM row
- Commit after every 100 BOMs
2022-06-06 17:01:51 +05:30
marination
62857e3e08
feat: Track progress in Log Batch/Job wise
...
- This was done due to stale reads while the background jobs tried updating status of the log
- Added a table where all bom jobs within log will be tracked with what level they are processing
- Cron job will check if table jobs are all processed every 5 mins
- If yes, it will prepare parents and call `process_boms_cost_level_wise` to start next level
- If pending jobs, do nothing
- Current BOM Level is being tracked that helps adding rows to the table
- Individual bom cost jobs (that are queued) will process and update boms > will update BOM Update Batch table row with list of updated BOMs
2022-06-02 13:35:30 +05:30
marination
a62bc9b6c9
chore: Limit Update Cost jobs & db_update
only if changed values
...
- If `Update Cost` job is ongoing, then block creation of new ones since all BOMs are updated
- `db_update` in `calculate_rm_cost` only if changed values to reduce redundant row updates
- Misc: Use variable for batch size
2022-05-31 16:00:29 +05:30
marination
978ba5238f
fix: Safe cast row.rate
(in case of faulty exploded items, edge case but oh well)
2022-05-27 21:59:59 +05:30
marination
2de2491e17
perf: get_next_higher_level_boms
...
- Separate getting dependants and checking if they are valid (loop within loop led to redundant processing that slowed down function)
- Adding to above, the same dependant(parent) was repeatedly processed as many children shared it. Expensive.
- Use a parent-child map similar to child-parent map to check if all children are resolved
- `map.get()` reduced time: 10 mins -> 0.9s~1 second (as compared to `get_cached_doc` or query)
- Total time: 17 seconds to process 6599 leaf boms and 4.2L parent boms
- Previous Total time: >10 mins (I terminated it due to not wanting to waste time XD)
2022-05-27 20:33:14 +05:30
marination
5949946265
chore: Change BOM Progress field types to Long Text
2022-05-27 17:04:21 +05:30
marination
eabd8290d4
feat: Only update exploded items rate and amount
...
- Generate RM-Rate map from Items table (will include subassembly items with rate)
- Function to reset exploded item rate from above map
- `db_update` exploded item rate only if rate is changed
- Via Update Cost, only update exploded items rate, do not regenerate table again
- Exploded Items are regenerated on Save and Replace BOM job
- `calculate_exploded_cost` is run only via non doc events (Update Cost button, Update BOMs Cost Job)
2022-05-27 14:32:58 +05:30
marination
9f5f18e94d
style: Update docstrings and fix/add type hints + Collapsible progress section in Log
2022-05-25 11:22:13 +05:30
marination
ab2d95a74d
feat: Level-wise BOM cost updation
...
- Process BOMs level wise and Pause after level is complete
- Cron job will resume Paused jobs, which will again process the new level and pause at the end
- This will go on until all BOMs are updated
- Added Progress section with fields to track updated BOMs in Log
- Cleanup: Add BOM Updation utils file to contain helper functions/sub-functions
- Cleanup: BOM Update Log file will only contain functions that are in direct context of the Log
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
2022-05-25 11:21:01 +05:30
marination
90d4dc0cd6
fix: test_work_order_with_non_stock_item
...
- Use the right price list and currency to avoid rate conversion (1000/62.9), since rates are reset correctly now
- Use RM rate based on Price List in BOM. Non stock item has no valuation
2022-05-20 03:12:42 +05:30
marination
dd99c00eb6
fix: Get fresh RM rate in calculate_rm_cost
2022-05-19 21:48:24 +05:30
marination
9a7e9d902d
perf: Use cached doc instead of get_doc
...
- Doc is only used to iterate over items(which wont change) and change rate/amount of rows
- These changes are inserted in db via `db_update`, so no harm
- Tested locally: refetching cached doc after db update, reflects fresh data.
2022-05-19 21:24:31 +05:30
marination
9dc3083088
fix: Call calculate_cost
for Draft BOM and typo in argument
2022-05-19 20:33:48 +05:30
marination
5932e9d78a
fix: DB update child items, remove redundancy, fix perf
...
- Move `get_boms_in_bottom_up_order` in bom update tool’s file
- Remove repeated rm cost update from `update_cost`. `calculate_cost` handles RM cost update
- db_update children in `calculate_cost` optionally
- Don’t call `update_exploded_items` and regenerate exploded items in `update_cost`. They will stay the same (except cost)
2022-05-19 20:22:13 +05:30
marination
b6e46eea80
perf: get_boms_in_bottom_up_order
...
- Create child-parent map once and fetch value from child key to get parents
- Get parents recursively for a leaf node (get all ancestors)
- Approx. 44 secs for 4lakh 70k boms
2022-05-18 13:00:00 +05:30
Ankush Menat
6d6616dbcd
fix: always update item_name for stock entry ( #31068 )
...
If item_name is already set and for some reason becomes outdated then
it's not updated in backend.
Fix: always set item_name and stock_uom when fetching item details
2022-05-19 14:25:47 +05:30
Ankush Menat
1de6b14d15
fix: remove "scrap %" field ( #31069 )
...
This does nothing, there's scrap items table below that's actually used
for specifying scrap.
2022-05-19 14:25:16 +05:30
Saqib Ansari
9fb7b49b43
fix(india): error while parsing e-invoice ( #31053 )
2022-05-18 11:53:00 +05:30
maharshivpatel
65d55ea8fa
fix(india): eway bill cancel api is disabled ( #31055 )
2022-05-18 11:52:31 +05:30
Rucha Mahabal
28fe4f3d54
fix: unlink Attendance from Employee Checkins on cancellation ( #31045 )
2022-05-17 12:07:58 +05:30
Deepak
867f2c6282
fix: TypeError in add_indicator_for_multicompany ( #31042 )
...
Minor fix in add_indicator_for_multicompany
In case of multi-company transactions add (+) buttons in connection dashboard pf customer aren't being loaded due to TypeError (TypeError: e.dashboard.stats_area.removeClass is not a function) created by "frm.dashboard.stats_area.removeClass('hidden');" during the stats section creation.
2022-05-17 11:52:52 +05:30
Saqib Ansari
f915a9cef7
fix: discount ledger entry in case of multicurrency invoice ( #31024 )
2022-05-17 11:22:01 +05:30
Ankush Menat
3714e36b44
fix: disable pricing rules for internal transfers ( #31034 )
...
* fix: disable pricing rules for internal transfers
* fix: only apply validation on internal transfers
Co-authored-by: Marica <maricadsouza221197@gmail.com>
* fix: internal_party_field undefined
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2022-05-16 18:09:14 +05:30
Marica
06c036f49f
Merge pull request #30834 from ankush/transfer_precision
...
fix: precision loss when transferring
2022-05-16 16:00:06 +05:30
Ankush Menat
c3bfc395b7
chore: disable flaky test
2022-05-16 15:50:04 +05:30
Rucha Mahabal
1b7ce9649b
fix: IN time not captured in Attendance through Employee Checkin ( #31029 )
2022-05-16 15:45:00 +05:30
Vladislav
af1eab5d54
fix(translations): Update ru translations ( #30992 )
...
* fix incorrect translation
* Update ru.csv
* Update ru.csv
* Update erpnext/translations/ru.csv
Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2022-05-16 15:18:33 +05:30
Marica
eba1c89ba9
Merge pull request #31026 from ankush/item_attr_limit
...
fix: remove item attribute limit from variant selector
2022-05-16 14:10:11 +05:30
Marica
e3d53413d1
Merge pull request #31025 from ankush/hide_variants_order
...
fix: hide template items from sales/purchase order
2022-05-16 13:59:57 +05:30
Devin Slauenwhite
d76e1b7576
feat: barcode scanner promise to return scanned row. ( #31018 )
...
* feat: barcode scanner promise to return scanned row.
* fix: missing reject at alternate code path
2022-05-16 13:14:26 +05:30
Ankush Menat
6bd1cb9235
fix: remove item attribute limit from variant selector
2022-05-16 12:28:52 +05:30
Ankush Menat
0e875f5049
fix: hide template items from sales/purchase order
2022-05-16 12:14:07 +05:30
Deepesh Garg
a412d2f7e8
Merge pull request #31019 from frappe/mergify/bp/develop/pr-30978
...
fix: Multiple fixes in GST reporting (backport #30978 )
2022-05-16 11:54:17 +05:30
Ankush Menat
80d959c579
fix: dont fail repost for recoverable errors ( #30979 )
...
recoverable erros:
1. timeout
2. lock/deadlocks
2022-05-16 11:23:35 +05:30
Deepesh Garg
b2d24e2f93
chore: Linting issues
2022-05-16 10:40:55 +05:30
Deepesh Garg
8221852c38
Merge pull request #31010 from abhinavxd/fix-miniscule-penalty
...
fix: GL entry validation for minuscule loan penalty
2022-05-15 20:50:50 +05:30
Deepesh Garg
34de20f6ee
Merge pull request #30987 from ankush/internal_transfer_with_margin
...
fix: prevent bypassing forced valuation rate
2022-05-15 20:49:55 +05:30
Deepesh Garg
f83e32ab64
chore: resolve conflicts
2022-05-15 20:43:47 +05:30
Deepesh Garg
9b6197ec4a
chore: resolve conflicts
2022-05-15 20:42:34 +05:30
Deepesh Garg
03b133520b
chore: Remove unintended changes
...
(cherry picked from commit 5b02b5b3cd98a20a5a07dd83280acd548998ebf0)
# Conflicts:
# erpnext/__init__.py
2022-05-15 15:04:23 +00:00
Deepesh Garg
4ca7a3de4e
fix: Just add one rate in GST HSN Code
...
(cherry picked from commit ed76687dac52b81df2b9a415b8ce88c648da1446)
2022-05-15 15:04:22 +00:00
Deepesh Garg
481752134f
fix: Add validation for SEZ and Export invoices without payment of taxes
...
(cherry picked from commit cb8453dac8c38aed201f84c51f27ae217cc1f465)
2022-05-15 15:04:21 +00:00
Deepesh Garg
5ac4bf9750
chore: Linting Issues
...
(cherry picked from commit 8af30bcc160c335f2d0898e52af85fd7673ba903)
2022-05-15 15:04:20 +00:00
Deepesh Garg
edb3ef7222
fix: UOM in HSN-wise summary of outward supply
...
(cherry picked from commit cd7d5cdb2201b904bcf5ccfdcb1c4f29cd7e1369)
2022-05-15 15:04:19 +00:00
Frappe PR Bot
c1f47d36cf
chore(release): Bumped to Version 13.29.0
...
# [13.29.0](https://github.com/frappe/erpnext/compare/v13.28.0...v13.29.0 ) (2022-05-10)
### Bug Fixes
* Consider paryt and party type as well in group by consolidated view ([189fc89](189fc89e2d
))
* disable form save on naming series tool ([#30909 ](https://github.com/frappe/erpnext/issues/30909 )) ([#30910 ](https://github.com/frappe/erpnext/issues/30910 )) ([d60a6cb](d60a6cb2f8
))
* double future qty updates ([0db3013](0db3013c9b
))
* HSN-wise-summary of outward supplies Updated Report ([3637525](363752510e
))
* Ignore loan repayments made from salary slip ([b7e1d40](b7e1d40e43
))
* **india:** invoice type for a debit note e-invoice ([#30948 ](https://github.com/frappe/erpnext/issues/30948 )) ([c46add3](c46add3760
))
* **india:** keyerror while generating e-way bill from an e-invoice ([#30879 ](https://github.com/frappe/erpnext/issues/30879 )) ([98d799e](98d799e7cc
))
* **india:** re-arrange e-way bill dialog fields ([#30941 ](https://github.com/frappe/erpnext/issues/30941 )) ([7ce5c93](7ce5c93f44
))
* Item Alternative Test ([964de1f](964de1fc69
))
* patch for renaming membership settings ([#30929 ](https://github.com/frappe/erpnext/issues/30929 )) ([9189653](9189653f2e
))
* **pos:** creating pos returns resets pricing rules & discounts ([#30936 ](https://github.com/frappe/erpnext/issues/30936 )) ([a0e39db](a0e39db200
))
* remove check for already allocated earned leaves ([#30931 ](https://github.com/frappe/erpnext/issues/30931 )) ([#30932 ](https://github.com/frappe/erpnext/issues/30932 )) ([80f7d66](80f7d66255
))
* Remove commit from stock entry test. The assertion is not important ([c449b35](c449b35cc1
))
* Set available-for-use date if missing ([#30838 ](https://github.com/frappe/erpnext/issues/30838 )) ([bf2eaec](bf2eaecb1d
))
* show group warehouse in Sales Order ([#30891 ](https://github.com/frappe/erpnext/issues/30891 )) ([#30893 ](https://github.com/frappe/erpnext/issues/30893 )) ([c458e14](c458e14e68
))
* Show linked time sheets in sales invoice dashboard ([4f4af52](4f4af523e0
))
* sort before picking next stock reco ([e27fb58](e27fb58130
))
* subtract change_amount from paid_amount field on POS Register ([#30937 ](https://github.com/frappe/erpnext/issues/30937 )) ([b7e873b](b7e873b55d
))
* Unlink and delete batch created from stock reco on cancel ([fc35323](fc35323106
))
* Wrap SLE actual_qty in `flt` to avoid NoneType operation ([d53228b](d53228b153
))
### Features
* **HR:** Leave Type configuration to allow over allocation (backport [#30940 ](https://github.com/frappe/erpnext/issues/30940 )) ([#30944 ](https://github.com/frappe/erpnext/issues/30944 )) ([64440fc](64440fc4fb
))
* **india:** cancel e-way bill is enabled with e-invoicing APIs. ([#30924 ](https://github.com/frappe/erpnext/issues/30924 )) ([4ef2ffd](4ef2ffd14c
))
* **india:** generate qrcode button for e-invoice ([#30946 ](https://github.com/frappe/erpnext/issues/30946 )) ([7bd5b2b](7bd5b2ba29
))
* **india:** store e-way bill auto calculated distance in sales invoice ([#30923 ](https://github.com/frappe/erpnext/issues/30923 )) ([b96f156](b96f1565c5
))
(cherry picked from commit 7369db59aacfeecac086930f2a6b373973db7a0c)
# Conflicts:
# erpnext/__init__.py
2022-05-15 15:04:18 +00:00
Frappe PR Bot
b3964ee35b
chore(release): Bumped to Version 13.28.0
...
# [13.28.0](https://github.com/frappe/erpnext/compare/v13.27.1...v13.28.0 ) (2022-05-03)
### Bug Fixes
* Consistent accounting dimensions across Sales and Purchase docs ([5df5058](5df50588cf
))
* convert default_item_manufacturer to link field ([#30835 ](https://github.com/frappe/erpnext/issues/30835 )) ([#30866 ](https://github.com/frappe/erpnext/issues/30866 )) ([37fad7e](37fad7e04c
))
* Cost center filter on payment reconciliation ([22e7f03](22e7f03a03
))
* filters not working in Shift Assignment Calendar view ([#30822 ](https://github.com/frappe/erpnext/issues/30822 )) ([3cdbb65](3cdbb65b5a
))
* Ignore custom field validation while setup ([ee54bf7](ee54bf7fe2
))
* **india:** e-invoice generation for registered composition gst category type ([#30814 ](https://github.com/frappe/erpnext/issues/30814 )) ([#30877 ](https://github.com/frappe/erpnext/issues/30877 )) ([246869d](246869dd28
))
* Multi currency opening invoices ([2e62d51](2e62d518e8
))
* payment days calculation for employees joining/leaving mid-month ([#30863 ](https://github.com/frappe/erpnext/issues/30863 )) ([#30883 ](https://github.com/frappe/erpnext/issues/30883 )) ([a1b0813](a1b0813966
))
* Period Closing Voucher is considering GL entries with is_cancelled=1 ([#30865 ](https://github.com/frappe/erpnext/issues/30865 )) ([5a5b49b](5a5b49b61a
))
* **pos:** number pad translations ([b01f855](b01f8555e5
))
* **pos:** search field doesn't reset on checkout ([edbf551](edbf5513da
))
* Supply type for overseas invoices with payment of tax ([fdcc591](fdcc591a5e
))
* supply type for sez invoices with payment of tax ([cf08710](cf087103cb
))
* Use `account_type == 'Stock'` to filter stock accounts ([93482f3](93482f3302
))
* **UX:** misleading stock entry lables ([#30870 ](https://github.com/frappe/erpnext/issues/30870 )) ([#30871 ](https://github.com/frappe/erpnext/issues/30871 )) ([57b03f0](57b03f0bf2
))
* **UX:** record reason for skipping attendance or marking absent for auto attendance ([#30846 ](https://github.com/frappe/erpnext/issues/30846 )) ([f7bf4a3](f7bf4a3e62
))
* Vat Audit report fixes ([d5319a4](d5319a4826
))
### Features
* Copy task color from project template (backport [#30857 ](https://github.com/frappe/erpnext/issues/30857 )) ([#30859 ](https://github.com/frappe/erpnext/issues/30859 )) ([7ee18e8](7ee18e86a2
))
* support product bundles in picklist (backport [#30762 ](https://github.com/frappe/erpnext/issues/30762 )) ([#30826 ](https://github.com/frappe/erpnext/issues/30826 )) ([645ee2d](645ee2d822
))
(cherry picked from commit 8cc2ea0ddbefb6722247a39a6568d65d4cf4cf5c)
# Conflicts:
# erpnext/__init__.py
2022-05-15 15:04:17 +00:00
Frappe PR Bot
e66aab77cb
chore(release): Bumped to Version 13.27.1
...
## [13.27.1](https://github.com/frappe/erpnext/compare/v13.27.0...v13.27.1 ) (2022-04-26)
### Bug Fixes
* Add accounting dimensions for round off GL Entry ([dedb90e](dedb90ea72
))
* batch_no filtering not working when batch no is also a number in scientific notation ([#30770 ](https://github.com/frappe/erpnext/issues/30770 )) ([#30771 ](https://github.com/frappe/erpnext/issues/30771 )) ([c339305](c339305e9c
))
* Check if accounting dimension exists ([1834671](1834671d59
))
* dependent gle reposting (backport [#30726 ](https://github.com/frappe/erpnext/issues/30726 )) ([#30772 ](https://github.com/frappe/erpnext/issues/30772 )) ([a6d0938](a6d0938591
))
* Do not validate while creating accounting dimension ([153b41a](153b41a269
))
* e_commerce_settings.js ([3a5f5d5](3a5f5d5cd0
))
* e_commerce_settings.py ([86c5f4d](86c5f4db85
))
* First preference to parent cost center rather than round off cost center ([a2d95fc](a2d95fc62b
))
* Handle Multiselect field mapping separately ([dc2f694](dc2f694547
))
* **india:** 401 & 403 client error while generating IRN ([198bdcf](198bdcfdc6
))
* **india:** cess value not considered while validating e-invoice totals ([#30800 ](https://github.com/frappe/erpnext/issues/30800 )) ([f70fca1](f70fca1c9e
))
* **india:** transporter name is null while generating e-way bill ([#30736 ](https://github.com/frappe/erpnext/issues/30736 )) ([6291b28](6291b28c37
))
* linter ([6dddbb9](6dddbb9f27
))
* Loan doctypes in bank reconciliation ([e69c715](e69c71576d
))
* Mistyped variable name in patch ([e76220e](e76220e819
))
* monthly attendance sheet ([#30748 ](https://github.com/frappe/erpnext/issues/30748 )) ([0b4e3f1](0b4e3f1467
))
* Must not be able to start Job Card if it is related to Work Order that is not started yet ([#29072 ](https://github.com/frappe/erpnext/issues/29072 )) ([#30755 ](https://github.com/frappe/erpnext/issues/30755 )) ([b656ffa](b656ffa45e
))
* Query filter fields from Website Item instead of Item master ([bed9e09](bed9e09153
))
* select doctype as payment_document ([44f0b69](44f0b69152
))
* **Selling,E-Commerce:** Shopping cart quotation without website item. ([#29085 ](https://github.com/frappe/erpnext/issues/29085 )) ([ea0fe5e](ea0fe5e10c
))
* SO analysis rpt will fetch SO's without Delivery note as well ([f9d89c7
](f9d89c7ce6
))
* translation ([#30781 ](https://github.com/frappe/erpnext/issues/30781 )) ([#30783 ](https://github.com/frappe/erpnext/issues/30783 )) ([8335ca6](8335ca6331
))
* Update token to allow updates on protected branch ([baab379](baab3797ca
))
* update translation ([#30725 ](https://github.com/frappe/erpnext/issues/30725 )) ([#30776 ](https://github.com/frappe/erpnext/issues/30776 )) ([b585262](b585262842
))
* Use parent cost center for Sales and Purchase Invoice ([fe9f329](fe9f32946c
))
* Use right precision for asset value after full schedule ([#30745 ](https://github.com/frappe/erpnext/issues/30745 )) ([269e192](269e1923c9
))
* Validate field filter wrt to Website Item & re-use validation in Item Group ([34437a8](34437a83df
))
(cherry picked from commit 096dcf0e54dcaed5bf6fd9050e7da565e08fd440)
# Conflicts:
# erpnext/__init__.py
2022-05-15 15:04:17 +00:00
Deepesh Garg
c6b98d8de9
fix: Multiple fixes in GSTR-1 report
...
(cherry picked from commit f2cbb703252564149620a26d6f52800b18c53632)
# Conflicts:
# erpnext/regional/report/gstr_1/gstr_1.py
2022-05-15 15:04:16 +00:00