agriculture icon indicating copy to clipboard operation
agriculture copied to clipboard

New DocType Animal Group and Tree View

Open Tropicalrambler opened this issue 6 years ago • 3 comments

Challenge: ERPNext needs to track individual animals as well as unserialized animals. Both these categories need to be assigned to a group so operations and data can be performed on them. Information needs to be visible in Tree view in ERPNext, so totals can be quickly gleaned from data displayed on screen.

Planned Solution: A DocType called Animal Group will be created. Within it, the user will be able to view the following:

  • [x] A link field specifying the parent Animal Group (if Any) it will default to "All Animal Groups" as the root

  • [x] A section named Unserialized Group Members which will show a Child Table with the following fields:

  • amount

  • species

  • combined weight

  • date added to group

The total weight for all animals (rows) in child table of unserialized group members will also be displayed. (similar to a sales invoice Grand total read only field)

  • [x] A section named Serialized Group Members which will show a Child Table of all the individual animals in inventory belonging to the group being viewed.

  • ID

  • Name

  • Species

  • Weight

  • Date added to group

The total weight for all individual members (rows) in child table of serialized group members will also be displayed below the child table (similar to a sales invoice Grand total read only field)

  • [x] A grand total weight field will be shown combining the total weight of unserialized + total weight of serialized

  • [x] When viewing DocType in list view, a link to a tree view will be available, which will show the groups as folders, and the individuals (serialized and unserialized) as nodes.

  • [x] Each node will display the weight for each individual, in a specified UOM in Ag Settings page.

  • [x] Each group or folder will display the combined weight of all the members of that group (serialized and unserialized). Similar to the Accounting Tree view where total balance per account and per group of accounts is shown.

Expected Behavior:

Tropicalrambler avatar Aug 23 '18 18:08 Tropicalrambler

Functionality has been created, will send pr relating to this Issue.

Only pending item is that on first load, the tree view will not show the weight, until page is reloaded. Additionally formatting needs to be added to the number.

Tropicalrambler avatar Oct 11 '18 18:10 Tropicalrambler

I have just done afresh install of Agriculture and I do not see this ? Has PR completed ? This is good idea.

johnwslongland avatar Aug 17 '24 14:08 johnwslongland

Hi @Tropicalrambler I see you have created this. I like the idea so much that I wanted to start on it, but if you have already done a lot of the work then I would be doing double work. Have you completed it ?

johnwslongland avatar Aug 17 '24 20:08 johnwslongland