-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][MIG] purchase_procurement_analytic #413
[14.0][MIG] purchase_procurement_analytic #413
Conversation
571ce44
to
fdb6bec
Compare
Hi @rousseldenis what is the status of this PR? is the module still needed? |
This is currently in production for months and ready for review. |
…ccount The search on purchase creation from procurement is done on purchase.order model Don't use a context change to do so
When procurements with no analytic account (e.g. Reordering rules) are run with existing purchase orders (with analytic account defined), it adds purchase line on purchase with order lines with analytic. It shouldn't.
Currently translated at 100,0% (2 of 2 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/de/
Currently translated at 100,0% (2 of 2 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/ca/
Currently translated at 100.0% (2 of 2 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/ca/
Currently translated at 100.0% (2 of 2 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/it/
Currently translated at 100.0% (2 of 2 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/pt/
…curement If purchase orders were generated through bare procurement orders, generated moves do not contain the analytic account set on procurement.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/
Currently translated at 100.0% (3 of 3 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/pt_BR/
Currently translated at 100.0% (3 of 3 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/fr/
Currently translated at 100.0% (3 of 3 strings) Translation: account-analytic-10.0/account-analytic-10.0-purchase_procurement_analytic Translate-URL: https://translation.odoo-community.org/projects/account-analytic-10-0/account-analytic-10-0-purchase_procurement_analytic/es_AR/
ea32c9f
to
5730f05
Compare
@AaronHForgeFlow I've updated this by reactivating tests, and introducing a grouping strategy option. Per line or per order. @cubells @pedrobaeza @carlosdauden Review is welcome. |
/ocabot migration purchase_procurement_analytic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not using this anymore, but a quick code review done. Everything seems good except tests
Uhm, a weird commit separation. Isn't this overlapping with the module |
Mmmh, yes and no. This is oriented on analytic account only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, for me, 2 PO lines with different analytic account should never get merged, but if you think so. Please put anyways the default behavior for not grouping.
Neither do I. In standard, analytic account is not managed, so both procurements generate one PO line with merged quantities. As this module introduces analytic account transmission to PO, you can choose:
So, user can choose which behaviour fits its need. |
5730f05
to
dfe60d4
Compare
…rouping As to keep former process and give also the ability to group per line, an option is added in configuration that allows user to choose either to group purchase order lines together on the same analytic account or to group purchase orders per analytic account.
dfe60d4
to
12bd16c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review, works as specifications
Hi all, just a heads up to something we discovered with @rousseldenis in another PR, that most of the functionality in |
Mmmh, in fact, MTO is a particular case of purchase. I would say it should be better to take into account MTO in purchase module than the contrary. So, the good option for me is to depends on this in mto module and remove all duplicated code there. |
Not diving too deeply in both codes at this moment, I think that if we remove the duplicated code, none will remain, because basically all that @rousseldenis I think this may be a decision beyond both you and me, and maybe the official maintainers can check further. |
@airlessproject That does not impact any functional nor technical change as if both modules are installed, behaviour would be the same. As you can see, I'm declaring myself as this module maintainer: So, of course we can ask review. But, duplicate code is always to avoid. My comment above is a fair solution |
Oh, apologies for this, but for sure having more opinions is better :) I think it's best to cross-check both modules and as I said previously, I fear that if we remove duplicated code from |
@rousseldenis sorry for the extra comments, I just now compared the two modules and see there is extra functionality in I think your approach to remove the duplicate code from there and make it depend on Thanks and apologies again for wasting a bit of our time :) |
👍 Debate is never time wasting 😃 |
Looking at the commit history, procurement_mto_analytic was created from purchase_procurement_analytic, it was actually a module rename. I think now that renaming was not necessary at that time, but I don't like the idea of renaming it again. For convention, procurement_mto_analytic should stay, and if there are improvements here that are not in the procurement_mto_analytic module then we can do a PR to introduce those improvements/fixes. I also see that procurement_mto_analytic has no declared maintainer so @rousseldenis could also propose himself to be a maintainer for that module. |
That's why I wanted to depends on procurement_purchase_analytic for duplicated code and keep both (we can do that in a further PR) as this will not break anything IMHO.
I can do it also even if I don't use it yet |
I am fine with that :) |
@AaronHForgeFlow @Cedric-Pigeon @airlessproject Do we agree to remove duplicate code from procurement_mto_analytic (purchase.order.line and stock.rule) and add a depends there on this module ? |
Ok for me! |
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. |
No description provided.