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

[MIG] stock_reserve_sale 15.0 #1486

Closed
wants to merge 24 commits into from

Conversation

flachica
Copy link
Contributor

@flachica flachica commented Sep 15, 2022

Dependencies:

#1485

@flachica flachica mentioned this pull request Sep 15, 2022
80 tasks
@flachica flachica force-pushed the 15.0-mig-stock_reserve_sale branch from bfc3a0b to 4c5172f Compare September 15, 2022 11:10
@victoralmau
Copy link
Member

Please, cherry-pick #1489

@flachica
Copy link
Contributor Author

@victoralmau Forgive my ignorance, how do I apply the cherry-pick?

@flachica
Copy link
Contributor Author

@victoralmau I think that I included your #1489 correctly

@flachica flachica force-pushed the 15.0-mig-stock_reserve_sale branch from 4c5172f to 8500c07 Compare September 28, 2022 13:46
@oca-clabot
Copy link

Hey @flachica, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: https://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@victoralmau
Copy link
Member

@victoralmau I think that I included your #1489 correctly

Ok, it's well done.
When the stock_reserve addon is merged, we can continue with this migration.

@rousseldenis
Copy link
Contributor

rousseldenis commented Oct 11, 2022

@flachica FYI, you can, if you want to tests succeed, add a line in test-requirements.txt file with the addon this PR depends on.

Like :

odoo-addon-stock-reserve @ git+https://github.com/OCA/stock-logistics-warehouse.git@refs/pull/1484/head#subdirectory=setup/stock_reserve

That commit should be then removed after the other PR merging.

@flachica
Copy link
Contributor Author

@flachica FYI, you can, if you want to tests succeed, add a line in test-requirements.txt file with the addon this PR depends on.

Like :

odoo-addon-stock-reserve @ git+https://github.com/OCA/stock-logistics-warehouse.git@refs/pull/1484/head#subdirectory=setup/stock_reserve

That commit should be then removed after the other PR merging.

Bad news. Tests was failing

@@ -0,0 +1 @@
odoo-addon-stock-reserve @ git+https://github.com/OCA/stock-logistics-warehouse.git@refs/pull/1484/head#subdirectory=setup/stock_reserve
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
odoo-addon-stock-reserve @ git+https://github.com/OCA/stock-logistics-warehouse.git@refs/pull/1484/head#subdirectory=setup/stock_reserve
odoo-addon-stock-reserve @ git+https://github.com/OCA/stock-logistics-warehouse.git@refs/pull/1485/head#subdirectory=setup/stock_reserve

Link to good PR should work 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still failling. I tried your suggestion and other change but I can't solve this.

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Please use suggested syntax. Yours is not correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your response but, as I commented before, I tryied your suggestion but still failing

I don't find any example. Sorry. Where I can find documentation to read about this?

Copy link
Contributor

Choose a reason for hiding this comment

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

@flachica Not the same error.

Here this is about your module tests. Not not found module.

Copy link
Contributor

Choose a reason for hiding this comment

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

The error about unreleased dependencies is normal. It should be solved before merging this (as the base module is merged).

Copy link
Contributor

Choose a reason for hiding this comment

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

The difference here is you have a runboat running that allows to do functional tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wow, impressive. I love the functionality. Thanks so much for the help

@flachica flachica force-pushed the 15.0-mig-stock_reserve_sale branch 2 times, most recently from a97f4bc to 569a2a7 Compare October 18, 2022 08:46
@flachica flachica force-pushed the 15.0-mig-stock_reserve_sale branch 3 times, most recently from b4d4547 to 6d90f69 Compare October 19, 2022 11:12
This commit must be ignored in Odoo Bot merge action
@flachica flachica force-pushed the 15.0-mig-stock_reserve_sale branch from 6d90f69 to 363b6e4 Compare October 19, 2022 11:19
@max3903 max3903 added this to the 15.0 milestone Nov 21, 2022
Copy link

@CasVissers-360ERP CasVissers-360ERP left a comment

Choose a reason for hiding this comment

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

Initial functional review

has_stock_reservation = fields.Boolean(
compute="_compute_stock_reservation",
readonly=True,
multi="stock_reservation",

Choose a reason for hiding this comment

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

Field sale.order.has_stock_reservation: unknown parameter 'multi', if this is an actual parameter you may want to override the method _valid_field_parameter on the relevant model in order to allow it

is_stock_reservable = fields.Boolean(
compute="_compute_stock_reservation",
readonly=True,
multi="stock_reservation",

Choose a reason for hiding this comment

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

Field sale.order.is_stock_reservable: unknown parameter 'multi', if this is an actual parameter you may want to override the method _valid_field_parameter on the relevant model in order to allow it



class SaleStockReserve(models.TransientModel):
_name = "sale.stock.reserve"

Choose a reason for hiding this comment

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

You are not allowed to access 'Sale Stock Reserve' (sale.stock.reserve) records.

Missing access rights

help="Pre-book products from stock"
attrs="{'invisible': [('is_stock_reservable', '=', False)]}"
/>
</button>

Choose a reason for hiding this comment

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

A smartbutton to view reservations would be a nice addition

lines = model.browse(self.env.context["active_ids"])

try:
owners = {line.stock_owner_id for line in lines}

Choose a reason for hiding this comment

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

Fetching owner from order is not working

return rule.procure_method
return False

@api.depends("state", "product_id.route_ids", "product_id.type")

Choose a reason for hiding this comment

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

type = detailed_type

<div class="text-right">
<button
name="release_all_stock_reservation"
string="Cancell all"

Choose a reason for hiding this comment

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

Cancel all

@CasVissers-360ERP
Copy link

@flachica The code quality is low, I am going to pause my review.

@github-actions
Copy link

github-actions bot commented Apr 9, 2023

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 9, 2023
@rvalyi
Copy link
Member

rvalyi commented Apr 25, 2023

Hello, you might consider rebuilding the migration from this v14 migration PR as it bring more bugfix that is not present here #1696

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 30, 2023
@github-actions
Copy link

github-actions bot commented Sep 3, 2023

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 Sep 3, 2023
@github-actions github-actions bot closed this Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.