mirror of
https://github.com/NaN-tic/trytond-systemlogics_modula.git
synced 2023-12-14 04:32:53 +01:00
Remove cursor in Transaction commit
(Follow PEP-0249 for Transaction and backends)
This commit is contained in:
parent
3d2dec06da
commit
945a09b2f7
6
stock.py
6
stock.py
|
@ -57,7 +57,7 @@ class ShipmentIn:
|
|||
|
||||
# Force not get a rollback to generate XML file
|
||||
shipment_ids = [s.id for s in deposit_shipments]
|
||||
Transaction().cursor.commit()
|
||||
Transaction().commit()
|
||||
# Search shipment ID to sure not have a rollback
|
||||
shipments = cls.search([
|
||||
('id', 'in', shipment_ids),
|
||||
|
@ -128,7 +128,7 @@ class ShipmentOut:
|
|||
|
||||
# Force not get a rollback to generate XML file
|
||||
shipment_ids = [s.id for s in (s_completed + s_incompleted)]
|
||||
Transaction().cursor.commit()
|
||||
Transaction().commit()
|
||||
# Search shipment ID to sure not have a rollback
|
||||
shipments = cls.search([
|
||||
('id', 'in', shipment_ids),
|
||||
|
@ -179,7 +179,7 @@ class ShipmentInternal:
|
|||
# Force not get a rollback to generate XML file
|
||||
extract_shipments_ids = [shipment.id for shipment in extract_shipments]
|
||||
deposit_shipments_ids = [shipment.id for shipment in deposit_shipments]
|
||||
Transaction().cursor.commit()
|
||||
Transaction().commit()
|
||||
|
||||
if extract_shipments_ids:
|
||||
# Search shipment ID to sure not have a rollback
|
||||
|
|
|
@ -310,7 +310,7 @@ class SystemLogicsModulaEXPOrdiniFile(ModelSQL, ModelView):
|
|||
EXPOrdiniFile = pool.get('systemlogics.modula.exp.ordini.file')
|
||||
|
||||
EXPOrdiniFile.write(ordini_files, {'state': 'in_progress'})
|
||||
Transaction().cursor.commit()
|
||||
Transaction().commit()
|
||||
|
||||
to_do = []
|
||||
done_ordini_files = []
|
||||
|
|
Loading…
Reference in a new issue