valnet / valuenetwork

Resource Planning and Value Accounting for Value Networks
http://mikorizal.org
GNU Affero General Public License v3.0
99 stars 25 forks source link

Resource type should require unit #479

Open fosterlynn opened 8 years ago

fosterlynn commented 8 years ago

Conditions not clear. (Found when doing Breathing Games create plan from recipe.)

Traceback (most recent call last):

File "/home/valnet/webapps/django/lib/python2.7/django/core/handlers/base.py", line 111, in get_response response = callback(request, _callback_args, *_callback_kwargs)

File "/home/valnet/webapps/django/valuenetwork/valuenetwork/valueaccounting/views.py", line 6347, in process_oriented_logging req.input_work_form_init = req.input_event_form_init(init=init)

File "/home/valnet/webapps/django/valuenetwork/valuenetwork/valueaccounting/models.py", line 7793, in input_event_form_init qty_help = " ".join(["unit:", self.unit_of_quantity.abbrev, ", up to 2 decimal places"])

AttributeError: 'NoneType' object has no attribute 'abbrev'

fosterlynn commented 8 years ago

This was data - unit was entered in the unit of use instead of the unit in the resource types. Still a bug, since unit should be required. But not an urgent one.

sqykly commented 6 years ago

Fixing

sqykly commented 6 years ago

Already fixed the exception =/

sqykly commented 6 years ago

Suppose, though, I want to create a resource type "Eggs". The unit will just be the quantity of eggs (you don't want to keep 2/3 of an egg laying around). Rather than requiring a unit, how about adding a default Unit of quantity, items? Is there something like that already?

sqykly commented 6 years ago

Fixed

fosterlynn commented 6 years ago

Suppose, though, I want to create a resource type "Eggs". The unit will just be the quantity of eggs (you don't want to keep 2/3 of an egg laying around). Rather than requiring a unit, how about adding a default Unit of quantity, items? Is there something like that already?

That is "each".