Customising print format error

Hi everyone,
I’m new to erpnext, currently on self hosted ubuntu 18.04 vm on proxmox. When saving a custom print format (without even changing any fields in the the custom format) and try invoking it in stock entry print format , I received the following error message “AttributeError: ‘PrintFormat’ object has no attribute ‘absolute_value’”

frappe log:

Request Error
Traceback (most recent call last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.api.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/api.py”, line 59, in handle
return frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 24, in handle
data = execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 64, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 1064, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/www/printview.py”, line 190, in get_html_and_style
no_letterhead=no_letterhead, trigger_print=trigger_print)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/www/printview.py”, line 103, in get_rendered_template
doc.absolute_value = print_format.absolute_value
AttributeError: ‘PrintFormat’ object has no attribute ‘absolute_value’

is this a user error or a possible bug in code ? how should I go about solving it ?

note:
this is a production version of erpnext, installed with easy install script, currrently running the following version:
ERPNext: v12.17.0 (version-12)
Frappe Framework: v12.14.0 (version-12)

1 Like

did the following commands:
bench build
bench migrate
bench clear-cache

issue solved

2 Likes

will this effect my live database .will any data be lost ?

I did it on a newly installed instance. So no data entry has been recorded.

Do you know how to take a backup and restore safetly ,could there be any issue happen in between in migrate ?

about backup - back up can be downloaded from settings - download data - download backups

https://docs.erpnext.com/docs/user/manual/en/setting-up/data/download-backup

Restore backup:

if you can’t access the web interface for backup download, you might be able to do it from the terminal

https://frappeframework.com/docs/user/en/bench/resources/bench-commands-cheatsheet