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] delivery: update carrier also on delivery #72859
Conversation
Create a sale order, add a product and shipping line Confirm Update shipping cost changing carrier Save Carrier on picking is not updated with the change opw-2496008
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.
I'm not sure this is possible functionally, but could you not do and finish a picking for a sale order with a carrier, then add another sale order line that will create another picking?
Then this would update the picking that is already done, but maybe this is not supported (from the code, it seems like changing the carrier would delete the sale.order.line is_delivery and add a new one, so it seems we would have only one delivery cost on the sale order).
Also I'm a little afraid about access right, stock picking needs:
access_stock_picking_user,stock.picking user,model_stock_picking,stock.group_stock_user,1,1,1,1
access_stock_picking_manager,stock.picking manager,model_stock_picking,stock.group_stock_manager,1,1,1,1
and if I have rules that create pickings, in the JIT the picking is created in sudo:
245 for company_id, moves_values in moves_values_by_company.items():
246 # create the move as SUPERUSER because the current user may not have the rights to do it (mto product launched by a sale for example)
247 moves = self.env['stock.move'].with_user(SUPERUSER_ID).sudo().with_company(company_id).create(moves_values)
248 # Since action_confirm launch following procurement_group we should activate it.
--> 249 moves._action_confirm()
so I'm not sure if the change will work if you are not a stock.group_stock_user and it might need a sudo somewhere
Indeed it seems a non supported operation as after marking as done the picking I'm free to change the shipping line in the sale order.
I tested with User sales access and no Inventory access: it works as expected (weird that in this case I can modify the related picking but I cannot see the transfer record because of other missing read perms) |
ah yes, it seems a sales->"own document" user has edit/unlink/create right to all pickings of current company, so at least there should not be an access issue: robodoo delegate+ |
robodoo r+ |
Create a sale order, add a product and shipping line Confirm Update shipping cost changing carrier Save Carrier on picking is not updated with the change opw-2496008 closes #72859 Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
@nle-odoo |
Create a sale order, add a product and shipping line
Confirm
Update shipping cost changing carrier
Save
Carrier on picking is not updated with the change
opw-2496008
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr