Skip to content

[ADD] purchase_return_picking_type #2682

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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

AlexPForgeFlow
Copy link
Contributor

@AlexPForgeFlow AlexPForgeFlow commented May 14, 2025

This module allows to define an Operation Type in Purchase Return Orders.

@AlexPForgeFlow AlexPForgeFlow force-pushed the 16.0-add-purchase_return_stock branch 3 times, most recently from 0477bbd to c047fa0 Compare May 14, 2025 14:39
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Code LG. I just a have a couple of questions:

  • How will the picking_type_id defined in the return order is used?
  • I really don't mind it but perhaps it can be called purchase_return_picking_type?

@AlexPForgeFlow
Copy link
Contributor Author

Hi @AaronHForgeFlow !
The purpose is to have information about where the products being returned were originally received from. This is useful, for example, if the module product_supplierinfo_stock_picking_type is installed, which allows defining different prices for the same vendor depending on the Operation Type. For instance, the vendor might offer a different price for WH1:Receipts than for WH2:Receipts.

Taking this into account, and with the module from #2683, we can manage the different prices offered by the same vendor depending on the destination on the purchase return orders.

@AlexPForgeFlow
Copy link
Contributor Author

Code LG. I just a have a couple of questions:

* How will the picking_type_id defined in the return order is used?

* I really don't mind it but perhaps it can be called purchase_return_picking_type?

Must be called picking_type_id because logic from _prepare_sellers from https://github.com/OCA/product-attribute/blob/16.0/product_supplierinfo_stock_picking_type/models/product_product.py#L9

@rousseldenis rousseldenis added this to the 16.0 milestone May 15, 2025
@AaronHForgeFlow
Copy link
Contributor

ok! The second question was about the name of the module, but it does not matter

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Could you add some tests?

I would have named this module with something more understandable from a technical/functional point of view. Like purchase_return_picking_type

@rousseldenis
Copy link
Contributor

Could you add some tests?

I would have named this module with something more understandable from a technical/functional point of view. Like purchase_return_picking_type

Didn't see @AaronHForgeFlow comment but we are synced about the name 😅

@AlexPForgeFlow
Copy link
Contributor Author

Code LG. I just a have a couple of questions:

* How will the picking_type_id defined in the return order is used?

* I really don't mind it but perhaps it can be called purchase_return_picking_type?

Must be called picking_type_id because logic from _prepare_sellers from https://github.com/OCA/product-attribute/blob/16.0/product_supplierinfo_stock_picking_type/models/product_product.py#L9

@rousseldenis I named the field that way for a specific reason, if it's renamed we will have conflicts when the product_supplierinfo_stock_picking_type module is installed. That's why I created this module.

@rousseldenis
Copy link
Contributor

@rousseldenis I named the field that way for a specific reason, if it's renamed we will have conflicts when the product_supplierinfo_stock_picking_type module is installed. That's why I created this module.

It's not about field name but module one.

@AlexPForgeFlow
Copy link
Contributor Author

@rousseldenis I named the field that way for a specific reason, if it's renamed we will have conflicts when the product_supplierinfo_stock_picking_type module is installed. That's why I created this module.

It's not about field name but module one.

ah, you were talking about module name..

@AlexPForgeFlow AlexPForgeFlow force-pushed the 16.0-add-purchase_return_stock branch from c047fa0 to e5de77f Compare May 15, 2025 09:37
@AlexPForgeFlow AlexPForgeFlow changed the title [ADD] purchase_return_stock [ADD] purchase_return_picking_type May 15, 2025
@AlexPForgeFlow
Copy link
Contributor Author

@AaronHForgeFlow @rousseldenis
module name changed and applied your suggestions

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

🆗

@rousseldenis
Copy link
Contributor

@AaronHForgeFlow @rousseldenis module name changed and applied your suggestions

Missing a little test

@AlexPForgeFlow
Copy link
Contributor Author

@AaronHForgeFlow @rousseldenis module name changed and applied your suggestions

Missing a little test

@rousseldenis maybe tests are more interesting adding them here #2683, wdyt?

@AlexPForgeFlow
Copy link
Contributor Author

@rousseldenis or you want me to test de defaults to the picking type on purchase return order creation?

@AlexPForgeFlow AlexPForgeFlow force-pushed the 16.0-add-purchase_return_stock branch 3 times, most recently from 466eed4 to ac81417 Compare May 15, 2025 11:23
@AlexPForgeFlow AlexPForgeFlow force-pushed the 16.0-add-purchase_return_stock branch from ac81417 to 5096fae Compare May 15, 2025 14:01
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.

3 participants