Maintenance Log (v2)

the quantity was created and added to the inventory as expected, but I had to select one more time the asset itself, from where I started the logging. Why was it programmed that way?

It is possible for a log to adjust the quantity of multiple assets, and the inventory adjustment may have nothing to do with the “Asset” field on the log itself.

Imagine this simple example: “Spread manure on Field A and decrement the compost pile inventory”

  • Input log
  • References “Field A” in the log’s “Assets” field (indicating that the input was applied to that asset).
  • w/ Quantity:
    • Inventory asset: “Compost pile”
    • Inventory adjustment type: “Decrement”

This is working as designed, but perhaps the workflow isn’t intuitive, as indicated by:

After creating an asset I wanted to add a quantity with a log (clicked “add activity log” in the asset view).

The “add log” link will automatically reference the asset you came from in the “Assets” field of the log, because the general assumption is that you’re recording something that happened to that asset. But it doesn’t touch the inventory assets at all.

I think the best next step in this regard would be to create some inventory management quick forms, which can serve as the “canonical” place to go to adjust inventories - with a simple set of input questions and it automatically creates the necessary logs/quantities/references when submitted.

After doing step 1.b … In the log form - quantity section, the button “Add existing quantity” appeared, but by pressing it nothing happened.

Hmm that’s odd, and may be a bug.

farmOS uses the “Inline Entity Form” module for the “Add quantity” button, which provides generic functionality for creating/linking other entities (eg: quantities) to the entity that you’re working with (eg: the log). Technically, it also allows you to link existing entities, but the farmOS data model assumes that quantities are never shared across multiple logs… so the fact that it is (almost) allowing you to do that isn’t desireable.

Are you able to reproduce this consistently?