Switch frappe from 7.2.30 to 7.2.19

Hi,

I want to switch frappe version from 7.2.30 to 7.2.19.
Which command will be for that?

there is no command to do this.

The only way to revert an upgrade is to do so with a full server backup.

Hi @felix,

I have implemented ERPNext in frappe 7.2.19 and deployed production server.
I have modified erpnext module.
When I do install frappe at localhost then version is showing 7.2.30.
When I replace frappe directory from production server to local then bench start is not working.
How can I resolve this issue

update your production server to the latest release with a bench update.

Always keep your development and production environments in sync

Hi @felix,

If I update frappe for production server then production server all features will be working?
Cause I have modified lots of code at ERPNext module

If it is custom scripts and custom fields then they will not be affected but if you have made changes to the core code, then yes it will affect your changes.
You can stash your changes using git stash, then bench update and git stash pop to get changes back.

Hi @KanchanChauhan,

Thanks for your feedback.

But at localhost I have installed latest frappe and erpnext.
Then I have replaced erpnext with my modified erpnext module.
Then I have write bench migrate. But bench migrate is not working for latest version.
What Can I do for this error?

What error are you getting on bench migrate?

ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request)

1 Like

Hi @KanchanChauhan,

Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [= ]Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/arifur/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/arifur/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/arifur/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/arifur/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/arifur/frappe-bench/apps/frappe/frappe/commands/site.py”, line 210, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/arifur/frappe-bench/apps/frappe/frappe/migrate.py”, line 33, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose, reset_permissions=reset_permissions)
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/sync.py”, line 45, in sync_for
reset_permissions=reset_permissions)
File “/home/arifur/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 58, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/arifur/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 129, in import_doc
doc.insert()
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 220, in insert
self.run_post_save_methods()
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 790, in run_post_save_methods
self.run_method(“on_update”)
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 667, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 890, in composer
return composed(self, method, *args, **kwargs)
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 873, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/arifur/frappe-bench/apps/frappe/frappe/model/document.py”, line 661, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/arifur/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 205, in on_update
self.run_module_method(“on_doctype_update”)
File “/home/arifur/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 254, in run_module_method
module = load_doctype_module(self.name, self.module)
File “/home/arifur/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 184, in load_doctype_module
raise ImportError, ‘Module import failed for {0} ({1})’.format(doctype, module_name)
ImportError: Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request)

Hi @KanchanChauhan,

Where your answer?
I am waiting for you.

@arif: if you modified core ERP Next / Frappe files directly (and not packaged such changes in a custom app), then it may be the reason of the trouble you have.

If this is the case, you need to take the steps to strip your changes out of the core files and put them into a separate custom app. After you do this transition, every next update of the platform via bench update will go smoothly.

Hi, @gvyshnya,

I have modified core ERPNext module not Frappe. I have modified accounting report like as balance sheet, general ledger etc. So if I get trouble for this then I want to install frappe 7.2.19 at my localhost. How is it possible.
If I install frappe then always installed frappe 7.2.30

@arif - the best way to do is to migrate your changes to accounting report to a custom app. This is the recommended way of doing customization on the system. Then you will be safe, whether you are on Frappe 7.2.19 or 7.2.30

Other alternatives are painful - you will have to manually get the older version of Frappe from the repo on github, install it on your server manually and then never upgrade to newer versions of Frappe and ERP Next.

Therefore I really recommend you to make your customization in a proper way.

Hi @gvyshnya,

I have already modified ERPNext. So now there is no way to implement custom app.

I have backup my modified version at localhost and it is running but I have deleted database from local.
That’s why I have import database from production server to localhost.
Then is showing
mysqlexceptions.OperationalError
** OperationalError: (1045, “Access denied for user ‘1bd3e0294da19198’@‘localhost’ (using password: YES)”)**

Any solution for this?

Hi @gvyshnya,

you said install it on your server manually.
How I will install manully? using any command line or copy paste directory.
I am really confused your answer.
If I copy paste my expected erpnext directory then what will be happened for database.
I see that database is created using command line. But if I copy paste my modified erpnext module then how will be create database?

Please give me proper answer.
Please don’t give me indirect answer.

Hi @gvyshnya,

You did not give me accurate answer for my question.

Hi @gvyshnya,

I have solved this issue. But you can’t find out solution for this.

My suggestion is that please increase your skill first and give answer for any people issue.
Please don’t give any answer before increase your technical skill.

We have lost our time for your nonsense answer.

“I have solved this issue. But you can’t find out solution for this.”

“We have lost our time for your nonsense answer.”

You criticize others for their well intentioned advice.

Instead contribute your learning here?

Otherwise you are welcome to leave.

2 Likes