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

[16.0][ADD] stock_average_daily_sale #257

Merged
merged 15 commits into from
Apr 15, 2024

Conversation

@rousseldenis rousseldenis added this to the 16.0 milestone Jan 13, 2023
@rousseldenis rousseldenis force-pushed the 16.0-add-stock-average-daily-sale-dro branch 3 times, most recently from e9d61ac to 78c730e Compare January 13, 2023 12:33
Copy link
Contributor

@sbejaoui sbejaoui left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link
Sponsor Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

LGTM (Code review + functiional)

@simahawk
Copy link

/ocabot migration stock_average_daily_sale

@OCA-git-bot OCA-git-bot mentioned this pull request Feb 16, 2023
13 tasks
@rousseldenis rousseldenis force-pushed the 16.0-add-stock-average-daily-sale-dro branch 3 times, most recently from 3f982bd to 419601c Compare February 16, 2023 09:21
@github-actions
Copy link

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 Jun 18, 2023
@sbejaoui
Copy link
Contributor

sbejaoui commented Oct 4, 2023

@jbaudoux , can you update your review please

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 8, 2023
@rousseldenis
Copy link
Sponsor Contributor Author

@jbaudoux Could you update your review ?

@rousseldenis rousseldenis force-pushed the 16.0-add-stock-average-daily-sale-dro branch from 640e692 to 1205a08 Compare October 10, 2023 10:16
@rousseldenis rousseldenis force-pushed the 16.0-add-stock-average-daily-sale-dro branch from 1205a08 to ae80038 Compare October 10, 2023 13:03
@rousseldenis rousseldenis force-pushed the 16.0-add-stock-average-daily-sale-dro branch from 7a4c896 to f2f8d26 Compare October 11, 2023 10:39
As tests create a Savepoint, there is a concurrent query when checking the
view existence.
As for x reason, some products appear more than one time in the report,
id generated by the concatenation of product_id and warehouse_id is
irrelevant (as duplicate values possible). Use row_number() instead
@lmignon lmignon force-pushed the 16.0-add-stock-average-daily-sale-dro branch 2 times, most recently from 3f33905 to 879e4cf Compare November 21, 2023 15:12
@@ -114,7 +127,7 @@ def _check_view(self):
except Exception as e:
raise e
finally:
new_self.env.cr.close()
cr.close()
Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

@lmignon Is this really wanted (the code before was closing the new created cursor, not the current one)?

Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

The code close the new cursor...

cr = registry(self._cr.dbname).cursor()
....

cr.close()

I'll clean the code to improve readability

    @api.model
    def _check_view(self):
        cr = registry(self._cr.dbname).cursor()
        with closing(cr):
            try:
                return self._check_materialize_view_populated(cr)
            except ObjectNotInPrerequisiteState:
                _logger.warning(
                    _("The materialized view has not been populated. Launch the cron.")
                )
                return False
            except Exception as e:
                raise e

@lmignon lmignon force-pushed the 16.0-add-stock-average-daily-sale-dro branch from 879e4cf to 61d3330 Compare November 21, 2023 15:22
@lmignon lmignon force-pushed the 16.0-add-stock-average-daily-sale-dro branch from 61d3330 to d46c24f Compare November 21, 2023 15:30
@dreispt
Copy link
Sponsor Member

dreispt commented Dec 9, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

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

OCA-git-bot added a commit that referenced this pull request Dec 9, 2023
Signed-off-by dreispt
@OCA-git-bot
Copy link
Contributor

@dreispt your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-257-by-dreispt-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

Copy link

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 Apr 14, 2024
@jbaudoux
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-257-by-jbaudoux-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4635017 into OCA:16.0 Apr 15, 2024
4 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon deleted the 16.0-add-stock-average-daily-sale-dro branch April 15, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved merged 🎉 needs review ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants