Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reset represents company on disabling internal customer and supplier #31302

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

deepeshgarg007
Copy link
Member

The Represents Company field is dependent on the is_internal_customer and is_internal_suppliers fields in Customer and Supplier doctypes respectively and it is a unique field that means there can be only one customer/supplier representing a particular internal company at a time

Many times users uncheck is_internal_(customer/supplier) from a record but don't clear the represented company field which leads to issues in creating new ones.

Added a check to auto clear this field

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jun 9, 2022
@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Jun 9, 2022

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #31302 (3a1ab91) into develop (25f9d58) will decrease coverage by 0.19%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #31302      +/-   ##
===========================================
- Coverage    63.59%   63.40%   -0.20%     
===========================================
  Files          986      988       +2     
  Lines        67456    67578     +122     
===========================================
- Hits         42902    42847      -55     
- Misses       24554    24731     +177     
Impacted Files Coverage Δ
erpnext/buying/doctype/supplier/supplier.py 77.27% <100.00%> (+0.52%) ⬆️
erpnext/selling/doctype/customer/customer.py 74.18% <100.00%> (+0.16%) ⬆️
...unts/report/purchase_register/purchase_register.py 34.21% <0.00%> (-42.77%) ⬇️
...tch_item_expiry_status/batch_item_expiry_status.py 67.92% <0.00%> (-24.53%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 67.79% <0.00%> (-22.04%) ⬇️
...ext/accounts/report/balance_sheet/balance_sheet.py 36.36% <0.00%> (-21.82%) ⬇️
...e_purchase_register/item_wise_purchase_register.py 57.42% <0.00%> (-19.81%) ⬇️
...em_wise_sales_register/item_wise_sales_register.py 50.45% <0.00%> (-10.46%) ⬇️
...it_and_loss_statement/profit_and_loss_statement.py 71.42% <0.00%> (-3.90%) ⬇️
erpnext/hr/doctype/job_applicant/job_applicant.py 63.93% <0.00%> (-3.28%) ⬇️
... and 34 more

@ankush ankush merged commit c13e5ad into frappe:develop Jun 9, 2022
@ankush ankush added backport version-13-hotfix and removed needs-tests This PR needs automated unit-tests. labels Jun 9, 2022
mergify bot pushed a commit that referenced this pull request Jun 9, 2022
@mergify
Copy link
Contributor

mergify bot commented Jun 9, 2022

backport version-13-hotfix

✅ Backports have been created

ankush pushed a commit that referenced this pull request Jun 9, 2022
…lier (backport #31302) (#31306)

fix: Reset represents company on disabling internal customer and supplier (#31302)

(cherry picked from commit c13e5ad)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Jun 14, 2022
# [13.34.0](v13.33.0...v13.34.0) (2022-06-14)

### Bug Fixes

* (auto-merge) Use `frappe.log_error` instead of `doc.log_error` ([bced6a0](bced6a0))
* `test_work_order_with_non_stock_item` ([b827c3b](b827c3b))
* Add cost center in loan document ([c19dfbe](c19dfbe))
* **asset:** failing test case ([#31277](#31277)) ([8a4c9d1](8a4c9d1))
* Auto Insert Item Price If Missing when discount & blank UOM (backport [#31168](#31168)) ([#31267](#31267)) ([e69bff0](e69bff0))
* Call `calculate_cost` for Draft BOM and typo in argument ([d035aa2](d035aa2))
* Company address filter in quotation ([d375939](d375939))
* DB update child items, remove redundancy, fix perf ([cbc52a2](cbc52a2))
* Depreciate Asset before generating GL Entries on sale ([#30759](#30759)) ([dfbfe40](dfbfe40))
* Get fresh RM rate in `calculate_rm_cost` ([9a513fd](9a513fd))
* **India:** Incorrect taxable in GSTR-3B report ([e5d2c59](e5d2c59))
* **India:** Sales taxes and charges template fetching in quotation ([a1ba847](a1ba847))
* locale Currency and Float setting in update_employee ([391ed9c](391ed9c))
* misaligned columns in print format of AR/AP report ([81e32e2](81e32e2))
* Partially Ordered status for quotation ([37ba550](37ba550))
* purchase invoice standalone return GLEs (backport [#31209](#31209)) ([#31263](#31263)) ([6d99b5a](6d99b5a))
* Reset represents company on disabling internal customer and supplier (backport [#31302](#31302)) ([#31306](#31306)) ([fb9b302](fb9b302))
* Safe cast `row.rate` (in case of faulty exploded items, edge case but oh well) ([6d65e2b](6d65e2b))
* Supplied Qty not updated on Stock Entry cancel ([79b2062](79b2062))
* Trial Balance failing to ignore Finance Book ([00371f4](00371f4))
* typo in sql condition ([894f945](894f945))
* update fr translation (backport [#31232](#31232)) ([#31334](#31334)) ([5d0f271](5d0f271))
* update Period Closing Voucher per Company ([5ebbe81](5ebbe81))
* update ru translate (backport [#31200](#31200)) ([#31304](#31304)) ([77e4755](77e4755))
* Use `frappe.as_unicode` to decode output of redis module list (backport [#31282](#31282)) ([#31283](#31283)) ([633a452](633a452))
* **ux:** hide new version btn on unsaved BOM (backport [#31297](#31297)) ([#31298](#31298)) ([9f6b32a](9f6b32a))
* **UX:** use doc.status for Job Card status ([#31320](#31320)) ([78473b8](78473b8))

### Features

* Add german translations ([a3f2cf3](a3f2cf3))
* Level-wise BOM cost updation ([74d7d81](74d7d81))
* Only update exploded items rate and amount ([a26da58](a26da58))
* Track progress in Log Batch/Job wise ([3b2a8bf](3b2a8bf))

### Performance Improvements

* `get_boms_in_bottom_up_order` ([87c2b3b](87c2b3b))
* `get_next_higher_level_boms` ([767a775](767a775))
* Use cached doc instead of `get_doc` ([faa69c9](faa69c9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants