mpkasp / django-bom Goto Github PK
View Code? Open in Web Editor NEWA simple bill of materials app built using the django web framework.
License: GNU General Public License v3.0
A simple bill of materials app built using the django web framework.
License: GNU General Public License v3.0
Entering a value in the "Manufacturer part number" and "Create a New Manufacturer" fields on the "Create a Part" page (/bom/create-part/
) causes an error that results in a 500 being returned.
Reproduce steps:
example part
123
---------
value)abc
Expected result: part gets created
Actual result: 500
I don't have an installation of IndaBOM locally yet so I don't have any way to get more debug information right now π¬
Each part revision to have inventory tracking including quantity and location (thanks @lcesero) of that quantity.
May be interesting to add seller inventory, similarly have a single field that can be updated
Let's discuss further before starting on this feature.
When managing the BOM for an individual part (e.g at https://indabom.com/bom/part/17834/rev/18871/manage-bom/ ), the ellipsis is the last column... making it a pain to scroll over to find.
One solution might be to make the 'level' field clickable at the point, and to provide the same "edit or change / remove" drop-down menu from it.
(Moved from here.)
The pipenv install
phase requires compiling mysql python integration from source. There should be a note around installing libmysqlclient-dev
or similar from the OS. Produced this error on WSL.
[pipenv.exceptions.InstallError]: error: subprocess-exited-with-error
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Γ Getting requirements to build wheel did not run successfully.
[pipenv.exceptions.InstallError]: β exit code: 1
[pipenv.exceptions.InstallError]: β°β> [27 lines of output]
[pipenv.exceptions.InstallError]: /bin/sh: 1: mysql_config: not found
[pipenv.exceptions.InstallError]: /bin/sh: 1: mariadb_config: not found
[pipenv.exceptions.InstallError]: /bin/sh: 1: mysql_config: not found
[pipenv.exceptions.InstallError]: mysql_config --version
[pipenv.exceptions.InstallError]: mariadb_config --version
[pipenv.exceptions.InstallError]: mysql_config --libs
To help with usability, an auto search or auto complete for adding new items to a BOM would make it much faster and easier to create BOM structures. Without this, one needs to already know all of their part numbers beforehand which means they basically already need a bom in front of them
A view that goes through all suppliers and identifies what they made for an organization.
Allowing the user to upload a picture when the component is being created/edited would allow for easier identification of the component. This is useful when components have very similar descriptions but different uses (think "M2.5x6 spacer" vs "M2.5x6 screw").
This picture could be referenced from Google Drive.
Is this a known error? Or a mistake in the name auth_user__old
maybe?
OperationalError at /admin/bom/organization/add/
no such table: main.auth_user__old
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/bom/organization/add/?_to_field=id&_popup=1
Django Version: 2.1.3
Exception Type: OperationalError
Exception Value:
no such table: main.auth_user__old
Exception Location: /tmp/mysite/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 296
Python Executable: /tmp/mysite/bin/python
Python Version: 3.7.1
Python Path:
['/tmp/mysite/mysite',
'/tmp/mysite/lib/python37.zip',
'/tmp/mysite/lib/python3.7',
'/tmp/mysite/lib/python3.7/lib-dynload',
'/usr/lib64/python3.7',
'/usr/lib/python3.7',
'/tmp/mysite/lib/python3.7/site-packages']
Server time: Thu, 3 Jan 2019 16:46:25 +0000
When editing a part class the form refuses to save when the part code is unchanged.
Test: edit part with code '200'
Change name or comment field, leave code untouched.
Expected: part is saved with updated name / comment
Actual result:
Field code is marked with error 'Part class with code 200 is already defined.'
From a user's recommendation:
As a (small) business user it sounds scary when app requires access to ALL of your files (we use Gsuite).
Even without verification, I would be more confident if I could create the folder and then grant the access to that and only that folder. But I don't know if that is even possible.
Via @hecko here
Is there a way to create a "manufacturing order" - that is - lets say we have this product which contains 300+ electronic parts including plastic parts and sub assemblies etc - is there a way to klick "Im now making 100 units of this product" and Idabom will check which parts are in stock, which need to be bought or 3d printed / manufactured ...
After updating the quantity of a subpart, a 500 internal server error is raised:
AttributeError: 'super' object has no attribute 'clean_part_revision'
it would be nice to copy an item (like an assembly) to keep the BOM intact but make a new parent part number and then edit the parent to create a variant.
Another potential bug. We are using IndaBom for production configuration like a traditional PLM would be used for. However when I look at the cost of the different configurations, I don't see the price difference that I expect. Long story short, even if I have a component labeled as a do not load, it still shows in the cost of the board on the report. I believe the code needs to look at the do_not_load field to determine if the cost or the part(s) should count against the sub-assembly price. I hope I explained it well and if not let me know and I'll explain and/or show screen of what I'm seeing.
I exported the BOM to a cab and if I take out the DNL cost it seems to be correct.
In django 3.2, Referencing the User Model:
If you reference [User](https://docs.djangoproject.com/en/3.2/ref/contrib/auth/#django.contrib.auth.models.User)
directly (for example, by referring to it in a foreign key), your code will not work in projects where the
[AUTH_USER_MODEL](https://docs.djangoproject.com/en/3.2/ref/settings/#std-setting-AUTH_USER_MODEL)
setting has been changed to a different user model.
This includes the owner
field in Organization
model and user
field in UserMeta
model.
The part temperature setting is currently a single "temperature" value, but most parts I work with have a temperature range (0-45C), (-25-75C) etc. Being able to specify a range would be useful.
I'm not sure I'm using django-bom the way it has been imagined, so maybe this is not an issue, but more a feature request.
When I create a BOM, I want to add sub-parts with price. This allows to have a good view of my product costs. When I send the device into production, I want to release the revision (say revision 1), and create a new one (revision 2) to prepare the next production.
Even if there's no changes on the BOM regarding the part list, the parts prices will likely changes. If I adjust the parts prices in this new revision, the overall price as well as each part of the revision 1 will be impacted by the new prices.
To summarize the problem, the manufacturer parts and the sellers parts should be dependent of the part revision, and not the part (on a database point of view). This will allows to get statistics of price evolution from one revision (in my case, revision = production run).
Once a part is released, all its attributes (including the sellers data) should be freezed I think. This is currently not the case.
Before working on these changes, I think a discussion about this feature and its impacts is needed. Also, this is maybe not in the implementation philosophy and thus this feature should be rejected.
Hi, I'm just trying to install.
I think the starting from scratch install guide should mention that dependencies from requirements.txt
should be installed with pip install -r requirements.txt
. Instead of just pip install django
Dashboard can be sped up by adding a cache in the part_revs
loop in the dashboard template using template fragment caching.
https://docs.djangoproject.com/en/4.1/topics/cache/#template-fragment-caching
It would be nice to be able to import the manufacturer and seller informations during the CSV parts and bom import.
Applying bom.0001_squashed_0018_auto_20170418_0330...Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 93, in exit
self.execute(sql)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 120, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "bom_distributorpart" does not exist
In https://github.com/mpkasp/django-bom/blob/master/bom/admin.py#L129,
admin.site.unregister(User)
the line above assumes that the model User is already registered. If for some reason, it is not yet registered, raising a django.contrib.admin.sites.NotRegistered: The model User is not registered
, it should be catched, and ignored.
Hello! I'm new to the project but hoping to use it for my business.
I've hit an issue with the initial install after following the instructions in #3 , I get the following error:
(indabom) [mmw@rincewind indabom]$ ./manage.py migrate
System check identified some issues:
WARNINGS:
?: (mysql.W002) MySQL Strict Mode is not set for database connection 'default'
HINT: MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-sql-mode
Operations to perform:
Apply all migrations: admin, auth, bom, contenttypes, sessions
Running migrations:
Applying bom.0001_squashed_0018_auto_20170418_0330...Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 109, in __exit__
self.execute(sql)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 136, in execute
cursor.execute(sql, params)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/mmw/.virtualenvs/indabom/lib/python2.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
django.db.utils.ProgrammingError: (1146, "Table 'indabom.bom_distributorpart' doesn't exist")
It's been a while since I last touched Django (I tend to use flask these days), but it looks to me as if there's a migration missing that creates that table?
This is from the latest version available in pip:
Django==1.11.14
django-bom==0.67
mysqlclient==1.3.13
pytz==2018.5
Incorrectly posted here, moved to mpkasp/indabom#1
For a part, I can define a manufacturer and a manufacturer part number.
I can also define a seller.
Would be great to associate to the seller the seller part, which is the reference used by the seller to identify the component.
Is there a way to do it ?
For example:
Name. Designator Manufacturer Part Manufacturer Supplier Supplier Part
"1uF. C9" "CL21B105KOFNNNE" "SAMSUNG" "LCSC" "C24123"
I do wish there was a way to upload BOMs rather than just lists of parts. I still have to build out the individual sub-assemblies and all of that. I haven't found a way to upload that manually. I tried downloading the indented BOM of a test assembly, modifying, and uploading: alas, no dice. Is there a way to do that? Is that a feature that can be added?
Create an API to integrate with other apps.
Using the part class edit page (/bom/settings/user/#indabom
), it's possible to create a part class that is 2 digits long:
It's possible to use the "add part" interface to create a part in this class:
But if you try and add that part to another part's BOM, it doesn't work, and the UI spits out a confusing error:
I think:
Would it be possible to create variants of items? I can create a new revision of a part, but I have designs that have different parts and different grades of part based on requirements.
On the dashboard, when searching with part_class
, and then going to another page of the search results, the search results reset, removing the filters with part_class
.
Steps to replicate:
Following the Start from Scratch: Use as a standalone Django Project. I've tried on both Ubuntu 18.04 and 20.04
Collecting mysqlclient==1.3.13 Downloading mysqlclient-1.3.13.tar.gz (90 kB) |ββββββββββββββββββββββββββββββββ| 90 kB 5.3 MB/s ERROR: Command errored out with exit status 1: command: /home/patrick/.virtualenvs/django-bom01/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wjlk8b4m/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wjlk8b4m/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-wjlk8b4m/mysqlclient/pip-egg-info cwd: /tmp/pip-install-wjlk8b4m/mysqlclient/ Complete output (10 lines): /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-wjlk8b4m/mysqlclient/setup.py", line 18, in <module> metadata, options = get_config() File "/tmp/pip-install-wjlk8b4m/mysqlclient/setup_posix.py", line 53, in get_config libs = mysql_config("libs_r") File "/tmp/pip-install-wjlk8b4m/mysqlclient/setup_posix.py", line 28, in mysql_config raise EnvironmentError("%s not found" % (mysql_config.path,)) OSError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Support other currencies, e.g. ZAR, CAD on sourcing pages and octopart integration
RecursionError: maximum recursion depth exceeded while calling a Python object on Python 3.8
File "/Users/azat/.pyenv/versions/Web/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/Users/azat/.pyenv/versions/Web/lib/python3.8/site-packages/django/urls/resolvers.py", line 410, in check
messages.extend(self._check_custom_error_handlers())
File "/Users/azat/.pyenv/versions/Web/lib/python3.8/site-packages/django/urls/resolvers.py", line 427, in _check_custom_error_handlers
signature = inspect.signature(handler)
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/inspect.py", line 3093, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/inspect.py", line 2842, in from_callable
return _signature_from_callable(obj, sigcls=cls,
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/inspect.py", line 2292, in _signature_from_callable
return _signature_from_function(sigcls, obj,
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/inspect.py", line 2156, in _signature_from_function
parameters.append(Parameter(name, annotation=annotation,
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/inspect.py", line 2479, in __init__
self._kind = _ParameterKind(kind)
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/enum.py", line 309, in __call__
return cls.__new__(cls, value)
File "/Users/azat/.pyenv/versions/3.8.5/lib/python3.8/enum.py", line 566, in __new__
if type(value) is cls:
RecursionError: maximum recursion depth exceeded while calling a Python object
This is a fresh django installation and nothing except the django-bom
Upload parts that already exist, then try to add those parts to a BOM
Will get error: Found 2 entries for part 2 for subpart on row C0402X5R10V001. This should not happen. Please let [email protected] know. Uploading of this subpart skipped.
From ziogianni on the indabom repository issues:
Hello everyone, I'm looking for a way to modify the part number syntax in order to better customize this platform to my needs. Take into account that every business has its own way to code parts, so I suppose that it'd be useful to provide a config file where you can decide your own part number syntax, going beyond the predefined structure which mainly fits to the electronics scope.
If the variation length of a part is changed to greater than 2, then the part entry form won't allow more than two characters to be entered, but declares that the part variation should have the new value.
To reproduce:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.