ForgeFlow / ddmrp

DDMRP
GNU Affero General Public License v3.0
14 stars 17 forks source link

11.0 mig ddmrp adjustment #50

Closed grindtildeath closed 6 years ago

grindtildeath commented 6 years ago

Depends on :

Todo :

grindtildeath commented 6 years ago

@jbeficent @lreficent I added a first test about the generation of ddmrp.adjustment from the wizard and will add a second about the impact on adu calculation. However I'm not sure about the following behaviour, so your advice would be much appreciated. Actually, the wizard generates one ddmrp.adjustment record for each combination of : orderpoint, date_range, factor. Factor here being 'DAF' or 'LTAF'. As both DAF and LTAF exist on the model, shouldn't the generated ddmrp.adjustment records with the same orderpoint and date_range be merged ? Reason behind is, for a specific orderpoint - date range, not to have a record with DAF=0, when DAF != 0 on another record with the same orderpoint - date range. IMO it feels a bit weird.

grindtildeath commented 6 years ago

@jbeficent @lreficent Could you guys have a look to last commit here ? I tried to add a test to ensure ADU and DLT of subcomponents orderpoints are impacted the same way as the top product, but I don't know if I'm missing something or if the explosion isn't done correctly.

LoisRForgeFlow commented 6 years ago

@grindtildeath the DLT adjustment should only affect the specific buffers, no need to explode it to any component. While for DAF (factor to ADU) there is an explosion but this explosion is not 1:1 from parent to components, you need to take care of the relative impact of the parent in a component that may have other sources of demand (that's the purpose of the demand allocations that are created after applying a DAF to a parent product).

Does this clarify things a little bit?

grindtildeath commented 6 years ago

@lreficent Makes sense, thanks. I just removed last commit with test on subcomponents, as I'm off for the next three weeks and won't have time to dig more into it now. @guewen can still push on my branches though.

grindtildeath commented 6 years ago

@lreficent Just realized I had to change the condition in the onchange so it's done now. Just make sure you pull https://github.com/OCA/web/pull/915 to test.

simahawk commented 6 years ago

@grindtildeath @lreficent matrix widget fix merged

LoisRForgeFlow commented 6 years ago

Thanks @simahawk

@grindtildeath Just tested, works perfectly, could you squash your commits?

JordiBForgeFlow commented 6 years ago

@grindtildeath After you squash we can merge and we're then ready to send the pull request to OCA for all the DDMRP modules! :)

grindtildeath commented 6 years ago

@lreficent @jbeficent Commits squashed :smiley:

LoisRForgeFlow commented 6 years ago

Thanks a lot @grindtildeath :smile:

simahawk commented 6 years ago

:fireworks: