New app as Addons For ERPNext

Hi,

i want to make an app that be an addons to ERPNext…
im already create addons module
im creating the python script
im creating the custom field
im creating git for the app

so far im alredy success to install the app using bench get-app

but the problem is, i want to export my fixtures
because i got found this error
/frappe-bench$ bench frappe --export_fixtures
frappe app is not installed. Run the following command to install frappe
bench get-app frappe https://github.com/frappe/frappe.git
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/myme/bench-repo/bench/cli.py”, line 46, in cli
return old_frappe_cli()
File “/home/myme/bench-repo/bench/cli.py”, line 98, in old_frappe_cli
os.execv(f, [f] + sys.argv[2:])
OSError: [Errno 2] No such file or directory

my apps i just test to make is addons (the name of the apps and the module)

please help

thanks

@bobzz_zone I dont know which version you are using but try this!

bench use {site-name} bench export-fixtures

2 Likes

Hi… thanks…

its works… but where was the result?

In the path frappe-bench/your_app/your_app/fixtures

im looking at frappe-bench/addons/addons/fixtures and frappe-bench/apps/addons/addons/fixtures but there is no such dir…

any clue ?

@bobzz_zone I’m sorry, typo! frappe-bench/apps/addons/addons/fixtures

yap that still no fixtures folder or files

i do seach but i find only on :
./.npm/has-binary-data/0.1.3/package/fixtures
./.npm/has-binary/0.1.6/package/fixtures
./.npm/has-binary/0.1.5/package/fixtures
./frappe-bench/node_modules/socket.io/node_modules/has-binary-data/fixtures
./frappe-bench/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/has-binary/fixtures
./frappe-bench/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/has-binary/fixtures
./frappe-bench/node_modules/socket.io/node_modules/socket.io-client/node_modules/has-binary/fixtures
./frappe-bench/apps/erpnext/erpnext/setup/page/setup_wizard/fixtures
./frappe-bench/apps/erpnext/erpnext/setup/doctype/company/fixtures
./frappe-bench/apps/erpnext/erpnext/setup/fixtures

but i dont think that was what i needed…

@bobzz_zone do you have listed the fixtures in hooks.py of your app?

can you give me an example ?..what should i make in hooks ?..actually my hooks is empty now

fixtures is the name of the doctype ?

Exactly!

i did add:
required_apps = [
“frappe”,
“erpnext”
]

fixtures = [
“Sales Invoice Item”,“Delivery Note Item”,“Purchase Receipt Item”,“Stock Entry Detail”,“Packed Item”
]

also restart the supervisor
and run bench export-fixtures

but still nothing shows up

any clue?

@bobzz_zone, why “Sales Invoice Item” instead of “Sales Invoice”?

I dont understood why you are trying to export the detail table instead of the main table!

@bobzz_zone, I guess you are trying to export “Custom Field”, “Custom Script”, “Property Setter”

@bobzz_zone write this in hooks.py to export custom fields and print format

@max_morais_dmm yap… i tried to export my custom field, custom script…
@kolate_sambhaji will try that

thanks

it still the same… not working…

it is working if i do it in erpnext hooks… is it because hooks in new app is not working?

@bobzz_zone share your code.

@rmehta for now im still developing it… im just tried to make somerandom thing before i make one…

for sharing it, it would be nice if there were one repo like packagist or something to put it together…