-
Notifications
You must be signed in to change notification settings - Fork 23.5k
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]stock: owner on picking not propagated on quants (Maintenance Issue: 619854) #4548
Conversation
Pull request created for the Issue #4136 |
@@ -1057,6 +1057,7 @@ def _picking_putaway_apply(product): | |||
'product_qty': 1.0, | |||
'location_id': pack.location_id.id, | |||
'location_dest_id': quants_suggested_locations[pack_quants[0]], | |||
'owner_id': picking.owner_id.id or False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or False
is not needed
as said @lepistone the view is a different fix so should be done in another commit (each one explaining what is currently fixing) |
@@ -1091,6 +1091,7 @@ | |||
<field name="create_date" invisible="1"/> | |||
<field name="date"/> | |||
<field name="date_expected" on_change="onchange_date(date,date_expected)"/> | |||
<field name="restrict_partner_id" invisible ="1"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space
Thanks for the PR @skh-odoo @mart-e. Something is not clear to me: we have both The changes to the view seem to add a default value on an invisible field ( Thanks! |
The reported issue #4136 is fixed in the python code. |
@mart-e we agree python code fixes #4136 which is owner propagation The other issue is respecting owner on stock reservation. According to @jco-odoo here odoo-dev@3e26a5d it is not fully implemented. I accept that, so I developed OCA/stock-logistics-workflow/pull/44: it makes reservation always respect the owner, which I made required on quants (with proper defaults) to avoid the ambiguity of "no owner". The tests of that module should clarify things. The thing I miss is - as I said - what's the difference between Thanks! |
The restrict_partner_id could have been named owner_id. It is to have a similar naming as restrict_lot_id. Somewhere else, I stated that the restrict_partner_id on the move should be the owner of the picking and vice versa, like the owner_id on the pack operation. It is logical to have one picking with only moves of the same owner. |
Thanks for the answer @jco-odoo. In my module (sale_owner_stock_sourcing) I propagate the owner from sale.order.line to the move. If it is meant like you say, I should probably create separate pickings (and procurement groups?) if two sale.order.lines have different owners. |
Normally if it is a sale order, the owner is you. The owner is meant for On Tue, Jan 6, 2015 at 4:19 PM, Leonardo Pistone notifications@github.com
|
@jco-odoo exactly, the "special kind of sale order" is the "logistic order" we have in the NGO verticalization: https://github.com/OCA/vertical-ngo/blob/8.0/logistic_order/__openerp__.py#L31-L40 We are handling sale lines with owners separately in https://github.com/OCA/sale-workflow/pull/89/files because someone might want to use those for something other than NGOs. There I am just propagating the owner (if any) from the order line to the move (possibly splitting pickings, which is my concern). |
The owner should be added in the domain of the _picking_assign method then. That way they can be separated. |
Thanks a lot @jco-odoo, I hadn't found |
8899187
to
f9e2c85
Compare
Merged at 28833f0, thanks |
Steps to reproduce:
1 Navigate to Settings > Configuration > Warehouse, enable 'manage owner on stock', and enable Technical Features for your user
2. Create a incoming stock picking from partner = Camptocamp, with owner = Luc Maurer of 13 IPads
3. Process the picking
4. Display the IPad product and click on the button on the top right corner saying "13 on hand"
Expected:
in the displayed list, I expect to see 1 line with a quant of 13 units and owner = Camptocamp (the commercial_partner_id of Luc Maurer)
Actual:
there is no owner on the quant.