Compare commits
5 commits
16.0
...
238-16.0-b
| Author | SHA1 | Date | |
|---|---|---|---|
| 45c1fd968d | |||
| a4c9a57ef5 | |||
| f513c0919f | |||
| c2ded5f96f | |||
| a9ade6a690 |
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from odoo import api, fields, models
|
||||
from odoo.addons.sale_order_batch.models.sale_order_batch import READONLY_FIELD_STATES
|
||||
from odoo.tools import float_is_zero
|
||||
|
||||
|
||||
class SaleOrderBatch(models.Model):
|
||||
|
|
@ -57,10 +58,10 @@ class SaleOrderBatch(models.Model):
|
|||
def action_fill_packages(self):
|
||||
self.ensure_one()
|
||||
eligible = self.product_ids.filtered(
|
||||
lambda p: p.open_packaging_qty > 0 and p.open_packaging_max_qty == 0.0
|
||||
lambda p: p.open_packaging_qty > 0 and float_is_zero(p.open_packaging_max_qty, precision_rounding=p.product_id.uom_id.batch_fill_precision)
|
||||
)
|
||||
ineligible = self.product_ids.filtered(
|
||||
lambda p: p.open_packaging_qty > 0 and p.open_packaging_max_qty != 0.0
|
||||
lambda p: p.open_packaging_qty > 0 and not float_is_zero(p.open_packaging_max_qty, precision_rounding=p.product_id.uom_id.batch_fill_precision)
|
||||
)
|
||||
wizard = self.env["sale.order.batch.packaging.fill"].create(
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue