Remove old-style of super() calls

This commit is contained in:
Nicolas Évrard
2025-04-04 00:45:18 +02:00
parent 5781a49606
commit cbdad75620
350 changed files with 1235 additions and 1235 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class Product(metaclass=PoolMeta):
if forecast_location_move:
date = context.get('stock_date_end') or datetime.date.max
restore = Location.forecast_location_move(date)
quantities = super(Product, cls).products_by_location(*args, **kwargs)
quantities = super().products_by_location(*args, **kwargs)
if forecast_location_move:
restore()
return quantities
+6 -6
View File
@@ -125,14 +125,14 @@ class ShipmentInternal(metaclass=PoolMeta):
@Workflow.transition('draft')
@clear_location_assignation
def draft(cls, shipments):
super(ShipmentInternal, cls).draft(shipments)
super().draft(shipments)
@classmethod
@ModelView.button
@Workflow.transition('waiting')
@clear_location_assignation
def wait(cls, shipments):
super(ShipmentInternal, cls).wait(shipments)
super().wait(shipments)
@classmethod
@Workflow.transition('assigned')
@@ -161,7 +161,7 @@ class ShipmentInternal(metaclass=PoolMeta):
})
if locations:
Location.save(list(locations))
super(ShipmentInternal, cls).assign(shipments)
super().assign(shipments)
@classmethod
@ModelView.button
@@ -179,7 +179,7 @@ class ShipmentInternal(metaclass=PoolMeta):
})
if to_write:
Location.write(*to_write)
super(ShipmentInternal, cls).ship(shipments)
super().ship(shipments)
@classmethod
@ModelView.button
@@ -205,7 +205,7 @@ class ShipmentInternal(metaclass=PoolMeta):
@Workflow.transition('cancelled')
@clear_location_assignation
def cancel(cls, shipments):
super(ShipmentInternal, cls).cancel(shipments)
super().cancel(shipments)
class ShipmentInternal_Location(ModelSQL):
@@ -263,4 +263,4 @@ class Supply(metaclass=PoolMeta):
def transition_create_(self):
with Transaction().set_context(forecast_location_move=True):
return super(Supply, self).transition_create_()
return super().transition_create_()