account-analytic icon indicating copy to clipboard operation
account-analytic copied to clipboard

[15.0] [FIX] Moved merging check from purchase order level to line level. (#217)

Open airlessproject opened this issue 2 years ago • 6 comments

This commit was removed from history moving from v11 to v15. It had the following ref: e3f0a8214699c3b35486fb62a89261e4ece040cb

It moves the checking for mergeability of PO lines from PO level to line level. The result will be that MTO lines that come from Sale Orders with different analytic accounts, now will be put in the same Purchase Order, but in different PO lines. If the analytic accounts are the same (or none), they will be merged in one PO line. Without this commit, for Sale Orders with different analytic accounts, it will always create new PO for the second PO line.

@carlosdauden @pedrobaeza @cubells please check

airlessproject avatar Jul 18 '22 13:07 airlessproject

@airlessproject FYI, I've done something more clever there : https://github.com/OCA/account-analytic/pull/413/commits/12bd16ce32eecdd5d0ddc8a1f51002e03904b1b7

You can select the default behaviour as an option.

rousseldenis avatar Jul 18 '22 13:07 rousseldenis

@airlessproject FYI, I've done something more clever there : 12bd16c

You can select the default behaviour as an option.

@rousseldenis it looks good, thanks for the info. But seems this module purchase_procurement_analytic is not in 15.0 code, is there a PR to put it into 15.0 somewhere? Thanks!

airlessproject avatar Jul 18 '22 14:07 airlessproject

@airlessproject FYI, I've done something more clever there : 12bd16c You can select the default behaviour as an option.

@rousseldenis it looks good, thanks for the info. But seems this module purchase_procurement_analytic is not in 15.0 code, is there a PR to put it into 15.0 somewhere? Thanks!

Mmmh, looking at code, I would say that there are code duplicates in both modules.

IMHO, procumrent_mto_analytic should depends on procurement_purchase_analytic and remove all code duplicate.

rousseldenis avatar Jul 18 '22 14:07 rousseldenis

@airlessproject FYI, I've done something more clever there : 12bd16c You can select the default behaviour as an option.

@rousseldenis it looks good, thanks for the info. But seems this module purchase_procurement_analytic is not in 15.0 code, is there a PR to put it into 15.0 somewhere? Thanks!

Mmmh, looking at code, I would say that there are code duplicates in both modules.

IMHO, procumrent_mto_analytic should depends on procurement_purchase_analytic and remove all code duplicate.

Nevertheless, as I see, the procurement_purchase_analytic is still on 10.0 branch. Do we have a PR that migrates it to 15.0, and afterwards it may be checked for duplicate code against procurement_mto_analytic, or maybe it's best to merge both modules in one. But again I must observe that procurement_mto_analytic is currently at 15.0 and this PR fixes this issue that's addressed in procurement_purchase_analytic even better, but here it is a bug IMO.

airlessproject avatar Jul 18 '22 14:07 airlessproject

@airlessproject FYI, I've done something more clever there : 12bd16c You can select the default behaviour as an option.

@rousseldenis it looks good, thanks for the info. But seems this module purchase_procurement_analytic is not in 15.0 code, is there a PR to put it into 15.0 somewhere? Thanks!

Mmmh, looking at code, I would say that there are code duplicates in both modules. IMHO, procumrent_mto_analytic should depends on procurement_purchase_analytic and remove all code duplicate.

Nevertheless, as I see, the procurement_purchase_analytic is still on 10.0 branch. Do we have a PR that migrates it to 15.0, and afterwards it may be checked for duplicate code against procurement_mto_analytic, or maybe it's best to merge both modules in one. But again I must observe that procurement_mto_analytic is currently at 15.0 and this PR fixes this issue that's addressed in procurement_purchase_analytic even better, but here it is a bug IMO.

You can review the 14.0's PR: https://github.com/OCA/account-analytic/pull/413

rousseldenis avatar Jul 18 '22 14:07 rousseldenis

@airlessproject FYI, I've done something more clever there : 12bd16c You can select the default behaviour as an option.

@rousseldenis it looks good, thanks for the info. But seems this module purchase_procurement_analytic is not in 15.0 code, is there a PR to put it into 15.0 somewhere? Thanks!

Mmmh, looking at code, I would say that there are code duplicates in both modules. IMHO, procumrent_mto_analytic should depends on procurement_purchase_analytic and remove all code duplicate.

Nevertheless, as I see, the procurement_purchase_analytic is still on 10.0 branch. Do we have a PR that migrates it to 15.0, and afterwards it may be checked for duplicate code against procurement_mto_analytic, or maybe it's best to merge both modules in one. But again I must observe that procurement_mto_analytic is currently at 15.0 and this PR fixes this issue that's addressed in procurement_purchase_analytic even better, but here it is a bug IMO.

You can review the 14.0's PR: #413

Thanks!

airlessproject avatar Jul 18 '22 14:07 airlessproject

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Nov 20 '22 12:11 github-actions[bot]