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

[FIX] project_purchase : fetch purchase order on smart button #159345

Conversation

yoba-odoo
Copy link
Contributor

Steps to reproduce:
1- Create a purchase order and assign a project to its Analytic distribution
2- Go to the assigned project's 'Project Updates'
3- Click on Purchase order smart button

Current behavior before PR:
When trying to view the purchase orders linked to a project you will either get a message saying this ID doesn't exist or you will get an empty list view. This is happening because we are fetching the purchase order line ids and passing those ids to the view not the ids for the purchase order itself
https://github.com/odoo/odoo/blob/saas-17.1/addons/project_purchase/models/project_project.py#L31:L33

Desired behavior after PR is merged:
We are now passing the ids of the purchase order to the view.

opw-3794848

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Mar 26, 2024

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Mar 26, 2024
Copy link
Contributor

@nle-odoo nle-odoo left a comment

Choose a reason for hiding this comment

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

looks good to me

addons/project_purchase/models/project_project.py Outdated Show resolved Hide resolved
@yoba-odoo yoba-odoo force-pushed the saas-17.1-opw-3794848-purchase_order_smart_button-yoba branch from d4deaca to 667a583 Compare March 28, 2024 11:24
@yoba-odoo yoba-odoo marked this pull request as ready for review March 28, 2024 11:25
@C3POdoo C3POdoo requested review from a team March 28, 2024 11:35
Copy link
Contributor

@xavierbol xavierbol 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 your work, I left 2 comments and after that it will look good to me. 🙂

addons/project_purchase/models/project_project.py Outdated Show resolved Hide resolved
addons/project_purchase/models/project_project.py Outdated Show resolved Hide resolved
@yoba-odoo yoba-odoo force-pushed the saas-17.1-opw-3794848-purchase_order_smart_button-yoba branch from 667a583 to 56bc6b9 Compare March 28, 2024 13:46
Steps to reproduce:
	1- Create a purchase order and assign a project to its Analytic distribution
	2- Go to the assigned project's 'Project Updates'
	3- Click on Purchase order smart button

Current behavior before PR:
When trying to view the purchase orders linked to a project you will
either get a message saying this ID doesn't exist or you will get
an empty list view. This is happening because we are fetching the
purchase order line ids and passing those ids to the view
not the ids for the purchase order itself
https://github.com/odoo/odoo/blob/saas-17.1/addons/project_purchase/models/project_project.py#L31:L33

Desired behavior after PR is merged:
We are now passing the ids of the purchase order to the view.

opw-3794848
@yoba-odoo yoba-odoo force-pushed the saas-17.1-opw-3794848-purchase_order_smart_button-yoba branch from 56bc6b9 to 8e63120 Compare April 4, 2024 14:41
@svs-odoo
Copy link
Contributor

svs-odoo commented Apr 5, 2024

robodoo r+

robodoo pushed a commit that referenced this pull request Apr 5, 2024
Steps to reproduce:
	1- Create a purchase order and assign a project to its Analytic distribution
	2- Go to the assigned project's 'Project Updates'
	3- Click on Purchase order smart button

Current behavior before PR:
When trying to view the purchase orders linked to a project you will
either get a message saying this ID doesn't exist or you will get
an empty list view. This is happening because we are fetching the
purchase order line ids and passing those ids to the view
not the ids for the purchase order itself
https://github.com/odoo/odoo/blob/saas-17.1/addons/project_purchase/models/project_project.py#L31:L33

Desired behavior after PR is merged:
We are now passing the ids of the purchase order to the view.

opw-3794848

closes #159345

Signed-off-by: Steve Van Essche <svs@odoo.com>
@robodoo robodoo closed this Apr 5, 2024
@fw-bot fw-bot deleted the saas-17.1-opw-3794848-purchase_order_smart_button-yoba branch April 19, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants