[FIX] delivery: consistent return type
The original method `put_in_pack` returns a `stock.quant.package`. Therefore, the override should do so. Fixes #27636 opw-1912671 closes odoo/odoo#29229
This commit is contained in:
committed by
Nicolas Martinelli
parent
e9bc13fce9
commit
e467681cfd
@@ -130,7 +130,7 @@ class StockPicking(models.Model):
|
||||
current_package_carrier_type = self.carrier_id.delivery_type if self.carrier_id.delivery_type not in ['base_on_rule', 'fixed'] else 'none'
|
||||
count_packaging = self.env['product.packaging'].search_count([('package_carrier_type', '=', current_package_carrier_type)])
|
||||
if not count_packaging:
|
||||
return False
|
||||
return package
|
||||
# By default, sum the weights of all package operations contained in this package
|
||||
pack_operation_ids = self.env['stock.pack.operation'].search([('result_package_id', '=', package.id)])
|
||||
package_weight = sum([x.qty_done * x.product_id.weight for x in pack_operation_ids])
|
||||
|
||||
Reference in New Issue
Block a user