Production lines do not keep specific ASIs that were added manually

Description

Hello there,

the issue I want to bring up looks as follows. When creating a production and adding ASIs to its lines manually (e.g. because the physical object was already built and we're just telling the system), it does not keep them through the document action due to these lines of code:

As I don't believe this behavior to be intended, the change I'd suggest requires to first check all existing ASIs on the line and fill the rest using the current solution afterwards.

Regards,
Lukas Heidbreder

Environment

None

Attachments

2

Activity

Show:

Carlos Ruiz September 1, 2021 at 9:37 AM

Hi - a quick glance to the code, everything looks OK.

I didn’t do tests, I’ll try to test it with a pull request.

Regards,

Carlos Ruiz

Lukas Heidbreder June 29, 2021 at 9:11 AM

Hi, @Carlos Ruiz, so here’s a quick update containing the modified files for review.

As per your suggestion I have added the M_ProductionLineMA.isAutoGenerated column though currently it does not do much aside from documentation.

My tests have shown that the manual addition of attributes can be rather volatile, e.g. movement quantities need to be negative, otherwise it might yield rather unexpected results. Any attempt at correcting this behavior had other unwanted side effects however.

I’d be glad to be pointed towards any sort of oversight on my part, regards

Lukas Heidbreder

Carlos Ruiz June 23, 2021 at 11:21 AM

Hi - thanks for reporting the issue and working on a solution.

An advice about the intended solution, I think to make it work same as the other MA tables (inout, inventory, movement) you must add the column M_ProductionLineMA.IsAutoGenerated and make it work similar to the others, the deleteMA method must delete just the autogenerated records, not the manually entered.

Regards,

Carlos Ruiz

Lukas Heidbreder June 23, 2021 at 10:41 AM

And to clarify we are already working on a patch which I would be glad to share

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created June 23, 2021 at 8:04 AM
Updated September 1, 2021 at 9:37 AM