Skip to content

[18.0][MIG] sale_stock_analytic: Migration to 18.0 - #818

Open
jdidderen wants to merge 12 commits into
OCA:18.0from
jdidderen:18.0-mig-sale_stock_analytic
Open

[18.0][MIG] sale_stock_analytic: Migration to 18.0#818
jdidderen wants to merge 12 commits into
OCA:18.0from
jdidderen:18.0-mig-sale_stock_analytic

Conversation

@jdidderen

Copy link
Copy Markdown

Based on #617

@luisDIXMIT luisDIXMIT left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested on runboat and LGTM!

@github-actions

Copy link
Copy Markdown

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 github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 28, 2025
@Saran440

Copy link
Copy Markdown
Member

@jdidderen Can you update code again please?

Functional Test 👍

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 25, 2026
@jdidderen
jdidderen force-pushed the 18.0-mig-sale_stock_analytic branch from 0c420ed to 8bc5700 Compare February 15, 2026 17:34
@jdidderen

Copy link
Copy Markdown
Author

@jdidderen Can you update code again please?

Functional Test 👍

It's rebased

@rjaraspearhead rjaraspearhead left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for your help, it looks good to me. The only change I would suggest is using BaseCommon to optimize the tests.

Comment thread sale_stock_analytic/tests/test_sale_stock_analytic.py Outdated
Comment thread sale_stock_analytic/tests/test_sale_stock_analytic.py Outdated
@jdidderen
jdidderen force-pushed the 18.0-mig-sale_stock_analytic branch from 8bc5700 to 37ca642 Compare May 31, 2026 06:54
@OCA-git-bot OCA-git-bot added series:18.0 mod:sale_stock_analytic Module sale_stock_analytic labels May 31, 2026
@jdidderen

Copy link
Copy Markdown
Author

Thanks for your help, it looks good to me. The only change I would suggest is using BaseCommon to optimize the tests.

I made the requested changes. Thanks for the review 👍

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need to create a res.partner record when using BaseCommon, as it is already provided by the base class.

Comment thread sale_stock_analytic/tests/test_sale_stock_analytic.py Outdated
@jdidderen
jdidderen force-pushed the 18.0-mig-sale_stock_analytic branch from 37ca642 to e5a9f90 Compare June 28, 2026 11:49
@jdidderen

Copy link
Copy Markdown
Author

No need to create a res.partner record when using BaseCommon, as it is already provided by the base class.

Thanks for the review. I have updated the code 🙏

@CILC98

CILC98 commented Jul 10, 2026

Copy link
Copy Markdown

@BhaveshHeliconia Hi! Your help reviewing this module, please.

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code review LGTM!

Comment on lines +30 to +32
"analytic_distribution": dict(
{str(cls.env.ref("analytic.analytic_agrolait").id): 100.0}
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"analytic_distribution": dict(
{str(cls.env.ref("analytic.analytic_agrolait").id): 100.0}
),
"analytic_distribution": {cls.env.ref("analytic.analytic_agrolait").id: 100.0},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you modify this? It’s a bit easier to understand this way.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ping @jdidderen

@JanGebelSAMSA-IT

Copy link
Copy Markdown

@jdidderen Took a look at your migration and I have 2 suggestions for you.

  1. Update the manifest summary. In Odoo 18 analytic tags are not used anymore as far as I know.
  2. Is there a specific reason to keep extending analytic_distribution via _get_stock_move_values() of stock.rule instead of using _prepare_procurement_values() on sale.order.line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.