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: KSA QR field rename patch #28832

Merged

Conversation

deepeshgarg007
Copy link
Member

@deepeshgarg007 deepeshgarg007 commented Dec 12, 2021

Fixes an issue introduced in #28776

The data from old field was not migrated to the new field as it didn't exist in the first place

@codecov
Copy link

codecov bot commented Dec 12, 2021

Codecov Report

Merging #28832 (14d03a9) into develop (624481b) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop   #28832      +/-   ##
===========================================
- Coverage    55.28%   55.25%   -0.03%     
===========================================
  Files         1122     1122              
  Lines        66828    66828              
===========================================
- Hits         36943    36928      -15     
- Misses       29885    29900      +15     
Impacted Files Coverage Δ
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
erpnext/education/doctype/student/student.py 73.68% <0.00%> (-3.16%) ⬇️
...ion/doctype/course_enrollment/course_enrollment.py 44.00% <0.00%> (-2.00%) ⬇️
...e/shopping_cart_settings/shopping_cart_settings.py 65.38% <0.00%> (-1.93%) ⬇️
erpnext/shopping_cart/product_query.py 61.19% <0.00%> (-1.50%) ⬇️
...ype/account/chart_of_accounts/chart_of_accounts.py 77.24% <0.00%> (-0.69%) ⬇️
erpnext/portal/product_configurator/utils.py 33.06% <0.00%> (-0.41%) ⬇️
erpnext/projects/doctype/project/project.py 53.73% <0.00%> (-0.36%) ⬇️
erpnext/stock/stock_ledger.py 85.73% <0.00%> (-0.35%) ⬇️
... and 13 more

@@ -12,5 +13,20 @@ def execute():

if frappe.db.exists('DocType', 'Sales Invoice'):
frappe.reload_doc('accounts', 'doctype', 'sales_invoice', force=True)

# rename_field method assumes that the field already exists or the doc is synced
if not frappe.db.has_column('Sales Invoice', 'ksa_einv_qr'):
Copy link
Contributor

@rtdany10 rtdany10 Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't https://github.com/frappe/erpnext/blob/develop/erpnext/regional/saudi_arabia/utils.py#L19-L30 be enough? 🤔
It checks if the field is present, if not, creates, before sales invoice is submitted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then there is no point of the patch then, the patch will get executed before the field is created and no data will me moved from the old field in the invoices

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

backport version-13-hotfix

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@deepeshgarg007
Copy link
Member Author

@Mergifyio backport version-13-pre-release

@deepeshgarg007 deepeshgarg007 merged commit 6749d8e into frappe:develop Dec 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

backport version-13-hotfix

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Dec 14, 2021

backport version-13-pre-release

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Dec 14, 2021
…-28832

fix: KSA QR field rename patch (backport #28832)
deepeshgarg007 added a commit that referenced this pull request Dec 14, 2021
…se/pr-28832

fix: KSA QR field rename patch (backport #28832)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants