Skip to content

Commit

Permalink
[FIX] stock_ux: deliveryslip fix
Browse files Browse the repository at this point in the history
closes #389

Signed-off-by: augusto-weiss <awe@adhoc.com.ar>
  • Loading branch information
vib-adhoc committed Aug 4, 2023
1 parent 50e7000 commit 5bd2a1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stock_ux/models/stock_move_line.py
Expand Up @@ -107,8 +107,10 @@ def _get_aggregated_product_quantities(self, **kwargs):
aggregated_move_lines = super()._get_aggregated_product_quantities(**kwargs)
if bool(self.env['ir.config_parameter'].sudo().get_param('stock_ux.delivery_slip_use_origin', 'False')) == True:
for line in aggregated_move_lines:
moves = self.filtered(lambda sml: sml.product_id == aggregated_move_lines[line]['product']).mapped('move_id')
if moves.mapped('origin_description'):
moves = self.filtered(
lambda sml: sml.product_id == aggregated_move_lines[line]['product']
).mapped('move_id').filtered(lambda m: m.origin_description)
if moves:
aggregated_move_lines[line]['description'] = False
aggregated_move_lines[line]['name'] =', '.join(moves.mapped('origin_description'))
return aggregated_move_lines

0 comments on commit 5bd2a1a

Please sign in to comment.