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: based on status_update.py update opportunity status to converted… #35145

Merged

Conversation

HarryPaulo
Copy link
Contributor

Looking at status_updater.py, the logic for the opportunity to be converted is to create a Sales Order.

However, currently this status does not update, I create the sales order and the status of the opportunity remains as Quotation.

So to solve the problem, when updating the Quotation status, it already updates the Opportunity status.

On submit sales order set opportunity status to Converted, on Cancel set status to Quotation back.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label May 3, 2023
@HarryPaulo
Copy link
Contributor Author

I wondered if this type of treatment should be carried out in a personalized way according to the client...

Why can there be cases where the customer considers it converted when the order is placed, in other cases when it is invoiced...

But what led to this change was looking at the status_updater.py for the Opportunity

@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #35145 (2716435) into develop (6864b11) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #35145   +/-   ##
========================================
  Coverage    63.69%   63.69%           
========================================
  Files          813      813           
  Lines        60064    60065    +1     
========================================
+ Hits         38258    38259    +1     
  Misses       21806    21806           
Impacted Files Coverage Δ
erpnext/selling/doctype/sales_order/sales_order.py 80.47% <100.00%> (+0.03%) ⬆️

@deepeshgarg007
Copy link
Member

@HarryPaulo There is a function to check if the opportunity has any ordered quotation named has_ordered_quotation. Can you also check why this didn't work and remove it if not getting called or needed?

@HarryPaulo
Copy link
Contributor Author

@deepeshgarg007, Currently in Quotation, the Opportunity status only changes on: on_cancel, on_submit...

As I am making a sales order, it does not change the status, so my change was made.

@deepeshgarg007 deepeshgarg007 merged commit a9a47a5 into frappe:develop Jun 7, 2023
13 checks passed
mergify bot pushed a commit that referenced this pull request Jun 7, 2023
#35145)

fix: based on status_update.py update opportunity status to converted on sales submit
(cherry picked from commit a9a47a5)
deepeshgarg007 pushed a commit that referenced this pull request Jun 7, 2023
#35145)

fix: based on status_update.py update opportunity status to converted… (#35145)

fix: based on status_update.py update opportunity status to converted on sales submit
(cherry picked from commit a9a47a5)

Co-authored-by: HarryPaulo <paulo_fabris@hotmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Jun 14, 2023
## [14.27.2](v14.27.1...v14.27.2) (2023-06-14)

### Bug Fixes

* `enqueue_after_commit` wherever it makes sense (backport [#35588](#35588)) ([#35590](#35590)) ([e505516](e505516))
* `TypeError` in Closing Stock Balance ([32e5bbb](32e5bbb))
* **accounts:** validate payment entry references with latest data. ([#31166](#31166)) ([4add1b4](4add1b4))
* added process loss in job card ([6a21d61](6a21d61))
* allow user to set rounding loss allowance for accounts balance ([cf14858](cf14858))
* attribute error on payment reconciliation tool ([25b3c77](25b3c77))
* based on status_update.py update opportunity status to converted… ([#35145](#35145)) ([dee8275](dee8275))
* calculate wdv depr schedule properly for existing assets [v14] ([#35613](#35613)) ([feb5d00](feb5d00))
* conflicts ([2060a00](2060a00))
* CSS not applied to product title ([#35630](#35630)) ([2cf871c](2cf871c))
* don't set default payment amount in case of invoice return ([#35645](#35645)) ([79483cc](79483cc))
* Lower deduction certificate not getting applied ([#35667](#35667)) ([6f59fa9](6f59fa9))
* Make difference entry button not working ([#35622](#35622)) ([043815e](043815e))
* make showing taxes as table in print configurable (backport [#35672](#35672)) ([#35678](#35678)) ([f39ae9d](f39ae9d))
* Payment against credit notes will be considered as payment against parent invoice in Accounts Receivable/Payable report ([#35642](#35642)) ([81ef2ba](81ef2ba))
* Project in item-wise sales register ([#35596](#35596)) ([7737b90](7737b90))
* Stock Reconciliation document update while reposting ([8b617fb](8b617fb))
* test case ([7af0380](7af0380))
* Update de.csv ([#35278](#35278)) ([2077f6e](2077f6e))
* Validation for delivery date in Sales Order ([#35597](#35597)) ([4a8ce22](4a8ce22))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants