Skip to content
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] stock_analytic: Migration to V14. #353

Merged
merged 53 commits into from
Sep 7, 2021

Conversation

alan196
Copy link
Contributor

@alan196 alan196 commented Jan 28, 2021

Proposed changes

I have migrated the module stock_analytic I also make a little improvement and add analytic groups in the field, in order to show analytic accounts in stock moves only to users that have analytic group.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Migration Update

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation

@rousseldenis
Copy link
Contributor

There is an issue in another module : #354

@alan196 alan196 force-pushed the 14.0-mig-stock_analytic branch from 9d7a5bf to 3149069 Compare March 15, 2021 14:11
@alan196
Copy link
Contributor Author

alan196 commented Mar 15, 2021

Now test are OK 👍

@rousseldenis Could you help me to review?

@@ -93,7 +93,7 @@ def _create_picking(
"location_id": location_id.id,
"location_dest_id": location_dest_id.id,
"date": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"date_expected": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
"date_deadline": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do fields.Datetime.now()

Comment on lines +28 to +31
if (
line[2]["account_id"]
!= self.product_id.categ_id.property_stock_valuation_account_id.id
):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alan196 @rousseldenis It's not really a review, but I'm willing to use this module and I don't catch why there is this condition on the product category's stock valuation account.account.
Do you know the reason ?
Thank you very much ! 🙏

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clementmbr The same condition is in previous versions: 9.0, 10.0, 11.0, (module is not migrated to 12.0) and 13.0, mabe older versions too. I'd say it's fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we have checked this with @clementmbr it is fine indeed.

@Jerther
Copy link
Member

Jerther commented Jul 20, 2021

@alan196 Are you going to put any more effort into this PR? I see you have two reviews with suggested changes. Have you considered them?

I have a bunch of custom modules that depends on stock_analytic so either this PR gets pushed or else this more recent one does: #391 . I'd rather help with these than create yet another PR with a proposed migration ;) But first I want to make sure one of them is still maintained...

@Jerther Jerther mentioned this pull request Jul 20, 2021
19 tasks
@Freni-OSI
Copy link

Hi @alan196, Can you make this PR ready to merge?

Hanane ELKHAL and others added 19 commits August 17, 2021 13:23
… Stock analytic XML part is now migrated

Add logo for generic modules
- migration point, put all the modules to not installable
This module allows the user to generate analytic information from stock
moves.

- Fixed flake8 and pylint errors.
Remove sale and purchase dependency. Add test

Only assign analytic account if account != valuation acc

Changing field name account_analytic_id

Adjust to OCA latest guidelines. Add some usahe info on README
Remove remaining encoding hints.
Correct lint in test
Correct flake8 in test
Fix documentation and test_flake8
Currently translated at 100.0% (2 of 2 strings)

Translation: account-analytic-11.0/account-analytic-11.0-stock_analytic
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-stock_analytic/de/
@alan196 alan196 force-pushed the 14.0-mig-stock_analytic branch from 3149069 to f21c84a Compare August 17, 2021 18:23
Copy link
Member

@Jerther Jerther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests pass. Looks good to me!!!

Copy link

@patrickrwilson patrickrwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing, LGTM

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@Jerther
Copy link
Member

Jerther commented Sep 2, 2021

@dreispt @pedrobaeza If that's ok, would it be possible for you to merge this PR please? I can do without but it'd be really nice to have this module ready in the main repo for our migration to Odoo 14 this weekend.

@pedrobaeza
Copy link
Member

@rousseldenis do you agree on merging?

@dreispt
Copy link
Member

dreispt commented Sep 7, 2021

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-353-by-dreispt-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 086cfb4 into OCA:14.0 Sep 7, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 620b568. Thanks a lot for contributing to OCA. ❤️

@Jerther
Copy link
Member

Jerther commented Sep 7, 2021

Thank you!!

See you for Odoo 15 ;)

@alan196 alan196 deleted the 14.0-mig-stock_analytic branch March 26, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.