bemade_margin_vendor_pricelist: fix reference to reserved_quantity
This commit is contained in:
parent
d479721e32
commit
94dd40ac7d
2 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
{
|
||||
'name': 'Sales Margin on Vendor Price',
|
||||
'version': '17.0.0.0.1',
|
||||
'version': '17.0.0.0.2',
|
||||
'summary': 'Enables calculation of sales margins based on vendor pricelists.',
|
||||
'description': """Adds a new method for calculating """,
|
||||
'author': 'Bemade Inc.',
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class SaleOrderLine(models.Model):
|
|||
if is_order and self.qty_to_deliver == 0:
|
||||
return 0
|
||||
elif is_order and self.qty_to_deliver > 0:
|
||||
reserved = sum([m.reserved_availability for m in self.move_ids])
|
||||
reserved = sum([q.reserved_quantity for q in self.move_ids.mapped('move_line_ids').mapped('quant_id')])
|
||||
missing = self.qty_to_deliver - reserved
|
||||
if float_compare(missing, 0.0,
|
||||
precision_rounding=self.product_uom.rounding) == 1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue