[FIX] nfu_sale_order_batch_packaging: fix float_is_zero call without precision args
This commit is contained in:
parent
a4c9a57ef5
commit
a72c581ce8
3 changed files with 3 additions and 5 deletions
|
|
@ -1,5 +1,4 @@
|
|||
from odoo import api, fields, models
|
||||
|
||||
from odoo.addons.sale_order_batch.models.sale_order_batch import READONLY_FIELD_STATES
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -167,10 +167,9 @@ class SaleOrderBatchProduct(models.Model):
|
|||
# Attach any sub-rounding remainder directly to the last eligible line
|
||||
remainder = target - distributed
|
||||
if remainder > 1e-9 and last_line:
|
||||
new_qty = float_round(
|
||||
last_line.product_uom_qty + remainder, precision_rounding=rounding
|
||||
new_qty = min(
|
||||
last_line.product_uom_qty + remainder, last_line.product_uom_max_qty
|
||||
)
|
||||
new_qty = min(new_qty, last_line.product_uom_max_qty)
|
||||
last_line.write({"product_uom_qty": new_qty})
|
||||
|
||||
def _zero_packaging(self):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
- 16.0.0.0.1: Initial module.
|
||||
- 16.0.1.0.0: rename to nfu_sale_order_batch_packaging
|
||||
- 16.0.1.16.0.1.0: Live
|
||||
- 16.0.1.1.0: Live
|
||||
- 16.0.1.2.0: Add regeneration action for batch products
|
||||
- 16.0.1.2.1: refactoring
|
||||
- 16.0.1.3.0: add packaging states
|
||||
|
|
|
|||
Loading…
Reference in a new issue