[FIX] stock: fix products_availability compute
the deadline of picking is not required, then add condition to avoid compare False to datetime. closes odoo/odoo#60255 X-original-commit: 2e2881621147278f14ef8406995badaac998ac94 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com> Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
This commit is contained in:
@@ -412,7 +412,7 @@ class Picking(models.Model):
|
||||
picking.products_availability_state = 'late'
|
||||
elif forecast_date:
|
||||
picking.products_availability = _('Exp %s', format_date(self.env, forecast_date))
|
||||
picking.products_availability_state = 'late' if picking.date_deadline < forecast_date else 'expected'
|
||||
picking.products_availability_state = 'late' if picking.date_deadline and picking.date_deadline < forecast_date else 'expected'
|
||||
|
||||
@api.depends('picking_type_id.show_operations')
|
||||
def _compute_show_operations(self):
|
||||
|
||||
Reference in New Issue
Block a user