File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
stock_secondary_unit/models Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 44from . import product_product
55from . import product_template
66from . import stock_move
7+ from . import stock_picking
Original file line number Diff line number Diff line change 1+ from odoo import models
2+
3+
4+ class StockPicking (models .Model ):
5+ _inherit = "stock.picking"
6+
7+ def _create_backorder (self ):
8+ res = super (StockPicking , self )._create_backorder ()
9+
10+ for original_move in self .move_ids :
11+ corresponding_move = next (
12+ (
13+ move
14+ for move in res .move_ids
15+ if move .product_id == original_move .product_id
16+ ),
17+ None ,
18+ )
19+
20+ if corresponding_move and corresponding_move .secondary_uom_qty :
21+ corresponding_move ._compute_secondary_uom_qty ()
22+ else :
23+ continue
24+ return res
You can’t perform that action at this time.
0 commit comments