Compare commits
5 commits
238-16.0-b
...
16.0
| Author | SHA1 | Date | |
|---|---|---|---|
| b02994d178 | |||
| 29ffb77067 | |||
| dd98a204cc | |||
| 7efa474617 | |||
| d87b366d41 |
1 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
from odoo import api, fields, models
|
from odoo import api, fields, models
|
||||||
from odoo.addons.sale_order_batch.models.sale_order_batch import READONLY_FIELD_STATES
|
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):
|
class SaleOrderBatch(models.Model):
|
||||||
|
|
@ -58,10 +57,10 @@ class SaleOrderBatch(models.Model):
|
||||||
def action_fill_packages(self):
|
def action_fill_packages(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
eligible = self.product_ids.filtered(
|
eligible = self.product_ids.filtered(
|
||||||
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)
|
lambda p: p.open_packaging_qty > 0 and p.open_packaging_max_qty == 0.0
|
||||||
)
|
)
|
||||||
ineligible = self.product_ids.filtered(
|
ineligible = self.product_ids.filtered(
|
||||||
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)
|
lambda p: p.open_packaging_qty > 0 and p.open_packaging_max_qty != 0.0
|
||||||
)
|
)
|
||||||
wizard = self.env["sale.order.batch.packaging.fill"].create(
|
wizard = self.env["sale.order.batch.packaging.fill"].create(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue